aboutsummaryrefslogtreecommitdiffstats
path: root/src/Data/JLD/Control/Monad
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/JLD/Control/Monad')
-rw-r--r--src/Data/JLD/Control/Monad/RES.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Data/JLD/Control/Monad/RES.hs b/src/Data/JLD/Control/Monad/RES.hs
index 1c96d46..b9f8f22 100644
--- a/src/Data/JLD/Control/Monad/RES.hs
+++ b/src/Data/JLD/Control/Monad/RES.hs
@@ -2,6 +2,7 @@ module Data.JLD.Control.Monad.RES (
2 REST, 2 REST,
3 runREST, 3 runREST,
4 evalREST, 4 evalREST,
5 execREST,
5 withEnvRES, 6 withEnvRES,
6 withErrorRES, 7 withErrorRES,
7 withErrorRES', 8 withErrorRES',
@@ -20,6 +21,9 @@ runREST env st = flip runReaderT env .> runExceptT .> flip runStateT st
20evalREST :: Monad m => r -> s -> REST r e s m a -> m (Either e a) 21evalREST :: Monad m => r -> s -> REST r e s m a -> m (Either e a)
21evalREST env st = flip runReaderT env .> runExceptT .> flip evalStateT st 22evalREST env st = flip runReaderT env .> runExceptT .> flip evalStateT st
22 23
24execREST :: Monad m => r -> s -> REST r e s m a -> m s
25execREST env st = flip runReaderT env .> runExceptT .> flip execStateT st
26
23withEnvRES :: (r -> r') -> REST r' e s m a -> REST r e s m a 27withEnvRES :: (r -> r') -> REST r' e s m a -> REST r e s m a
24withEnvRES fn (ReaderT m) = ReaderT <| fn .> m 28withEnvRES fn (ReaderT m) = ReaderT <| fn .> m
25 29