summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore.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/HsToCore.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/HsToCore.hs')
-rw-r--r--compiler/GHC/HsToCore.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/HsToCore.hs b/compiler/GHC/HsToCore.hs
index 3b013850b2..2fd0a9302b 100644
--- a/compiler/GHC/HsToCore.hs
+++ b/compiler/GHC/HsToCore.hs
@@ -120,7 +120,7 @@ deSugar hsc_env
})
= do { let dflags = hsc_dflags hsc_env
- home_unit = mkHomeUnitFromFlags dflags
+ home_unit = hsc_home_unit hsc_env
print_unqual = mkPrintUnqualified
(unitState dflags)
home_unit
@@ -183,7 +183,7 @@ deSugar hsc_env
; let used_names = mkUsedNames tcg_env
pluginModules = map lpModule (cachedPlugins (hsc_dflags hsc_env))
- home_unit = mkHomeUnitFromFlags (hsc_dflags hsc_env)
+ home_unit = hsc_home_unit hsc_env
; deps <- mkDependencies (homeUnitId home_unit)
(map mi_module pluginModules) tcg_env