mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Eta-expand the definition of storeInsert.
This commit is contained in:
parent
1ea1d1e0ca
commit
fd14bb4672
@ -33,7 +33,7 @@ storeLookupAll :: (Ord l, Foldable (Cell l)) => Address l a -> Store l a -> Mayb
|
|||||||
storeLookupAll address = fmap toList . storeLookup address
|
storeLookupAll address = fmap toList . storeLookup address
|
||||||
|
|
||||||
storeInsert :: (Ord l, Semigroup (Cell l a), Pointed (Cell l)) => Address l a -> a -> Store l a -> Store l a
|
storeInsert :: (Ord l, Semigroup (Cell l a), Pointed (Cell l)) => Address l a -> a -> Store l a -> Store l a
|
||||||
storeInsert = (((Store .) . (. unStore)) .) . (. point) . Map.insertWith (<>) . unAddress
|
storeInsert (Address address) value = Store . Map.insertWith (<>) address (point value) . unStore
|
||||||
|
|
||||||
storeSize :: Store l a -> Int
|
storeSize :: Store l a -> Int
|
||||||
storeSize = Map.size . unStore
|
storeSize = Map.size . unStore
|
||||||
|
Loading…
Reference in New Issue
Block a user