Provide access to a mutable value of type s.
Instances1DispatchOf
type DispatchOf (State s) = 'DynamicDefined in effectful-core-2.7.1.2 · Effectful.Internal.Effect.Dynamic
:: a typeCtrl KGHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11
Moduleeffectful-core-2.7.1.2GHC2021
The dynamically dispatched variant of the State effect.
Note: unless you plan to change interpretations at runtime or you need the
Control.Monad.State.MonadState instance for compatibility with existing
code, it's recommended to use one of the statically dispatched variants,
i.e. Effectful.State.Static.Local or Effectful.State.Static.Shared.
Provide access to a mutable value of type s.
type DispatchOf (State s) = 'DynamicDefined in effectful-core-2.7.1.2 · Effectful.Internal.Effect.DynamicRun the State effect with the given initial state and return the final value along with the final state (via Effectful.State.Static.Local).
Run the State effect with the given initial state and return the final value, discarding the final state (via Effectful.State.Static.Local).
Run the State effect with the given initial state and return the final state, discarding the final value (via Effectful.State.Static.Local).
Fetch the current value of the state.
Set the current state to the given value.
Apply the function to the current state and return a value.
Deprecated. Use a combination of get and put instead.
Apply the monadic function to the current state and return a value.