data-accessor-monads-tf-0.2.1: Use Accessor to access state in monads-tf State monad type familySource codeContentsIndex
Data.Accessor.Monad.TF.State
Contents
accessors in the form of actions in the state monad
lift a state monadic accessor to an accessor of a parent record
Description
Access helper functions in the State monad type family
Synopsis
set :: MonadState m => T (StateType m) a -> a -> m ()
get :: MonadState m => T (StateType m) a -> m a
modify :: MonadState m => T (StateType m) a -> (a -> a) -> m ()
getAndModify :: MonadState m => T (StateType m) a -> (a -> a) -> m a
modifyAndGet :: MonadState m => T (StateType m) a -> (a -> a) -> m a
(%=) :: MonadState m => T (StateType m) a -> a -> m ()
(%:) :: MonadState m => T (StateType m) a -> (a -> a) -> m ()
lift :: MonadState mr => T (StateType mr) s -> State s a -> mr a
liftT :: (Monad m, MonadTrans t, MonadState (t m)) => T (StateType (t m)) s -> StateT s m a -> t m a
accessors in the form of actions in the state monad
set :: MonadState m => T (StateType m) a -> a -> m ()Source
get :: MonadState m => T (StateType m) a -> m aSource
modify :: MonadState m => T (StateType m) a -> (a -> a) -> m ()Source
getAndModify :: MonadState m => T (StateType m) a -> (a -> a) -> m aSource
Modify a record element and return its old value.
modifyAndGet :: MonadState m => T (StateType m) a -> (a -> a) -> m aSource
Modify a record element and return its new value.
(%=) :: MonadState m => T (StateType m) a -> a -> m ()Source
Infix variant of set.
(%:) :: MonadState m => T (StateType m) a -> (a -> a) -> m ()Source
Infix variant of modify.
lift a state monadic accessor to an accessor of a parent record
lift :: MonadState mr => T (StateType mr) s -> State s a -> mr aSource
liftT :: (Monad m, MonadTrans t, MonadState (t m)) => T (StateType (t m)) s -> StateT s m a -> t m aSource
Produced by Haddock version 2.6.0