summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Env.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-03-29 16:54:05 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-01 00:40:07 -0400
commit0219297c874659169507fa67c469d65bb9fabb1b (patch)
treedb583178e0f7942dec42d9b6e4bced6cba348f59 /compiler/GHC/Driver/Env.hs
parent29326979eeb887e97f18bdc7852bb33a5b437362 (diff)
downloadhaskell-0219297c874659169507fa67c469d65bb9fabb1b.tar.gz
Move unit DBs in UnitEnv
Also make the HomeUnit optional to keep the field strict and prepare for UnitEnvs without a HomeUnit (e.g. in Plugins envs, cf #14335).
Diffstat (limited to 'compiler/GHC/Driver/Env.hs')
-rw-r--r--compiler/GHC/Driver/Env.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Env.hs b/compiler/GHC/Driver/Env.hs
index 4bf2d9b72e..105c0a64a0 100644
--- a/compiler/GHC/Driver/Env.hs
+++ b/compiler/GHC/Driver/Env.hs
@@ -85,7 +85,7 @@ runInteractiveHsc :: HscEnv -> Hsc a -> IO a
runInteractiveHsc hsc_env = runHsc (mkInteractiveHscEnv hsc_env)
hsc_home_unit :: HscEnv -> HomeUnit
-hsc_home_unit = ue_home_unit . hsc_unit_env
+hsc_home_unit = unsafeGetHomeUnit . hsc_unit_env
hsc_units :: HscEnv -> UnitState
hsc_units = ue_units . hsc_unit_env