Skip to content

Commit

Permalink
Remove base 3 support from bin-package-db
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Lynagh committed Mar 18, 2013
1 parent 01efdd6 commit 0faa8f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Expand Up @@ -36,13 +36,7 @@ readBinPackageDB file
(\err -> error ("While parsing " ++ show file ++ ": " ++ err))

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
#endif

writeBinPackageDB :: Binary m => FilePath -> [InstalledPackageInfo_ m] -> IO ()
writeBinPackageDB file ipis = Bin.encodeFile file ipis
Expand Down
9 changes: 1 addition & 8 deletions libraries/bin-package-db/bin-package-db.cabal
Expand Up @@ -11,18 +11,11 @@ source-repository head
type: darcs
location: http://darcs.haskell.org/ghc

flag base3
default: False

Library {
exposed-modules:
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,
Cabal >= 1.8 && < 1.18
Expand Down

0 comments on commit 0faa8f5

Please sign in to comment.