summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Env.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Env.hs')
-rw-r--r--compiler/GHC/Driver/Env.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Driver/Env.hs b/compiler/GHC/Driver/Env.hs
index 8d9aa961fb..7c51ebf3e2 100644
--- a/compiler/GHC/Driver/Env.hs
+++ b/compiler/GHC/Driver/Env.hs
@@ -49,7 +49,7 @@ import GHC.Core.InstEnv ( ClsInst )
import GHC.Types.Annotations ( Annotation, AnnEnv, mkAnnEnv, plusAnnEnv )
import GHC.Types.CompleteMatch
import GHC.Types.Name
-import GHC.Types.Name.Env
+import GHC.Types.TypeEnv
import GHC.Types.TyThing
import GHC.Builtin.Names ( gHC_PRIM )
@@ -259,10 +259,10 @@ lookupType hsc_env name = do
!ty = if isOneShot (ghcMode (hsc_dflags hsc_env))
-- in one-shot, we don't use the HPT
- then lookupNameEnv pte name
+ then lookupTypeEnv pte name
else case lookupHptByModule hpt mod of
- Just hm -> lookupNameEnv (md_types (hm_details hm)) name
- Nothing -> lookupNameEnv pte name
+ Just hm -> lookupTypeEnv (md_types (hm_details hm)) name
+ Nothing -> lookupTypeEnv pte name
pure ty
-- | Find the 'ModIface' for a 'Module', searching in both the loaded home