summaryrefslogtreecommitdiff
path: root/compiler/main/HscMain.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/HscMain.hs')
-rw-r--r--compiler/main/HscMain.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index 9bb6b4e391..98b527f3eb 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -195,6 +195,7 @@ newHscEnv dflags = do
us <- mkSplitUniqSupply 'r'
nc_var <- newIORef (initNameCache us knownKeyNames)
fc_var <- newIORef emptyInstalledModuleEnv
+ ext_fs <- newIORef emptyExtensibleFields
iserv_mvar <- newMVar Nothing
emptyDynLinker <- uninitializedLinker
return HscEnv { hsc_dflags = dflags
@@ -205,6 +206,7 @@ newHscEnv dflags = do
, hsc_EPS = eps_var
, hsc_NC = nc_var
, hsc_FC = fc_var
+ , hsc_ext_fields = ext_fs
, hsc_type_env_var = Nothing
, hsc_iserv = iserv_mvar
, hsc_dynLinker = emptyDynLinker
@@ -833,11 +835,10 @@ finish summary tc_result mb_old_hash = do
(cg_guts, details) <- {-# SCC "CoreTidy" #-}
liftIO $ tidyProgram hsc_env desugared_guts
- let !partial_iface =
- {-# SCC "HscMain.mkPartialIface" #-}
+ !partial_iface <- {-# SCC "HscMain.mkPartialIface" #-}
-- This `force` saves 2M residency in test T10370
-- See Note [Avoiding space leaks in toIface*] for details.
- force (mkPartialIface hsc_env details desugared_guts)
+ liftIO $ force <$> (mkPartialIface hsc_env details desugared_guts)
return ( HscRecomp { hscs_guts = cg_guts,
hscs_mod_location = ms_location summary,