1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00
This commit is contained in:
Rob Rix 2017-12-21 13:29:40 -05:00
parent cebc231049
commit 580ab01134

View File

@ -26,6 +26,7 @@ evCollect ev0 ev' yield e = do
modifyStore (gc (roots <> valueRoots v))
pure v
-- | Collect any addresses in the store not rooted in the given 'Live' set.
gc :: (Ord (LocationFor a), Foldable (Cell (LocationFor a)), ValueRoots (LocationFor a) a) => Live (LocationFor a) a -> Store (LocationFor a) a -> Store (LocationFor a) a
gc roots store = storeRestrict store (reachable roots store)