From 520f6845fcd99ebb1ec93a81901117145c93f119 Mon Sep 17 00:00:00 2001 From: Lennart Kolmodin Date: Tue, 30 Mar 2010 22:22:53 +0000 Subject: Patched dev-haskell/haddock-2.4.2 to work with both dev-haskell/cabal-1.6* and cabal-1.8*. Package-Manager: portage-2.1.7.17/cvs/Linux x86_64 --- dev-haskell/haddock/files/haddock-2.4.2-Setup.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'dev-haskell/haddock/files') diff --git a/dev-haskell/haddock/files/haddock-2.4.2-Setup.hs b/dev-haskell/haddock/files/haddock-2.4.2-Setup.hs index 31ee04eb8168..19b2c5ba3a5e 100644 --- a/dev-haskell/haddock/files/haddock-2.4.2-Setup.hs +++ b/dev-haskell/haddock/files/haddock-2.4.2-Setup.hs @@ -1,6 +1,8 @@ {- Setup.hs: based on code from ghc-paths of Simon Marlow Fixed to not use the .buildinfo, and use -Dfoo flags for both libraries and executables + +Modified 2010-03-30 to work with both cabal-1.6 and cabal-1.8. See bug #302489. -} import Distribution.Simple import Distribution.Simple.Setup @@ -20,12 +22,18 @@ main = defaultMainWithHooks simpleUserHooks { confHook = myCustomConfHook } where +{- With cabal-1.6, myCustomConfHook has this type myCustomConfHook :: (Either GenericPackageDescription PackageDescription, HookedBuildInfo) -> ConfigFlags -> IO LocalBuildInfo - myCustomConfHook egpdpdhbi flags = do + With cabal-1.8, myCustomConfHook has this type + myCustomConfHook :: (GenericPackageDescription, HookedBuildInfo) + +So, better to not specify the type at all as we're not required to... +-} + myCustomConfHook gpd flags = do -- get the default LBI - lbi <- confHook simpleUserHooks egpdpdhbi flags + lbi <- confHook simpleUserHooks gpd flags let programs = withPrograms lbi libdir_ <- rawSystemProgramStdoutConf (fromFlag (configVerbosity flags)) -- cgit v1.2.3-65-gdbad