[Git][ghc/ghc][wip/eps-hpt] disaster area
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Thu Feb 20 12:49:45 UTC 2025
Matthew Pickering pushed to branch wip/eps-hpt at Glasgow Haskell Compiler / GHC
Commits:
30fc2018 by Matthew Pickering at 2025-02-20T12:49:36+00:00
disaster area
- - - - -
1 changed file:
- compiler/GHC/Tc/Instance/Family.hs
Changes:
=====================================
compiler/GHC/Tc/Instance/Family.hs
=====================================
@@ -34,7 +34,9 @@ import GHC.Tc.Utils.TcType
import GHC.Unit.External
import GHC.Unit.Module
import GHC.Unit.Module.ModIface
+import GHC.Unit.Module.ModDetails
import GHC.Unit.Module.Deps
+import GHC.Unit.Home.ModInfo
import GHC.Types.SrcLoc as SrcLoc
import GHC.Types.Name.Reader
@@ -405,9 +407,12 @@ getFamInsts :: ModuleEnv FamInstEnv -> Module -> TcM FamInstEnv
getFamInsts hpt_fam_insts mod
| Just env <- lookupModuleEnv hpt_fam_insts mod = return env
| otherwise = do { _ <- initIfaceTcRn (loadSysInterface doc mod)
- ; eps <- getEps
- ; return (expectJust "checkFamInstConsistency" $
- lookupModuleEnv (eps_mod_fam_inst_env eps) mod) }
+ ; (eps, hug) <- getEpsAndHug
+ ; hug_res <- liftIO $ HUG.lookupHugByModule mod hug
+ ; case hug_res of
+ Just hmi -> return $ extendFamInstEnvList emptyFamInstEnv (md_fam_insts (hm_details hmi))
+ Nothing -> return (expectJust "checkFamInstConsistency" $
+ lookupModuleEnv (eps_mod_fam_inst_env eps) mod) }
where
doc = ppr mod <+> text "is a family-instance module"
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/30fc201865dd7e8b2a80857540cc007173a904d0
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/30fc201865dd7e8b2a80857540cc007173a904d0
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250220/e0595156/attachment-0001.html>
More information about the ghc-commits
mailing list