Simon Hengel pushed to branch wip/sol/reexported-error-message at Glasgow Haskell Compiler / GHC Commits: f1e9b87f by Simon Hengel at 2026-06-22T13:52:42+07:00 More refactoring - - - - - 1 changed file: - compiler/GHC/Unit/State.hs Changes: ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -1974,7 +1974,7 @@ lookupModuleWithSuggestions' pkgs mod_map name mb_pn -> (hidden_pkg, x:hidden_mod, unusable, exposed) ModUnusable _ -> (hidden_pkg, hidden_mod, x:unusable, exposed) - ModOrigin { fromOrigUnit, fromHiddenReexport } + ModOrigin { fromOrigUnit = origAvailableUnderSameName, fromHiddenReexport } | originEmpty origin -> (hidden_pkg, hidden_mod, unusable, exposed) | originVisible origin @@ -1983,14 +1983,7 @@ lookupModuleWithSuggestions' pkgs mod_map name mb_pn -> (fromHiddenReexport ++ maybe id (:) origUnit hidden_pkg, hidden_mod, unusable, exposed) where origUnit :: Maybe UnitInfo - origUnit - | origAvailableUnderSameName = lookupUnit pkgs (moduleUnit m) - | otherwise = Nothing - - origAvailableUnderSameName :: Bool - origAvailableUnderSameName = case fromOrigUnit of - Nothing -> False - Just _ -> True + origUnit = origAvailableUnderSameName >> lookupUnit pkgs (moduleUnit m) unit_lookup p = lookupUnit pkgs p `orElse` pprPanic "lookupModuleWithSuggestions" (ppr p <+> ppr name) mod_unit = unit_lookup . moduleUnit View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f1e9b87f029e662323335406801cb571... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f1e9b87f029e662323335406801cb571... You're receiving this email because of your account on gitlab.haskell.org.