Safe Haskell | None |
---|---|
Language | Haskell2010 |
A carrier for the State
effect. It evaluates its inner state strictly, which is the correct choice for the majority of use cases.
Note that the parameter order in runState
, evalState
, and execState
is reversed compared the equivalent functions provided by transformers
. This is an intentional decision made to enable the composition of effect handlers with .
without invoking flip
.
Since: 1.0.0.0
Strict state carrier
Since: 1.0.0.0
StateC (s -> m (s, a)) |
Instances
MonadTrans (StateC s) Source # | |
Defined in Control.Carrier.State.Strict | |
Monad m => Monad (StateC s m) Source # | |
Functor m => Functor (StateC s m) Source # | |
MonadFix m => MonadFix (StateC s m) Source # | |
Defined in Control.Carrier.State.Strict | |
MonadFail m => MonadFail (StateC s m) Source # | |
Defined in Control.Carrier.State.Strict | |
Monad m => Applicative (StateC s m) Source # | |
Defined in Control.Carrier.State.Strict | |
MonadIO m => MonadIO (StateC s m) Source # | |
Defined in Control.Carrier.State.Strict | |
(Alternative m, Monad m) => Alternative (StateC s m) Source # | |
(Alternative m, Monad m) => MonadPlus (StateC s m) Source # | |
(Algebra sig m, Effect sig) => Algebra (State s :+: sig) (StateC s m) Source # | |
State effect
module Control.Effect.State