summaryrefslogtreecommitdiff
path: root/compiler/GHC.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-08-23 17:07:04 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2021-08-23 17:09:56 +0100
commit45db66412de602f94c37051111f84af905a03a67 (patch)
treee09b9e6a45e7ac56b2cc69f52cd336cfefad7f16 /compiler/GHC.hs
parent6e1056038f23995cae33270fe5634d1248932e20 (diff)
downloadhaskell-wip/splice-imports.tar.gz
Splice imports wipwip/splice-imports
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r--compiler/GHC.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs
index 73f3856f82..7259ffcb26 100644
--- a/compiler/GHC.hs
+++ b/compiler/GHC.hs
@@ -1493,7 +1493,7 @@ getNameToInstancesIndex visible_mods mods_to_load = do
let doc = text "Need interface for reporting instances in scope"
in initIfaceTcRn $ mapM_ (loadSysInterface doc) mods
- ; InstEnvs {ie_global, ie_local} <- tcGetInstEnvs
+ ; InstEnvs {ie_global, ie_local_obj, ie_local_tc} <- tcGetInstEnvs
; let visible_mods' = mkModuleSet visible_mods
; (pkg_fie, home_fie) <- tcGetFamInstEnvs
-- We use Data.Sequence.Seq because we are creating left associated
@@ -1501,7 +1501,7 @@ getNameToInstancesIndex visible_mods mods_to_load = do
-- cls_index and fam_index below are adapted from GHC.Tc.Module.lookupInsts
; let cls_index = Map.fromListWith mappend
[ (n, Seq.singleton ispec)
- | ispec <- instEnvElts ie_local ++ instEnvElts ie_global
+ | ispec <- instEnvElts ie_local_tc ++ instEnvElts ie_local_obj ++ instEnvElts ie_global
, instIsVisible visible_mods' ispec
, n <- nameSetElemsStable $ orphNamesOfClsInst ispec
]