
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 0ddd0fdc by soulomoon at 2025-09-28T19:24:10-04:00 Remove hptAllInstances usage during upsweep Previously, during the upsweep phase when checking safe imports, we were loading the module interface with runTcInteractive, which in turn calls hptAllInstances. This accesses non-below modules from the home package table. Change the implementation of checkSafeImports to use initTcWithGbl and loadSysInterface to load the module interface, since we already have TcGblEnv at hand. This eliminates the unnecessary use of runTcInteractive and hptAllInstances during the upsweep phase. - - - - - 1 changed file: - compiler/GHC/Driver/Main.hs Changes: ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -165,7 +165,7 @@ import GHC.JS.Syntax import GHC.IfaceToCore ( typecheckIface, typecheckWholeCoreBindings ) -import GHC.Iface.Load ( ifaceStats, writeIface, flagsToIfCompression, getGhcPrimIface ) +import GHC.Iface.Load ( ifaceStats, writeIface, flagsToIfCompression, getGhcPrimIface, loadSysInterface ) import GHC.Iface.Make import GHC.Iface.Recomp import GHC.Iface.Tidy @@ -1765,7 +1765,7 @@ hscCheckSafe' m l = do -- so we need to call 'getModuleInterface' to load from disk case iface of Just _ -> return iface - Nothing -> snd `fmap` (liftIO $ getModuleInterface hsc_env m) + Nothing -> liftIO $ initIfaceLoad hsc_env (Just <$> loadSysInterface (text "checkSafeImports") m) -- | Check the list of packages are trusted. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0ddd0fdcdeac0eed4b5ce132e8af6d83... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0ddd0fdcdeac0eed4b5ce132e8af6d83... You're receiving this email because of your account on gitlab.haskell.org.