Safe Haskell | Safe-Inferred |
---|

Access helper functions in a Reader-Writer-State monad

- set :: (Monad m, Monoid w) => T s a -> a -> RWST r w s m ()
- get :: (Monad m, Monoid w) => T s a -> RWST r w s m a
- modify :: (Monad m, Monoid w) => T s a -> (a -> a) -> RWST r w s m ()
- getAndModify :: (Monad m, Monoid w) => T s a -> (a -> a) -> RWST r w s m a
- modifyAndGet :: (Monad m, Monoid w) => T s a -> (a -> a) -> RWST r w s m a
- (%=) :: (Monad m, Monoid w) => T s a -> a -> RWST r w s m ()
- (%:) :: (Monad m, Monoid w) => T s a -> (a -> a) -> RWST r w s m ()
- lift :: (Monad m, Monoid w) => T s1 s0 -> RWS r w s0 a -> RWST r w s1 m a
- liftT :: (Monad m, Monoid w) => T s1 s0 -> RWST r w s0 m a -> RWST r w s1 m a

# accessors in the form of actions in the RWS monad

getAndModify :: (Monad m, Monoid w) => T s a -> (a -> a) -> RWST r w s m aSource

Modify a record element and return its old value.

modifyAndGet :: (Monad m, Monoid w) => T s a -> (a -> a) -> RWST r w s m aSource

Modify a record element and return its new value.