Rodrigo Mesquita pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC Commits: 0773f283 by Rodrigo Mesquita at 2026-06-25T12:34:00+01:00 At least make use of the module being cached! - - - - - 1 changed file: - compiler/GHC/Iface/Load.hs Changes: ===================================== compiler/GHC/Iface/Load.hs ===================================== @@ -370,16 +370,20 @@ checkKnownKeyNamesIface known_key_names_occ_map -- | Lookup the module exporting the canonical known-entities definitions (GHC.Essentials) lookupKnownKeysModule :: HscEnv -> DynFlags {-^ Module dyn flags -} -> IO (Maybe Module) lookupKnownKeysModule hsc_env dflags = do - found_essentials <- findImportedModule hsc_env eSSENTIALS_NAME NoPkgQual - let rebindable_kn = gopt Opt_RebindableKnownNames dflags - let essentials_uid - | rebindable_kn = return Nothing - | Found _ mod <- found_essentials = return (Just mod) - | fr <- found_essentials = do - throwOneError (initSourceErrorContext dflags) $ - mkPlainErrorMsgEnvelope noSrcSpan $ GhcDriverMessage $ DriverInterfaceError $ - CantFindEssentials (cannotFindModule hsc_env eSSENTIALS_NAME fr) LookingForEssentialsModule - essentials_uid + eps <- hscEPS hsc_env + case eps_known_keys eps of + Just (_, kk_mod) -> return (Just kk_mod) + Nothing -> do + found_essentials <- findImportedModule hsc_env eSSENTIALS_NAME NoPkgQual + let rebindable_kn = gopt Opt_RebindableKnownNames dflags + let essentials_uid + | rebindable_kn = return Nothing + | Found _ mod <- found_essentials = return (Just mod) + | fr <- found_essentials = do + throwOneError (initSourceErrorContext dflags) $ + mkPlainErrorMsgEnvelope noSrcSpan $ GhcDriverMessage $ DriverInterfaceError $ + CantFindEssentials (cannotFindModule hsc_env eSSENTIALS_NAME fr) LookingForEssentialsModule + essentials_uid {- ********************************************************************* * * View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0773f2836fa925f24bc2dc43904c0018... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0773f2836fa925f24bc2dc43904c0018... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Rodrigo Mesquita (@alt-romes)