You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -430,7 +431,14 @@ mkHiFileResultNoCompile session tcm = do
430
431
details <- makeSimpleDetails hsc_env_tmp tcGblEnv
431
432
sf <- finalSafeMode (ms_hspp_opts ms) tcGblEnv
432
433
iface' <- mkIfaceTc hsc_env_tmp sf details ms Nothing tcGblEnv
433
-
let iface = iface' { mi_globals =Nothing, mi_usages = filterUsages (mi_usages iface') } -- See Note [Clearing mi_globals after generating an iface]
434
+
#if MIN_VERSION_ghc(9,11,0)
435
+
let iface = set_mi_top_env Nothing iface'
436
+
-- todo: 9.12, since usages are not expose anymore, we can't update mi_usages.
437
+
#else
438
+
let iface = iface' {
439
+
mi_globals =Nothing
440
+
, mi_usages = filterUsages (mi_usages iface') } -- See Note [Clearing mi_globals after generating an iface]
441
+
#endif
434
442
pure$! mkHiFileResult ms iface details (tmrRuntimeModules tcm) Nothing
435
443
436
444
mkHiFileResultCompile
@@ -462,7 +470,13 @@ mkHiFileResultCompile se session' tcm simplified_guts = catchErrs $ do
462
470
#if MIN_VERSION_ghc(9,4,2)
463
471
Nothing
464
472
#endif
465
-
let final_iface = final_iface' {mi_globals =Nothing, mi_usages = filterUsages (mi_usages final_iface')} -- See Note [Clearing mi_globals after generating an iface]
473
+
let final_iface = final_iface' {
474
+
#if MIN_VERSION_ghc(9,11,0)
475
+
mi_top_env =Nothing
476
+
#else
477
+
mi_globals =Nothing
478
+
#endif
479
+
, mi_usages = filterUsages (mi_usages final_iface')} -- See Note [Clearing mi_globals after generating an iface]
0 commit comments