summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/main/GHC.hs2
-rw-r--r--compiler/main/InteractiveEval.hs14
-rw-r--r--ghc/GHCi/UI.hs2
3 files changed, 9 insertions, 9 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index 53e135c66a..0f7acbfe20 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -112,7 +112,7 @@ module GHC (
moduleIsInterpreted,
getInfo,
showModule,
- isModuleInterpreted,
+ moduleIsBootOrNotObjectLinkable,
-- ** Inspecting types and kinds
exprType, TcRnExprMode(..),
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs
index 1fa269825d..0d83b482bb 100644
--- a/compiler/main/InteractiveEval.hs
+++ b/compiler/main/InteractiveEval.hs
@@ -31,7 +31,7 @@ module InteractiveEval (
typeKind,
parseName,
showModule,
- isModuleInterpreted,
+ moduleIsBootOrNotObjectLinkable,
parseExpr, compileParsedExpr,
compileExpr, dynCompileExpr,
compileExprRemote, compileParsedExprRemote,
@@ -901,17 +901,17 @@ dynCompileExpr expr = do
showModule :: GhcMonad m => ModSummary -> m String
showModule mod_summary =
withSession $ \hsc_env -> do
- interpreted <- isModuleInterpreted mod_summary
+ interpreted <- moduleIsBootOrNotObjectLinkable mod_summary
let dflags = hsc_dflags hsc_env
return (showModMsg dflags (hscTarget dflags) interpreted mod_summary)
-isModuleInterpreted :: GhcMonad m => ModSummary -> m Bool
-isModuleInterpreted mod_summary = withSession $ \hsc_env ->
+moduleIsBootOrNotObjectLinkable :: GhcMonad m => ModSummary -> m Bool
+moduleIsBootOrNotObjectLinkable mod_summary = withSession $ \hsc_env ->
case lookupHpt (hsc_HPT hsc_env) (ms_mod_name mod_summary) of
Nothing -> panic "missing linkable"
- Just mod_info -> return (not obj_linkable)
- where
- obj_linkable = isObjectLinkable (expectJust "showModule" (hm_linkable mod_info))
+ Just mod_info -> return $ case hm_linkable mod_info of
+ Nothing -> True
+ Just linkable -> not (isObjectLinkable linkable)
----------------------------------------------------------------------------
-- RTTI primitives
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 52a809ea3d..6954002645 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -1801,7 +1801,7 @@ modulesLoadedMsg ok mods = do
dflags <- getDynFlags
unqual <- GHC.getPrintUnqual
let mod_name mod = do
- is_interpreted <- GHC.isModuleInterpreted mod
+ is_interpreted <- GHC.moduleIsBootOrNotObjectLinkable mod
return $ if is_interpreted
then ppr (GHC.ms_mod mod)
else ppr (GHC.ms_mod mod)