Commit 0faa8f53 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

Remove base 3 support from bin-package-db

parent 01efdd6c
...@@ -36,13 +36,7 @@ readBinPackageDB file ...@@ -36,13 +36,7 @@ readBinPackageDB file
(\err -> error ("While parsing " ++ show file ++ ": " ++ err)) (\err -> error ("While parsing " ++ show file ++ ": " ++ err))
catchUserError :: IO a -> (String -> IO a) -> IO a catchUserError :: IO a -> (String -> IO a) -> IO a
#ifdef BASE3
catchUserError io f = io `Exception.catch` \e -> case e of
ErrorCall err -> f err
_ -> throw e
#else
catchUserError io f = io `Exception.catch` \(ErrorCall err) -> f err catchUserError io f = io `Exception.catch` \(ErrorCall err) -> f err
#endif
writeBinPackageDB :: Binary m => FilePath -> [InstalledPackageInfo_ m] -> IO () writeBinPackageDB :: Binary m => FilePath -> [InstalledPackageInfo_ m] -> IO ()
writeBinPackageDB file ipis = Bin.encodeFile file ipis writeBinPackageDB file ipis = Bin.encodeFile file ipis
......
...@@ -11,17 +11,10 @@ source-repository head ...@@ -11,17 +11,10 @@ source-repository head
type: darcs type: darcs
location: http://darcs.haskell.org/ghc location: http://darcs.haskell.org/ghc
flag base3
default: False
Library { Library {
exposed-modules: exposed-modules:
Distribution.InstalledPackageInfo.Binary Distribution.InstalledPackageInfo.Binary
if flag(base3)
build-depends: base >= 3 && < 4
cpp-options: -DBASE3
else
build-depends: base >= 4 && < 5 build-depends: base >= 4 && < 5
build-depends: binary >= 0.5 && < 0.8, build-depends: binary >= 0.5 && < 0.8,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment