graft-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Effect.State

Documentation

data MonadStateEffect (s :: Type) :: Effect where Source #

Constructors

Get :: forall (s :: Type) (m :: Type -> Type). MonadStateEffect s m s 
Put :: forall (s :: Type) (m :: Type -> Type). s -> MonadStateEffect s m () 
State :: forall (s :: Type) (m :: Type -> Type) (a :: Type). (s -> (a, s)) -> MonadStateEffect s m a 

Instances

Instances details
((), MonadState s m) => InterpretEffect m (MonadStateEffect s) Source # 
Instance details

Defined in Effect.State

Methods

interpretEffect :: forall (ops :: [Effect]) a. (forall b. AST ops b -> m b) -> MonadStateEffect s (AST ops) a -> m a Source #

Orphan instances

((), EffectInject (MonadStateEffect s) ops) => MonadState s (AST ops) Source # 
Instance details

Methods

get :: AST ops s #

put :: s -> AST ops () #

state :: (s -> (a, s)) -> AST ops a #