This library provides support for *strict* state threads, as described in the PLDI '94 paper by John Launchbury and Simon Peyton Jones *Lazy Functional State Threads*.

The lazy state-transformer monad. A computation of type ST s a transforms an internal state indexed by s, and returns a value of type a. The s parameter is either
* an unstantiated type variable (inside invocations of runST), or
* RealWorld (inside invocations of stToIO).
It serves to keep the internal states of different invocations of runST separate from each other and from invocations of stToIO.
The >>= and >> operations are not strict in the state. For example,
> runST (writeSTRef _|_ v >>= readSTRef _|_ >> return 2) = 2

The strict state-transformer monad. A computation of type ST s a transforms an internal state indexed by s, and returns a value of type a. The s parameter is either
* an uninstantiated type variable (inside invocations of runST), or
* RealWorld (inside invocations of Control.Monad.ST.stToIO).
It serves to keep the internal states of different invocations of runST separate from each other and from invocations of Control.Monad.ST.stToIO.
The >>= and >> operations are strict in the state (though not in values stored in the state). For example,
> runST (writeSTRef _|_ v >>= f) = _|_

Mutable boxed and unboxed arrays in the ST monad.

Mutable references in the (strict) ST monad.

a value of type STRef s a is a mutable variable in state thread s, containing a value of type a

Software Transactional Memory: a modular composable concurrency abstraction. See
* *Composable memory transactions*, by Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy, in /ACM Conference on Principles and Practice of Parallel Programming/ 2005. http://research.microsoft.com/Users/simonpj/papers/stm/index.htm

Software Transactional Memory: a modular composable concurrency abstraction. See
* *Composable memory transactions*, by Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy, in /ACM Conference on Principles and Practice of Parallel Programming/ 2005. http://research.microsoft.com/Users/simonpj/papers/stm/index.htm
This module only defines the STM monad; you probably want to import Control.Concurrent.STM (which exports Control.Monad.STM).

Mutable, boxed, non-strict arrays in the ST monad. The type arguments are as follows:
* s: the state variable argument for the ST type
* i: the index type of the array (should be an instance of Ix)
* e: the element type of the array.

A monad supporting atomic memory transactions.

A monad supporting atomic memory transactions.

A monad transformer version of the ST monad Warning! This monad transformer should not be used with monads that can contain multiple answers, like the list monad. The reason is that the will be duplicated across the different answers and this cause Bad Things to happen (such as loss of referential transparency). Safe monads include the monads State, Reader, Writer, Maybe and combinations of their corresponding monad transformers.
Version 0.3.1

A mutable array with unboxed elements, that can be manipulated in the ST monad. The type arguments are as follows:
* s: the state variable argument for the ST type
* i: the index type of the array (should be an instance of Ix)
* e: the element type of the array. Only certain element types are supported.
An STUArray will generally be more efficient (in terms of both time and space) than the equivalent boxed version (STArray) with the same element type. However, STUArray is strict in its elements - so don't use STUArray if you require the non-strictness that STArray provides.

The strict ST monad (re-export of Control.Monad.ST)

Mutable references in the (strict) ST monad (re-export of Data.STRef)

The String type and associated operations.

Utilities for primitive marshalling of C strings.
The marshalling converts each Haskell character, representing a Unicode code point, to one or more bytes in a manner that, by default, is determined by the current locale. As a consequence, no guarantees can be made about the relative length of a Haskell string and its corresponding C string, and therefore all the marshalling routines include memory allocation. The translation between Unicode and the encoding of the current locale may be lossy.