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