1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Eta-expand the definition of storeInsert.

This commit is contained in:
Rob Rix 2017-12-20 17:18:54 -05:00
parent 1ea1d1e0ca
commit fd14bb4672

View File

@ -33,7 +33,7 @@ storeLookupAll :: (Ord l, Foldable (Cell l)) => Address l a -> Store l a -> Mayb
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 = (((Store .) . (. unStore)) .) . (. point) . Map.insertWith (<>) . unAddress
storeInsert (Address address) value = Store . Map.insertWith (<>) address (point value) . unStore
storeSize :: Store l a -> Int
storeSize = Map.size . unStore