cornea-0.4.0.0: classy optical monadic state
Safe HaskellNone
LanguageHaskell2010

Cornea

Documentation

class Monad m => MonadDeepState (s :: *) (s' :: *) (m :: * -> *) | m -> s where Source #

Minimal complete definition

get, put

Methods

get :: m s' Source #

put :: s' -> m () Source #

stateM :: (s' -> m (a, s')) -> m a Source #

state :: (s' -> (a, s')) -> m a Source #

modifyM' :: (s' -> m s') -> m s' Source #

Instances

Instances details
(Monad (t m), MonadTrans t, MonadDeepState s s' m) => MonadDeepState s s' (t m) Source # 
Instance details

Defined in Control.Monad.DeepState

Methods

get :: t m s' Source #

put :: s' -> t m () Source #

stateM :: (s' -> t m (a, s')) -> t m a Source #

state :: (s' -> (a, s')) -> t m a Source #

modifyM' :: (s' -> t m s') -> t m s' Source #

modify :: (s' -> s') -> t m () Source #

(Monad m, DeepLenses s s') => MonadDeepState s s' (StateT s m) Source # 
Instance details

Defined in Control.Monad.DeepState

Methods

get :: StateT s m s' Source #

put :: s' -> StateT s m () Source #

stateM :: (s' -> StateT s m (a, s')) -> StateT s m a Source #

state :: (s' -> (a, s')) -> StateT s m a Source #

modifyM' :: (s' -> StateT s m s') -> StateT s m s' Source #

modify :: (s' -> s') -> StateT s m () Source #

(Monad m, DeepLenses s s') => MonadDeepState s s' (StateT s m) Source # 
Instance details

Defined in Control.Monad.DeepState

Methods

get :: StateT s m s' Source #

put :: s' -> StateT s m () Source #

stateM :: (s' -> StateT s m (a, s')) -> StateT s m a Source #

state :: (s' -> (a, s')) -> StateT s m a Source #

modifyM' :: (s' -> StateT s m s') -> StateT s m s' Source #

modify :: (s' -> s') -> StateT s m () Source #

gets :: forall s' s m a. MonadDeepState s s' m => (s' -> a) -> m a Source #

modifyM :: MonadDeepState s s' m => (s' -> m s') -> m () Source #

modifyL :: forall s' s a m. MonadDeepState s s' m => Lens' s' a -> (a -> a) -> m () Source #

modifyML' :: forall s' s a m. MonadDeepState s s' m => Lens' s' a -> (a -> m a) -> m a Source #

modifyML :: forall s' s a m. MonadDeepState s s' m => Lens' s' a -> (a -> m a) -> m () Source #

getL :: forall s' s m a. MonadDeepState s s' m => Lens' s' a -> m a Source #

getsL :: forall s' s m a b. MonadDeepState s s' m => Lens' s' a -> (a -> b) -> m b Source #

setL :: forall s' s m a. MonadDeepState s s' m => Lens' s' a -> a -> m () Source #

modify :: forall s' s m. MonadDeepState s s' m => (s' -> s') -> m () Source #