Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
c0764c69
by Hannes Siebenhandl at 2026-11-22T16:39:04-05:00
4 changed files:
- compiler/GHC/Driver/Downsweep.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Recomp.hs
Changes:
| ... | ... | @@ -415,7 +415,7 @@ downsweepInteractiveImports hsc_env ic = unsafeInterleaveIO $ do |
| 415 | 415 | downsweepInstalledModules :: HscEnv -> [Module] -> IO ModuleGraph
|
| 416 | 416 | downsweepInstalledModules hsc_env mods = do
|
| 417 | 417 | let
|
| 418 | - (home_mods, external_mods) = partition (\u -> moduleUnitId u `elem` hsc_all_home_unit_ids hsc_env) mods
|
|
| 418 | + (home_mods, external_mods) = partition (\u -> moduleUnitId u `Set.member` hsc_all_home_unit_ids hsc_env) mods
|
|
| 419 | 419 | installed_mods = map (fst . getModuleInstantiation) home_mods
|
| 420 | 420 | external_uids = map moduleUnitId external_mods
|
| 421 | 421 |
| ... | ... | @@ -424,7 +424,7 @@ load how_much = loadWithCache noIfaceCache mkUnknownDiagnostic how_much |
| 424 | 424 | |
| 425 | 425 | mkBatchMsg :: HscEnv -> Messager
|
| 426 | 426 | mkBatchMsg hsc_env =
|
| 427 | - if length (hsc_all_home_unit_ids hsc_env) > 1
|
|
| 427 | + if Set.size (hsc_all_home_unit_ids hsc_env) > 1
|
|
| 428 | 428 | -- This also displays what unit each module is from.
|
| 429 | 429 | then batchMultiMsg
|
| 430 | 430 | else batchMsg
|
| ... | ... | @@ -150,6 +150,7 @@ import Control.Monad |
| 150 | 150 | import qualified Data.Foldable as Foldable
|
| 151 | 151 | import Data.Function ((&))
|
| 152 | 152 | import Data.Map ( toList )
|
| 153 | +import qualified Data.Set as Set
|
|
| 153 | 154 | import System.FilePath
|
| 154 | 155 | import System.Directory
|
| 155 | 156 | |
| ... | ... | @@ -843,7 +844,7 @@ loadInterface doc_str mod from |
| 843 | 844 | -- overlapping instances.
|
| 844 | 845 | ; massertPpr
|
| 845 | 846 | ((isOneShot (ghcMode (hsc_dflags hsc_env)))
|
| 846 | - || moduleUnitId mod `notElem` hsc_all_home_unit_ids hsc_env
|
|
| 847 | + || moduleUnitId mod `Set.notMember` hsc_all_home_unit_ids hsc_env
|
|
| 847 | 848 | || mod == gHC_PRIM)
|
| 848 | 849 | (text "Attempting to load home package interface into the EPS" $$ ppr (HUG.allUnits hug) $$ doc_str $$ ppr mod $$ ppr (moduleUnitId mod))
|
| 849 | 850 | ; ignore_prags <- goptM Opt_IgnoreInterfacePragmas
|
| ... | ... | @@ -668,7 +668,7 @@ checkDependencies hsc_env summary iface |
| 668 | 668 | (Set.map ((SpliceLevel),) (dep_plugin_pkgs (mi_deps iface))))
|
| 669 | 669 | |
| 670 | 670 | classify st _ (Found _ mod)
|
| 671 | - | (toUnitId $ moduleUnit mod) `elem` all_home_units = Right (Left ((st, toUnitId $ moduleUnit mod, moduleName mod)))
|
|
| 671 | + | toUnitId (moduleUnit mod) `Set.member` all_home_units = Right (Left ((st, toUnitId $ moduleUnit mod, moduleName mod)))
|
|
| 672 | 672 | | otherwise = Right (Right (moduleNameFS (moduleName mod), (st, toUnitId $ moduleUnit mod)))
|
| 673 | 673 | classify _ reason _ = Left (RecompBecause reason)
|
| 674 | 674 |