1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

🔥 the FrameId reader effect.

This commit is contained in:
Rob Rix 2019-07-29 12:57:44 -04:00
parent 15e5731d93
commit 2c28e536e9
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -67,8 +67,8 @@ cacheTerm eval term = do
result <- eval term
result <$ modify (Cache . Map.insertWith (<>) term (Set.singleton (result :: a)) . unCache)
runHeap :: address -> ReaderC (FrameId address) (StateC (Heap address a) m) b -> m (Heap address a, b)
runHeap addr m = runState (Map.singleton addr Set.empty) (runReader (FrameId addr) m)
runHeap :: address -> StateC (Heap address a) m b -> m (Heap address a, b)
runHeap addr m = runState (Map.singleton addr Set.empty) m
-- | Fold a collection by mapping each element onto an 'Alternative' action.
foldMapA :: (Alternative m, Foldable t) => (b -> m a) -> t b -> m a