summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-06-04 12:45:01 +0000
committerIan Lynagh <igloo@earth.li>2009-06-04 12:45:01 +0000
commitdb61aebd5ebfb37f434cc8d8a30e1a5c10375002 (patch)
tree93e19f45dfcc3256609d3fb4b82d37afbb390636
parent62e61e0cb686a86e062c830674d50503bc9a79c1 (diff)
downloadhaskell-db61aebd5ebfb37f434cc8d8a30e1a5c10375002.tar.gz
Fix ghc-cabal, so that GHC.Prim gets registered when we install
-rw-r--r--utils/ghc-cabal/ghc-cabal.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/ghc-cabal/ghc-cabal.hs b/utils/ghc-cabal/ghc-cabal.hs
index c9c87649b1..24b25b144a 100644
--- a/utils/ghc-cabal/ghc-cabal.hs
+++ b/utils/ghc-cabal/ghc-cabal.hs
@@ -109,13 +109,12 @@ doInstall ghcpkg ghcpkgconf directory distDir myDestDir myPrefix myLibdir myDocd
defaultMainWithHooksArgs hooks ("register" : "--builddir" : distDir : args)
where
hooks = userHooks {
- copyHook = modHook (copyHook userHooks),
+ copyHook = noGhcPrimHook (modHook (copyHook userHooks)),
regHook = modHook (regHook userHooks)
}
- modHook f pd lbi us flags
- = let
- pd'
+ noGhcPrimHook f pd lbi us flags
+ = let pd'
| packageName pd == PackageName "ghc-prim" =
case library pd of
Just lib ->
@@ -126,7 +125,9 @@ doInstall ghcpkg ghcpkgconf directory distDir myDestDir myPrefix myLibdir myDocd
Nothing ->
error "Expected a library, but none found"
| otherwise = pd
- idts = installDirTemplates lbi
+ in f pd' lbi us flags
+ modHook f pd lbi us flags
+ = let idts = installDirTemplates lbi
idts' = idts { prefix = toPathTemplate myPrefix,
libdir = toPathTemplate myLibdir,
libsubdir = toPathTemplate "$pkgid",
@@ -147,7 +148,7 @@ doInstall ghcpkg ghcpkgconf directory distDir myDestDir myPrefix myLibdir myDocd
installDirTemplates = idts',
withPrograms = progs'
}
- in f pd' lbi' us flags
+ in f pd lbi' us flags
generate :: [String] -> FilePath -> FilePath -> IO ()
generate config_args distdir directory