| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Control.Carrier.State.Strict
Contents
Description
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
Constructors
| StateC (s -> m (s, a)) |
Instances
| MonadTrans (StateC s) Source # | |
Defined in Control.Carrier.State.Strict | |
| MonadFail m => MonadFail (StateC s m) Source # | |
Defined in Control.Carrier.State.Strict | |
| MonadFix m => MonadFix (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 # | |
| Monad m => Applicative (StateC s m) Source # | |
Defined in Control.Carrier.State.Strict | |
| Functor m => Functor (StateC s m) Source # | |
| Monad m => Monad (StateC s m) Source # | |
| (Alternative m, Monad m) => MonadPlus (StateC s m) Source # | |
| Algebra sig m => Algebra (State s :+: sig) (StateC s m) Source # | |
State effect
module Control.Effect.State