summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Module.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-10-08 16:46:51 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-10-09 08:55:21 -0400
commit6a243e9daaa6c17c0859f47ae3a098e680aa28cf (patch)
tree170e2a707534c1bc4c45abd11ae2438c39c6274d /compiler/GHC/Tc/Module.hs
parentdb236ffc03e5e17f71295469040da96b03ec2f87 (diff)
downloadhaskell-6a243e9daaa6c17c0859f47ae3a098e680aa28cf.tar.gz
Cache HomeUnit in HscEnv (#17957)
Instead of recreating the HomeUnit from the DynFlags every time we need it, we store it in the HscEnv.
Diffstat (limited to 'compiler/GHC/Tc/Module.hs')
-rw-r--r--compiler/GHC/Tc/Module.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index 0df9de0480..b83a4bee8e 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -184,7 +184,7 @@ tcRnModule hsc_env mod_sum save_rn_syntax
where
hsc_src = ms_hsc_src mod_sum
dflags = hsc_dflags hsc_env
- home_unit = mkHomeUnitFromFlags dflags
+ home_unit = hsc_home_unit hsc_env
err_msg = mkPlainErrMsg dflags loc $
text "Module does not have a RealSrcSpan:" <+> ppr this_mod
@@ -2832,7 +2832,7 @@ loadUnqualIfaces hsc_env ictxt
= initIfaceTcRn $ do
mapM_ (loadSysInterface doc) (moduleSetElts (mkModuleSet unqual_mods))
where
- home_unit = mkHomeUnitFromFlags (hsc_dflags hsc_env)
+ home_unit = hsc_home_unit hsc_env
unqual_mods = [ nameModule name
| gre <- globalRdrEnvElts (ic_rn_gbl_env ictxt)