mirror of
https://github.com/github/semantic.git
synced 2024-12-20 13:21:59 +03:00
Remove comments
This commit is contained in:
parent
2d071e5090
commit
7e33afef4f
@ -239,34 +239,3 @@ deleteFrame address = Heap . Map.delete address . unHeap
|
||||
-- | The number of frames in the `Heap`.
|
||||
heapSize :: Heap scope address value -> Int
|
||||
heapSize = Map.size . unHeap
|
||||
|
||||
-- -- | Look up the list of values stored for a given address, if any.
|
||||
-- scopeLookupAll :: Ord address => address -> Heap address value -> Maybe [value]
|
||||
-- scopeLookupAll address = fmap toList . scopeLookup address
|
||||
|
||||
-- -- | Append a value onto the cell for a given address, inserting a new cell if none existed.
|
||||
-- scopeInsert :: (Ord address, Ord value) => address -> value -> Scope address value -> Scope address value
|
||||
-- scopeInsert address value = flip snoc (address, value)
|
||||
|
||||
-- -- | Manually insert a cell into the scope at a given address.
|
||||
-- scopeInit :: Ord address => address -> Set value -> Scope address value -> Scope address value
|
||||
-- scopeInit address cell (Scope h) = Scope (Map.insert address cell h)
|
||||
|
||||
-- -- | The number of addresses extant in a 'Scope'.
|
||||
-- scopeSize :: Scope address value -> Int
|
||||
-- scopeSize = Map.size . unScope
|
||||
|
||||
-- -- | Restrict a 'Scope' to only those addresses in the given 'Live' set (in essence garbage collecting the rest).
|
||||
-- scopeRestrict :: Ord address => Scope address value -> Live address -> Scope address value
|
||||
-- scopeRestrict (Scope m) roots = Scope (Map.filterWithKey (\ address _ -> address `liveMember` roots) m)
|
||||
|
||||
-- scopeDelete :: Ord address => address -> Scope address value -> Scope address value
|
||||
-- scopeDelete addr = Scope . Map.delete addr . unScope
|
||||
|
||||
-- instance (Ord address, Ord value) => Reducer (address, value) (Scope address value) where
|
||||
-- unit = Scope . unit
|
||||
-- cons (addr, a) (Scope scope) = Scope (cons (addr, a) scope)
|
||||
-- snoc (Scope scope) (addr, a) = Scope (snoc scope (addr, a))
|
||||
|
||||
-- instance (Show address, Show value) => Show (Scope address value) where
|
||||
-- showsPrec d = showsUnaryWith showsPrec "Scope" d . map (second toList) . Map.pairs . unScope
|
||||
|
Loading…
Reference in New Issue
Block a user