Access helper functions in State and Reader monads
- set :: StateM m r => T r a -> a -> m ()
- get :: StateM m r => T r a -> m a
- modify :: StateM m r => T r a -> (a -> a) -> m ()
- getAndModify :: StateM m r => T r a -> (a -> a) -> m a
- modifyAndGet :: StateM m r => T r a -> (a -> a) -> m a
- (%=) :: StateM m r => T r a -> a -> m ()
- (%:) :: StateM m r => T r a -> (a -> a) -> m ()
- lift :: StateM m r => T r s -> State s a -> m a
- liftT :: Monad m => T r s -> StateT s m a -> StateT r m a
- ask :: ReaderM m r => T r a -> m a
- focusingOn :: ReaderM m r => T r s -> Reader s a -> m a
- focusingOnT :: Monad m => T r s -> ReaderT s m a -> ReaderT r m a
accessors in the form of actions in the state monad
getAndModify :: StateM m r => T r a -> (a -> a) -> m aSource
Modify a record element and return its old value.
modifyAndGet :: StateM m r => T r a -> (a -> a) -> m aSource
Modify a record element and return its new value.
lift a state monadic accessor to an accessor of a parent record
accessors in the form of actions in the reader monad
lift a reader monadic accessor to an accessor of a parent record
focusingOn :: ReaderM m r => T r s -> Reader s a -> m aSource