summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Utils/Env.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Utils/Env.hs')
-rw-r--r--compiler/GHC/Tc/Utils/Env.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/GHC/Tc/Utils/Env.hs b/compiler/GHC/Tc/Utils/Env.hs
index 04db590f4d..2bcc8af641 100644
--- a/compiler/GHC/Tc/Utils/Env.hs
+++ b/compiler/GHC/Tc/Utils/Env.hs
@@ -146,8 +146,7 @@ lookupGlobal_maybe :: HscEnv -> Name -> IO (MaybeErr MsgDoc TyThing)
lookupGlobal_maybe hsc_env name
= do { -- Try local envt
let mod = icInteractiveModule (hsc_IC hsc_env)
- dflags = hsc_dflags hsc_env
- home_unit = mkHomeUnitFromFlags dflags
+ home_unit = hsc_home_unit hsc_env
tcg_semantic_mod = homeModuleInstantiation home_unit mod
; if nameIsLocalOrFrom tcg_semantic_mod name
@@ -162,7 +161,7 @@ lookupGlobal_maybe hsc_env name
lookupImported_maybe :: HscEnv -> Name -> IO (MaybeErr MsgDoc TyThing)
-- Returns (Failed err) if we can't find the interface file for the thing
lookupImported_maybe hsc_env name
- = do { mb_thing <- lookupTypeHscEnv hsc_env name
+ = do { mb_thing <- lookupType hsc_env name
; case mb_thing of
Just thing -> return (Succeeded thing)
Nothing -> importDecl_maybe hsc_env name