aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavve <davve@dtek.chalmers.se>2007-01-12 18:33:59 +0000
committerdavve <davve@dtek.chalmers.se>2007-01-12 18:33:59 +0000
commit77507eb719d8db00573e5053a45d4bac7b664860 (patch)
tree580ec5a90fd84c67dff4fa78bc3955a7a6c7a67c
parent0f2144d8c918261152f1efbf753cb975d94ce503 (diff)
Remove interface file read/write
-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)