eff-0.0.0.0
Safe HaskellNone
LanguageHaskell2010

Control.Effect.State.Strict

Synopsis

Documentation

runState :: s -> Eff (State s ': effs) a -> Eff effs (s, a) Source #

Handles a State effect using a strict cell of mutable state—each use of put or modify eagerly forces the new value. The state is initialized to the given value, and the final state is returned alongside the computation’s result.

evalState :: s -> Eff (State s ': effs) a -> Eff effs a Source #

execState :: s -> Eff (State s ': effs) a -> Eff effs s Source #