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

Eta-expand storeLookup.

This commit is contained in:
Rob Rix 2017-12-20 17:16:39 -05:00
parent ba6d00f900
commit 26946fce96

View File

@ -25,7 +25,7 @@ deriving instance Functor (Cell l) => Functor (Store l)
deriving instance Traversable (Cell l) => Traversable (Store l)
storeLookup :: Ord l => Address l a -> Store l a -> Maybe (Cell l a)
storeLookup = (. unStore) . Map.lookup . unAddress
storeLookup (Address address) = Map.lookup address . unStore
storeLookupAll :: (Ord l, Foldable (Cell l)) => Address l a -> Store l a -> Maybe [a]
storeLookupAll address = fmap toList . storeLookup address