Wolfgang Jeltsch pushed to branch wip/jeltsch/improve-closure-property-check at Glasgow Haskell Compiler / GHC
Commits:
-
002c2052
by Wolfgang Jeltsch at 2026-09-14T17:01:35+03:00
1 changed file:
Changes:
| ... | ... | @@ -72,6 +72,7 @@ import GHC.Utils.Logger |
| 72 | 72 | import GHC.Utils.Fingerprint
|
| 73 | 73 | import GHC.Utils.TmpFs
|
| 74 | 74 | import GHC.Utils.Constants
|
| 75 | +import GHC.Utils.Monad (concatMapM)
|
|
| 75 | 76 | import GHC.Utils.Monad.State.Strict
|
| 76 | 77 | |
| 77 | 78 | import GHC.Types.Error
|
| ... | ... | @@ -983,13 +984,10 @@ checkHomeUnitsClosed unit_env |
| 983 | 984 | -- that have not yet been found, using its state to keep track
|
| 984 | 985 | -- of which units have already been considered as sources of
|
| 985 | 986 | -- offending dependencies.
|
| 986 | - collect []
|
|
| 987 | - = pure []
|
|
| 988 | - collect (current_unit_state : remaining_unit_states)
|
|
| 989 | - = (++) <$> collect_for_home_unit
|
|
| 990 | - (unitInfoMap current_unit_state)
|
|
| 991 | - (map (toUnitId . fst) $ explicitUnits $ current_unit_state)
|
|
| 992 | - <*> collect remaining_unit_states
|
|
| 987 | + collect = concatMapM $ \ unit_state ->
|
|
| 988 | + collect_for_home_unit
|
|
| 989 | + (unitInfoMap unit_state)
|
|
| 990 | + (map (toUnitId . fst) $ explicitUnits $ unit_state)
|
|
| 993 | 991 | where
|
| 994 | 992 | |
| 995 | 993 | -- | Collects offending dependencies that are reachable from a particular
|