state

Embed a simple state action into the monad.
Construct a state monad computation from a state transformer function.
Construct a state monad computation from a state transformer function.
Construct a state monad computation from a function. (The inverse of runState.)
Determine the state of the reentrant lock. Note that this is only a snapshot of the state. By the time a program reacts on its result it may already be out of date.
Apply the function to the current state and return a value.
Apply the function to the current state and return a value.
Apply the function to the current state and return a value. Note: this function gets an exclusive access to the state for its duration.
Compute a new state and a value in a single step.
state f = gets f >>= \ (s, a) -> put s >> pure a
Get the Lua state of this Lua computation.
Create a Condition from a function that takes a process state a and returns a Bool indicating whether the associated handler should run.
Construct a state monad computation from a state transformer function.
The internal state of the stream
Construct a state monad computation from a function. (The inverse of runState.)
state @tag f lifts a pure state computation f to a monadic action in an arbitrary monad m with capability HasState. Given the current state s of the state capability tag and (a, s') = f s, update the state to s' and return a.
GHC.Prim.State# type