mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Swap the order of the parameters to go.
This commit is contained in:
parent
d19d5ad691
commit
5b29967262
@ -44,9 +44,9 @@ reachable :: ( Ord (LocationFor a)
|
|||||||
=> Live (LocationFor a) a -- ^ The set of root addresses.
|
=> Live (LocationFor a) a -- ^ The set of root addresses.
|
||||||
-> Store (LocationFor a) a -- ^ The store to trace addresses through.
|
-> Store (LocationFor a) a -- ^ The store to trace addresses through.
|
||||||
-> Live (LocationFor a) a -- ^ The set of addresses reachable from the root set.
|
-> Live (LocationFor a) a -- ^ The set of addresses reachable from the root set.
|
||||||
reachable roots store = go roots mempty
|
reachable roots store = go mempty roots
|
||||||
where go set seen = case liveSplit set of
|
where go seen set = case liveSplit set of
|
||||||
Nothing -> seen
|
Nothing -> seen
|
||||||
Just (a, as)
|
Just (a, as)
|
||||||
| Just values <- storeLookupAll a store -> go (liveDifference (foldr ((<>) . valueRoots) mempty values <> as) seen) (liveInsert a seen)
|
| Just values <- storeLookupAll a store -> go (liveInsert a seen) (liveDifference (foldr ((<>) . valueRoots) mempty values <> as) seen)
|
||||||
| otherwise -> go seen (liveInsert a seen)
|
| otherwise -> go (liveInsert a seen) seen
|
||||||
|
Loading…
Reference in New Issue
Block a user