diff options
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/InteractiveUI.hs | 9 | ||||
-rw-r--r-- | ghc/Main.hs | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index 2dcedb0b0b..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 @@ -3214,7 +3214,6 @@ showException se = -- omit the location for CmdLineError: Just (CmdLineError s) -> putException s -- ditto: - Just ph@(PhaseFailed {}) -> putException (showGhcException ph "") Just other_ghc_ex -> putException (show other_ghc_ex) Nothing -> case fromException se of @@ -3256,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.) @@ -3280,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 7ca7481fc3..4ef44f20ca 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -330,7 +330,7 @@ checkOptions mode dflags srcs objs = do when ((filter (not . wayRTSOnly) (ways dflags) /= interpWays) && isInterpretiveMode mode) $ do throwGhcException (UsageError - "--interactive can't be used with -prof.") + "--interactive can't be used with -prof or -static.") -- -ohi sanity check if (isJust (outputHi dflags) && (isCompManagerMode mode || srcs `lengthExceeds` 1)) @@ -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. -} |