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

📝 storeLookup.

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

View File

@ -24,6 +24,7 @@ deriving instance Foldable (Cell l) => Foldable (Store l)
deriving instance Functor (Cell l) => Functor (Store l) deriving instance Functor (Cell l) => Functor (Store l)
deriving instance Traversable (Cell l) => Traversable (Store l) deriving instance Traversable (Cell l) => Traversable (Store l)
-- | Look up the cell of values for an 'Address' in a 'Store', if any.
storeLookup :: Ord l => Address l a -> Store l a -> Maybe (Cell l a) storeLookup :: Ord l => Address l a -> Store l a -> Maybe (Cell l a)
storeLookup (Address address) = Map.lookup address . unStore storeLookup (Address address) = Map.lookup address . unStore