State, lazy (i.e., on-demand)
Extensible effects make it clear that where the computation is delayed (which I take as an advantage) and they do maintain the degree of extensibility (the delayed computation must be effect-closed, but the whole computation does not have to be).
Constructors
Get :: OnDemandState s sPut :: s -> OnDemandState s ()Delay :: Eff '[OnDemandState s] a -> OnDemandState s v
Instances3MonadBaseControl, Handle, StM
(MonadBase m m, LiftedBase m r) => MonadBaseControl m (Eff (OnDemandState s ': r))Defined in extensible-effects-5.0.0.1 · Control.Eff.State.OnDemandHandle (OnDemandState s) r a (s -> k)Defined in extensible-effects-5.0.0.1 · Control.Eff.State.OnDemandGiven a continuation, respond to requests
type StM (Eff (OnDemandState s ': r)) a = StM (Eff r) (a, s)Defined in extensible-effects-5.0.0.1 · Control.Eff.State.OnDemand