diff options
author | Ben Gamari <ben@smart-cactus.org> | 2016-07-19 07:39:56 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-07-19 13:01:26 +0200 |
commit | fe94e90944161e3938c9a755fd78875cb05377c7 (patch) | |
tree | 63eb7203e9c3318308e233928ce3e0a7e4ebcc55 /compiler/iface/TcIface.hs | |
parent | 3822b65f851e1454838a4f4f65a6cc5140d39be8 (diff) | |
download | haskell-wip/lazy-instance-matching.tar.gz |
InstEnv: Ensure that instance visibility check is lazywip/lazy-instance-matching
Previously instIsVisible had completely broken the laziness of
lookupInstEnv' since it would examine is_dfun_name to check the name of
the defining module (to know whether it is an interactive module). This
resulted in the visibility check drawing in an interface file
unnecessarily.
Diffstat (limited to 'compiler/iface/TcIface.hs')
-rw-r--r-- | compiler/iface/TcIface.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs index f366c516cd..6fda93d2d3 100644 --- a/compiler/iface/TcIface.hs +++ b/compiler/iface/TcIface.hs @@ -651,13 +651,13 @@ look at it. -} tcIfaceInst :: IfaceClsInst -> IfL ClsInst -tcIfaceInst (IfaceClsInst { ifDFun = dfun_occ, ifOFlag = oflag +tcIfaceInst (IfaceClsInst { ifDFun = dfun_name, ifOFlag = oflag , ifInstCls = cls, ifInstTys = mb_tcs , ifInstOrph = orph }) - = do { dfun <- forkM (text "Dict fun" <+> ppr dfun_occ) $ - tcIfaceExtId dfun_occ + = do { dfun <- forkM (text "Dict fun" <+> ppr dfun_name) $ + tcIfaceExtId dfun_name ; let mb_tcs' = map (fmap ifaceTyConName) mb_tcs - ; return (mkImportedInstance cls mb_tcs' dfun oflag orph) } + ; return (mkImportedInstance cls mb_tcs' dfun_name dfun oflag orph) } tcIfaceFamInst :: IfaceFamInst -> IfL FamInst tcIfaceFamInst (IfaceFamInst { ifFamInstFam = fam, ifFamInstTys = mb_tcs |