diff options
Diffstat (limited to 'src/Data/JLD/Control/Monad')
-rw-r--r-- | src/Data/JLD/Control/Monad/RES.hs | 4 |
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 | |||
20 | evalREST :: Monad m => r -> s -> REST r e s m a -> m (Either e a) | 21 | evalREST :: Monad m => r -> s -> REST r e s m a -> m (Either e a) |
21 | evalREST env st = flip runReaderT env .> runExceptT .> flip evalStateT st | 22 | evalREST env st = flip runReaderT env .> runExceptT .> flip evalStateT st |
22 | 23 | ||
24 | execREST :: Monad m => r -> s -> REST r e s m a -> m s | ||
25 | execREST env st = flip runReaderT env .> runExceptT .> flip execStateT st | ||
26 | |||
23 | withEnvRES :: (r -> r') -> REST r' e s m a -> REST r e s m a | 27 | withEnvRES :: (r -> r') -> REST r' e s m a -> REST r e s m a |
24 | withEnvRES fn (ReaderT m) = ReaderT <| fn .> m | 28 | withEnvRES fn (ReaderT m) = ReaderT <| fn .> m |
25 | 29 | ||