Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Handling monad transformers.
Synopsis
- runStateC :: (Data stateT, Monad m) => Cell (StateT stateT m) a b -> stateT -> Cell m a (b, stateT)
- runStateC_ :: (Data stateT, Monad m) => Cell (StateT stateT m) a b -> stateT -> Cell m a b
- data State stateT stateInternal = State {
- stateT :: stateT
- stateInternal :: stateInternal
- runReaderC :: r -> Cell (ReaderT r m) a b -> Cell m a b
- runReaderC' :: Monad m => Cell (ReaderT r m) a b -> Cell m (r, a) b
- runWriterC :: (Monoid w, Monad m) => Cell (WriterT w m) a b -> Cell m a (w, b)
Documentation
:: (Data stateT, Monad m) | |
=> Cell (StateT stateT m) a b | A cell with a state effect |
-> stateT | The initial state |
-> Cell m a (b, stateT) | The cell, returning its current state |
Push effectful state into the internal state of a cell
:: (Data stateT, Monad m) | |
=> Cell (StateT stateT m) a b | A cell with a state effect |
-> stateT | The initial state |
-> Cell m a b |
Like runStateC
, but does not return the current state.
data State stateT stateInternal Source #
The internal state of a cell to which runStateC
or runStateL
has been applied.
State | |
|
Instances
(Eq stateT, Eq stateInternal) => Eq (State stateT stateInternal) Source # | |
(Data stateT, Data stateInternal) => Data (State stateT stateInternal) Source # | |
Defined in LiveCoding.Cell.Monad.Trans gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> State stateT stateInternal -> c (State stateT stateInternal) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (State stateT stateInternal) # toConstr :: State stateT stateInternal -> Constr # dataTypeOf :: State stateT stateInternal -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (State stateT stateInternal)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (State stateT stateInternal)) # gmapT :: (forall b. Data b => b -> b) -> State stateT stateInternal -> State stateT stateInternal # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> State stateT stateInternal -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> State stateT stateInternal -> r # gmapQ :: (forall d. Data d => d -> u) -> State stateT stateInternal -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> State stateT stateInternal -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> State stateT stateInternal -> m (State stateT stateInternal) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> State stateT stateInternal -> m (State stateT stateInternal) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> State stateT stateInternal -> m (State stateT stateInternal) # | |
(Show stateT, Show stateInternal) => Show (State stateT stateInternal) Source # | |
runReaderC :: r -> Cell (ReaderT r m) a b -> Cell m a b Source #
Supply a ReaderT
environment before running the cell