State

State monads. This module is inspired by the paper Functional Programming with Overloading and Higher-Order Polymorphism, Mark P Jones (http://web.cecs.pdx.edu/~mpj/) Advanced School of Functional Programming, 1995.
A state monad parameterized by the type s of the state to carry. The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.
State monads, passing an updatable state through a computation. Some computations may not require the full power of state transformers: This version is lazy; for a strict version, see Control.Monad.Trans.State.Strict, which has the same interface.
Keeps track of the remaining tests and the results of the performed tests. As each test is performed, the path is removed and the counts are updated as appropriate.
State monad for the linear register allocator.
Unit manipulation
A state monad which is strict in the state s, but lazy in the value a. See Note [Strict State monad] for the particular notion of strictness and implementation details.
GLUT maintains a considerable amount of programmer visible state. Some (but not all) of this state may be directly retrieved.
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.)
Not on Stackage, so not searched. Data.State
State# is the primitive, unlifted type of states. It has one type parameter, thus State# RealWorld, or State# s, where s is a type variable. The only purpose of the type parameter is to keep different state threads separate. It is represented by nothing at all.
A state transformer monad parameterized by:
  • s - The state.
  • m - The inner monad.
The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.
A state transformer monad parameterized by:
  • s - The state.
  • m - The inner monad.
The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.