aboutsummaryrefslogtreecommitdiffstats
path: root/src/Data/JLD/Control/Monad
diff options
context:
space:
mode:
authorVolpeon <github@volpeon.ink>2023-05-27 12:10:51 +0200
committerVolpeon <github@volpeon.ink>2023-05-27 12:10:51 +0200
commit1bb6f74645e39bb45e33a7413771ea7f971628c9 (patch)
tree7b8c2866ff9198264a99f4da60d9fe82a3bf21fb /src/Data/JLD/Control/Monad
parentMeta: Link to about page instead of raw readme (diff)
downloadhs-jsonld-1bb6f74645e39bb45e33a7413771ea7f971628c9.tar.gz
hs-jsonld-1bb6f74645e39bb45e33a7413771ea7f971628c9.tar.bz2
hs-jsonld-1bb6f74645e39bb45e33a7413771ea7f971628c9.zip
Structural improvements
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