1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Define insertion into live sets.

This commit is contained in:
Rob Rix 2017-12-01 14:28:35 -05:00
parent 3b315112dc
commit 07ec5e3238

View File

@ -16,6 +16,9 @@ newtype Live l v = Live { unLive :: Set (Address l v) }
singleton :: Address l v -> Live l v
singleton = Live . Set.singleton
insert :: Ord l => Address l v -> Live l v -> Live l v
insert addr = Live . Set.insert addr . unLive
delete :: Ord l => Address l v -> Live l v -> Live l v
delete addr = Live . Set.delete addr . unLive