@@ -986,7 +986,7 @@ loadModulesHome
986986 -> HscEnv
987987loadModulesHome mod_infos e =
988988#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 })
990990#else
991991 let ! new_modules = addListToHpt (hsc_HPT e) [(mod_name x, x) | x <- mod_infos]
992992 in e { hsc_HPT = new_modules
@@ -1454,18 +1454,6 @@ loadInterface session ms linkableNeeded RecompilationInfo{..} = do
14541454
14551455 case (mb_checked_iface, recomp_iface_reqd) of
14561456 (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
14691457 details <- liftIO $ mkDetailsFromIface sessionWithMsDynFlags iface
14701458 -- parse the runtime dependencies from the annotations
14711459 let runtime_deps
@@ -1552,7 +1540,7 @@ showReason (RecompBecause s) = s
15521540mkDetailsFromIface :: HscEnv -> ModIface -> IO ModDetails
15531541mkDetailsFromIface session iface = do
15541542 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
15561544 initIfaceLoad hsc' (typecheckIface iface)
15571545
15581546coreFileToCgGuts :: HscEnv -> ModIface -> ModDetails -> CoreFile -> IO CgGuts
0 commit comments