mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +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.
|
||||
-> Store (LocationFor a) a -- ^ The store to trace addresses through.
|
||||
-> Live (LocationFor a) a -- ^ The set of addresses reachable from the root set.
|
||||
reachable roots store = go roots mempty
|
||||
where go set seen = case liveSplit set of
|
||||
reachable roots store = go mempty roots
|
||||
where go seen set = case liveSplit set of
|
||||
Nothing -> seen
|
||||
Just (a, as)
|
||||
| Just values <- storeLookupAll a store -> go (liveDifference (foldr ((<>) . valueRoots) mempty values <> as) seen) (liveInsert a seen)
|
||||
| otherwise -> go seen (liveInsert a seen)
|
||||
| Just values <- storeLookupAll a store -> go (liveInsert a seen) (liveDifference (foldr ((<>) . valueRoots) mempty values <> as) seen)
|
||||
| otherwise -> go (liveInsert a seen) seen
|
||||
|
Loading…
Reference in New Issue
Block a user