**Packages**- transformers
- mtl
- package

State monads, passing an updatable state through a computation.
Some computations may not require the full power of state transformers:
* For a read-only state, see Control.Monad.Trans.Reader.
* To accumulate a value without using it on the way, see Control.Monad.Trans.Writer.
This version is lazy; for a strict version, see Control.Monad.Trans.State.Strict, which has the same interface.

transformers Control.Monad.Trans.State.Lazy, transformers Control.Monad.Trans.State.Strict, mtl Control.Monad.State.Lazy, mtl Control.Monad.State.Strict

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.

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.

This package contains state variables, which are references in the IO monad, like IORefs or parts of the OpenGL state.
Version 1.0.0.0

Construct a state monad computation from a state transformer function.

Construct a state monad computation from a function. (The inverse of runState.)

Data.State
Version 0.1

Implements MonadPlus with left catch (MonadOr) for StateT.
Version 0.1

This package provides a Template Haskell function which transforms a normal record declaration into one which supports many useful operations when used as the state in a State monad.
Version 0.0.1

TODO
Version 0.1.0

A MonadST type class, instances, and some helpful monad functions.
Version 1.0.7

A collection of type-classes generalizing the read/write/modify operations for stateful variables provided by things like IORef, TVar, &c. Note that The interface has changed a bit from the 0.2.* version. "*Ref" functions are now called "*Reference" and new "*Ref" function exist with simpler signatures. The new Ref existential type provides a convenient monad-indexed reference type, and the HasRef class indicates monads for which there is a default reference type for every referent.
Version 0.3

Simple State-like monad transformer where states can be saved to and restored from an internal stack.
Version 0.2

The ST monad and STRefs in a portable form. This package implements state threads as wrapper around IO and IORefs. Your compiler must support rank-2-types, IORefs, unsafePerformIO and unsafeInterleaveIO. The package can be used as drop-in replacement for the st package.
Version 0.1.1

This is a version of the RWS monad transformers that should be much faster than what's found in transformers. The writer in the strict version does not leak memory.
Version 0.2.0

Use regular Haskell data structures as your database and get stronger ACID guarantees than most RDBMS offer.
Version 0.12.1

Adds TLS support for connections to remote AcidState databases
Version 0.9.1

This package declares BinaryState type class, which is similar to Data.Binary.Binary, but Get/Put monads can track state.
Version 0.1.1

transformers Control.Monad.Trans.State.Lazy, transformers Control.Monad.Trans.State.Strict, mtl Control.Monad.State.Lazy, mtl Control.Monad.State.Strict

Evaluate a state computation with the given initial state and return the final value, discarding the final state.
* m s = fst (runState m
>

transformers Control.Monad.Trans.State.Lazy, transformers Control.Monad.Trans.State.Strict, mtl Control.Monad.State.Lazy, mtl Control.Monad.State.Strict

Evaluate a state computation with the given initial state and return the final value, discarding the final state.
* m s = liftM fst
> (runStateT m

Evaluate a state computation with the given initial state and return the final state, discarding the final value.
* m s = snd (runState m
>

Evaluate a state computation with the given initial state and return the final state, discarding the final value.
* m s = liftM snd
> (runStateT m

Web framework
Version 0.9.3

Unplug your machine and restart and have your app recover to exactly where it left off. Happstack-State spares you the need to deal with all the marshalling, consistency, and configuration headache that you would have if you used an external DBMS for this purpose. Its component model makes it easy to compose big applications from smaller reliable parts. Use event subscription to trigger IO actions and support comet-style or irc-bot applications.
Version 6.1.4

Map both the return value and final state of a computation using the given function.
* (mapState f m) = f . runState

Map both the return value and final state of a computation using the given function.
* (mapStateT f m) = f .
> runStateT

Utility library for monads, particularly those involving state
Version 0.1.1.2

Overloaded get and put for state variables (IORef, STRef, TVar) to make reading and writing more concise.
Inspired by the StateVar package by Sven Panne, with the following differences:
* Supports variables in other monads besides IO (e.g. TVar, STRef).
* Provides non-infix put, modify, etc.
* Does not provide concrete state variables (i.e. ones where you supply get and put callbacks). If you want this feature, please submit an issue.
* Named "Control.Monad.StateVar" instead of "Data.StateVar", to avoid a module naming conflict.
Version 0.1

MState offers a State monad which can be used in concurrent applications. It also manages new threads and waits until the whole state monad has been evaluated/executed before it returns the state values (if desired).
Version 0.2.4

readline package is a good wrapping library around libreadline.
Unfortunately, there is a lot of set/get pairs of functions, which clutter namespace. This kind of API can be nicely expressed as StateVars, as in HOpenGL.
readline-statevar seeks to fill this gap and provide nicer API based on StateVars.
For clarity: this module wraps only System.Console.Readline module. System.Console.SimpleLineEditor is left untouched.
Version 1.0.1.0

It's like the State monad transformer. But Reversed! The state goes backwards.
Version 0.1

Unwrap a state monad computation as a function. (The inverse of state.)

This snaplet makes it easy to use acid-state in a Snap application.
Version 0.2.6

withStateT f m executes action m on a state modified by applying f.
* f m = modify f >>