diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-10-11 11:03:10 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-10-14 21:40:49 -0700 |
commit | b92a51f5e235fc22a9ae0d76735b50f095665fb7 (patch) | |
tree | 27eb41de475255206185e68c535c2d899012fa1b /ghc | |
parent | 5b0191f74ab05b187f81ea037623338a615b1619 (diff) | |
download | haskell-b92a51f5e235fc22a9ae0d76735b50f095665fb7.tar.gz |
Rename package key to unit ID, and installed package ID to component ID.
Comes with Haddock submodule update.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/InteractiveUI.hs | 8 | ||||
-rw-r--r-- | ghc/Main.hs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 80c1483863..f3d2035b05 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -1720,8 +1720,8 @@ isSafeModule m = do mname = GHC.moduleNameString $ GHC.moduleName m packageTrusted dflags md - | thisPackage dflags == modulePackageKey md = True - | otherwise = trusted $ getPackageDetails dflags (modulePackageKey md) + | thisPackage dflags == moduleUnitId md = True + | otherwise = trusted $ getPackageDetails dflags (moduleUnitId md) tallyPkgs dflags deps | not (packageTrustOn dflags) = ([], []) | otherwise = partition part deps @@ -3255,7 +3255,7 @@ lookupModuleName :: GHC.GhcMonad m => ModuleName -> m Module lookupModuleName mName = GHC.lookupModule mName Nothing isHomeModule :: Module -> Bool -isHomeModule m = GHC.modulePackageKey m == mainPackageKey +isHomeModule m = GHC.moduleUnitId m == mainUnitId -- TODO: won't work if home dir is encoded. -- (changeDirectory may not work either in that case.) @@ -3279,7 +3279,7 @@ wantInterpretedModuleName modname = do modl <- lookupModuleName modname let str = moduleNameString modname dflags <- getDynFlags - when (GHC.modulePackageKey modl /= thisPackage dflags) $ + when (GHC.moduleUnitId modl /= thisPackage dflags) $ throwGhcException (CmdLineError ("module '" ++ str ++ "' is from another package;\nthis command requires an interpreted module")) is_interpreted <- GHC.moduleIsInterpreted modl when (not is_interpreted) $ diff --git a/ghc/Main.hs b/ghc/Main.hs index 9fb0718f13..4ef44f20ca 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -839,8 +839,8 @@ Generates a combined hash of the ABI for modules Data.Foo and System.Bar. The modules must already be compiled, and appropriate -i options may be necessary in order to find the .hi files. -This is used by Cabal for generating the InstalledPackageId for a -package. The InstalledPackageId must change when the visible ABI of +This is used by Cabal for generating the ComponentId for a +package. The ComponentId must change when the visible ABI of the package chagnes, so during registration Cabal calls ghc --abi-hash to get a hash of the package's ABI. -} |