Wolfgang Jeltsch pushed to branch wip/jeltsch/more-efficient-home-unit-imports-finding at Glasgow Haskell Compiler / GHC
Commits:
-
1f97e7a4
by Wolfgang Jeltsch at 2026-05-12T15:00:34+03:00
1 changed file:
Changes:
| ... | ... | @@ -248,12 +248,10 @@ findImportedModuleNoHsc fc fopts ue home_module_name_providers_map mb_home_unit |
| 248 | 248 | any_home_import :: IO FindResult
|
| 249 | 249 | any_home_import = foldr1 orIfNotFound $
|
| 250 | 250 | home_import :| map home_pkg_import other_fopts
|
| 251 | - {-
|
|
| 252 | - Do not try to be smart and change this to `foldr orIfNotFound
|
|
| 253 | - home_import (map home_pkg_import other_fopts)`, as that would not be the
|
|
| 254 | - same. `home_import` is first because we need to first look within the
|
|
| 255 | - current unit before looking at the other units in order.
|
|
| 256 | - -}
|
|
| 251 | + -- Do not try to be smart and change this to `foldr orIfNotFound home_import
|
|
| 252 | + -- (map home_pkg_import other_fopts)`, as that would not be the same.
|
|
| 253 | + -- `home_import` is first because we need to first look within the current
|
|
| 254 | + -- unit before looking at the other units in order.
|
|
| 257 | 255 | |
| 258 | 256 | pkg_import :: IO FindResult
|
| 259 | 257 | pkg_import = findExposedPackageModule fc fopts unit_state mod_name mb_pkg
|