@@ -991,7 +991,7 @@ loadModulesHome
991
991
-> HscEnv
992
992
loadModulesHome mod_infos e =
993
993
#if MIN_VERSION_ghc(9,3,0)
994
- hscUpdateHUG (\ hug -> foldr addHomeModInfoToHug hug mod_infos) (e { hsc_type_env_vars = emptyKnotVars })
994
+ hscUpdateHUG (\ hug -> foldl' ( flip addHomeModInfoToHug) hug mod_infos) (e { hsc_type_env_vars = emptyKnotVars })
995
995
#else
996
996
let ! new_modules = addListToHpt (hsc_HPT e) [(mod_name x, x) | x <- mod_infos]
997
997
in e { hsc_HPT = new_modules
@@ -1455,18 +1455,6 @@ loadInterface session ms linkableNeeded RecompilationInfo{..} = do
1455
1455
1456
1456
case (mb_checked_iface, recomp_iface_reqd) of
1457
1457
(Just iface, UpToDate ) -> do
1458
- -- If we have an old value, just return it
1459
- case old_value of
1460
- Just (old_hir, _)
1461
- | isNothing linkableNeeded || isJust (hirCoreFp old_hir)
1462
- -> do
1463
- -- Perform the fine grained recompilation check for TH
1464
- maybe_recomp <- checkLinkableDependencies get_linkable_hashes (hsc_mod_graph sessionWithMsDynFlags) (hirRuntimeModules old_hir)
1465
- case maybe_recomp of
1466
- Just msg -> do_regenerate msg
1467
- Nothing -> return ([] , Just old_hir)
1468
- -- Otherwise use the value from disk, provided the core file is up to date if required
1469
- _ -> do
1470
1458
details <- liftIO $ mkDetailsFromIface sessionWithMsDynFlags iface
1471
1459
-- parse the runtime dependencies from the annotations
1472
1460
let runtime_deps
@@ -1553,7 +1541,7 @@ showReason (RecompBecause s) = s
1553
1541
mkDetailsFromIface :: HscEnv -> ModIface -> IO ModDetails
1554
1542
mkDetailsFromIface session iface = do
1555
1543
fixIO $ \ details -> do
1556
- let hsc' = hscUpdateHPT (\ hpt -> addToHpt hpt (moduleName $ mi_module iface) (HomeModInfo iface details Nothing )) session
1544
+ let ! hsc' = hscUpdateHPT (\ hpt -> addToHpt hpt (moduleName $ mi_module iface) (HomeModInfo iface details Nothing )) session
1557
1545
initIfaceLoad hsc' (typecheckIface iface)
1558
1546
1559
1547
coreFileToCgGuts :: HscEnv -> ModIface -> ModDetails -> CoreFile -> IO CgGuts
0 commit comments