diff options
-rw-r--r-- | compiler/basicTypes/Module.lhs | 2 | ||||
-rw-r--r-- | compiler/ghc.cabal.in | 7 | ||||
-rw-r--r-- | compiler/main/Packages.lhs | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/compiler/basicTypes/Module.lhs b/compiler/basicTypes/Module.lhs index 080ae47ac9..bd2d119655 100644 --- a/compiler/basicTypes/Module.lhs +++ b/compiler/basicTypes/Module.lhs @@ -367,7 +367,7 @@ rtsPackageId = fsToPackageId (fsLit "rts") thPackageId = fsToPackageId (fsLit "template-haskell") dphSeqPackageId = fsToPackageId (fsLit "dph-seq") dphParPackageId = fsToPackageId (fsLit "dph-par") -thisGhcPackageId = fsToPackageId (fsLit ("ghc-" ++ cProjectVersion)) +thisGhcPackageId = fsToPackageId (fsLit "ghc") interactivePackageId = fsToPackageId (fsLit "interactive") -- | This is the package Id for the current program. It is the default diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index e6f86c97d9..838a908364 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -104,6 +104,13 @@ Library Include-Dirs: . parser utils + if impl( ghc >= 7.9 ) + -- We need to set the package name to ghc (without a version number) + -- as it's magic. But we can't set it for old versions of GHC (e.g. + -- when bootstrapping) because those versions of GHC don't understand + -- that GHC is wired-in. + GHC-Options: -package-name ghc + if flag(stage1) Include-Dirs: stage1 else diff --git a/compiler/main/Packages.lhs b/compiler/main/Packages.lhs index bb2e048cc3..360519e071 100644 --- a/compiler/main/Packages.lhs +++ b/compiler/main/Packages.lhs @@ -481,6 +481,7 @@ findWiredInPackages dflags pkgs = do basePackageId, rtsPackageId, thPackageId, + thisGhcPackageId, dphSeqPackageId, dphParPackageId ] |