1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Run the Domain effect.

This commit is contained in:
Rob Rix 2019-12-19 14:30:24 -05:00
parent 3be69996fb
commit 0f7188a864
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -99,9 +99,12 @@ runFile eval file = traverse run file
. runEnv
. runFail
. fmap fold
. convergeTerm 0 (A.runHeap @Addr @(Value (Semi term)) . fix (cacheTerm . eval))
. convergeTerm 0 (A.runHeap @Addr @(Value (Semi term)) . fix (\ eval' -> runDomain eval' . fix (cacheTerm . eval)))
runDomain :: (term Addr -> m (Value (Semi term))) -> DomainC term m a -> m a
runDomain eval (DomainC m) = runReader eval m
newtype DomainC term m a = DomainC (ReaderC (term Addr -> m (Value (Semi term))) m a)
deriving (Alternative, Applicative, Functor, Monad, MonadFail)