aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 774e0811..6ff83401 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -1303,36 +1303,3 @@ getPackages session dynflags flags = do
-- | Build one big doc env out of a list of packages
packagesDocEnv :: [PackageData] -> PackageEnv
packagesDocEnv packages = Map.unions (map pdDocEnv packages)
-
---------------------------------------------------------------------------------
--- Package/Interface files
---------------------------------------------------------------------------------
-
-packageFileMagic = 0xDA303001 :: Word32
-
-savePackageFile :: FilePath -> PackageEnv -> IO ()
-savePackageFile filename pkgEnv = do
- h <- openBinaryFile filename WriteMode
- bh <- openBinIO h
-
- ud <- newWriteState
- bh <- return $ setUserData bh ud
-
- put_ bh packageFileMagic
- put_ bh (Map.toList pkgEnv)
- hClose h
-
-loadPackageFile :: FilePath -> IO PackageEnv
-loadPackageFile filename = do
- h <- openBinaryFile filename ReadMode
- bh <- openBinIO h
-
- ud <- newReadState undefined
- bh <- return (setUserData bh ud)
-
- magic <- get bh
- when (magic /= packageFileMagic) $ throwE $
- "Magic number mismatch: couldn't load interface file: " ++ filename
-
- envList <- get bh
- return (Map.fromList envList)