summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface/Make.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/Iface/Make.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/Iface/Make.hs')
-rw-r--r--compiler/GHC/Iface/Make.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Make.hs b/compiler/GHC/Iface/Make.hs
index 941aa4083c..cdcf80bb1f 100644
--- a/compiler/GHC/Iface/Make.hs
+++ b/compiler/GHC/Iface/Make.hs
@@ -172,7 +172,7 @@ mkIfaceTc hsc_env safe_mode mod_details
= do
let used_names = mkUsedNames tc_result
let pluginModules = map lpModule (cachedPlugins (hsc_dflags hsc_env))
- let home_unit = mkHomeUnitFromFlags (hsc_dflags hsc_env)
+ let home_unit = hsc_home_unit hsc_env
deps <- mkDependencies (homeUnitId home_unit)
(map mi_module pluginModules) tc_result
let hpc_info = emptyHpcInfo other_hpc_info
@@ -228,7 +228,7 @@ mkIface_ hsc_env
-- to expose in the interface
= do
- let home_unit = mkHomeUnitFromFlags (hsc_dflags hsc_env)
+ let home_unit = hsc_home_unit hsc_env
semantic_mod = homeModuleNameInstantiation home_unit (moduleName this_mod)
entities = typeEnvElts type_env
show_linear_types = xopt LangExt.LinearTypes (hsc_dflags hsc_env)