heftia-effects-0.1.0.0: Handlers for standard effects using Heftia.
Copyright(c) 2023 Yamada Ryo
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Control.Effect.Handler.Heftia.State

Description

Interpreter for the State effect class.

Synopsis

Documentation

interpretState :: forall s es m a. Monad m => s -> Fre (StateI s ': es) m a -> Fre es m (s, a) Source #

Interpret the Get/Put effects using the StateT monad transformer.

evalState :: forall s es m a. Monad m => s -> Fre (StateI s ': es) m a -> Fre es m a Source #

execState :: forall s es m a. Monad m => s -> Fre (StateI s ': es) m a -> Fre es m s Source #

interpretStateT :: forall s es m. Monad m => Fre (StateI s ': es) m ~> StateT s (Fre es m) Source #

Interpret the Get/Put effects using the StateT monad transformer.