essence-of-live-coding-0.2.5: General purpose live coding framework
Safe HaskellSafe-Inferred
LanguageHaskell2010

LiveCoding.Cell.Monad.Trans

Description

Handling monad transformers.

Synopsis

Documentation

runStateC Source #

Arguments

:: (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

runStateC_ Source #

Arguments

:: (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.

Constructors

State 

Fields

Instances

Instances details
(Eq stateT, Eq stateInternal) => Eq (State stateT stateInternal) Source # 
Instance details

Defined in LiveCoding.Cell.Monad.Trans

Methods

(==) :: State stateT stateInternal -> State stateT stateInternal -> Bool #

(/=) :: State stateT stateInternal -> State stateT stateInternal -> Bool #

(Data stateT, Data stateInternal) => Data (State stateT stateInternal) Source # 
Instance details

Defined in LiveCoding.Cell.Monad.Trans

Methods

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 # 
Instance details

Defined in LiveCoding.Cell.Monad.Trans

Methods

showsPrec :: Int -> State stateT stateInternal -> ShowS #

show :: State stateT stateInternal -> String #

showList :: [State stateT stateInternal] -> ShowS #

runReaderC :: r -> Cell (ReaderT r m) a b -> Cell m a b Source #

Supply a ReaderT environment before running the cell

runReaderC' :: Monad m => Cell (ReaderT r m) a b -> Cell m (r, a) b Source #

Supply a ReaderT environment live

runWriterC :: (Monoid w, Monad m) => Cell (WriterT w m) a b -> Cell m a (w, b) Source #

Run the effects of the WriterT monad, collecting all its output in the second element of the tuple.