ST

module Control.Monad.ST
base Control.Monad.ST
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.
data ST s a
base Control.Monad.ST.Lazy
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
data ST s a
base Control.Monad.ST
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) = _|_
module Data.Array.ST
array Data.Array.ST
Mutable boxed and unboxed arrays in the ST monad.
module Data.STRef
base Data.STRef
Mutable references in the (strict) ST monad.
data STRef s a
base Data.STRef, base Data.STRef.Lazy
a value of type STRef s a is a mutable variable in state thread s, containing a value of type a
module Control.Concurrent.STM
stm Control.Concurrent.STM
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
module Control.Monad.STM
stm Control.Monad.STM
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).
data STArray s i e :: * -> * -> * -> *
array Data.Array.ST, array Data.Array.ST.Safe
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.
STM :: (State# RealWorld -> (# State# RealWorld, a #)) -> STM a
base GHC.Conc.Sync, base GHC.Conc
data STM a :: * -> *
stm Control.Monad.STM
A monad supporting atomic memory transactions.
newtype STM a
base GHC.Conc.Sync, base GHC.Conc
A monad supporting atomic memory transactions.
package STMonadTrans
package
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
SToS :: PixelMapTarget
OpenGL Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap
data STUArray s i e
array Data.Array.ST, array Data.Array.ST.Safe
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.
type String = [Char]
base Prelude, base Data.String
A String is a list of characters. String constants in Haskell are values of type String.
module Control.Monad.ST.Strict
base Control.Monad.ST.Strict
The strict ST monad (re-export of Control.Monad.ST)
module Data.STRef.Strict
base Data.STRef.Strict
Mutable references in the (strict) ST monad (re-export of Data.STRef)
module Data.String
base Data.String
The String type and associated operations.
module Foreign.C.String
base Foreign.C.String
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.
module Foreign.StablePtr
base Foreign.StablePtr
This module is part of the Foreign Function Interface (FFI) and will usually be imported via the module Foreign.
module Foreign.Storable
base Foreign.Storable
The module Foreign.Storable provides most elementary support for marshalling and is part of the language-independent portion of the Foreign Function Interface (FFI), and will normally be imported via the Foreign module.
data StableName a
base System.Mem.StableName
An abstract name for an object, that supports equality and hashing. Stable names have the following property: * If sn1 :: StableName and sn2 :: StableName and sn1 == sn2 then sn1 and sn2 were created by calls to makeStableName on the same object. The reverse is not necessarily true: if two stable names are not equal, then the objects they name may still be equal. Note in particular that mkStableName may return a different StableName after an object is evaluated. Stable Names are similar to Stable Pointers (Foreign.StablePtr), but differ in the following ways: * There is no freeStableName operation, unlike Foreign.StablePtrs. Stable names are reclaimed by the runtime system when they are no longer needed. * There is no deRefStableName operation. You can't get back from a stable name to the original Haskell object. The reason for this is that the existence of a stable name for an object does not guarantee the existence of the object itself; it can still be garbage collected.
data StablePtr a
base Foreign.StablePtr
A stable pointer is a reference to a Haskell expression that is guaranteed not to be affected by garbage collection, i.e., it will neither be deallocated nor will the value of the stable pointer itself change during garbage collection (ordinary references may be relocated during garbage collection). Consequently, stable pointers can be passed to foreign code, which can treat it as an opaque reference to a Haskell value. A value of type StablePtr a is a stable pointer to a Haskell expression of type a.
StackOverflow :: AsyncException
base Control.Exception.Base, base Control.Exception, base Control.OldException
The current thread's stack exceeded its limit. Since an exception has been raised, the thread's stack will certainly be below its limit again, but the programmer should take remedial action immediately.
stderr :: Handle
base System.IO, base GHC.IO.Handle.FD
A handle managing output to the Haskell program's standard error channel.
stdin :: Handle
base System.IO, base GHC.IO.Handle.FD
A handle managing input from the Haskell program's standard input channel.
stdout :: Handle
base System.IO, base GHC.IO.Handle.FD
A handle managing output to the Haskell program's standard output channel.
step :: EventManager -> TimeoutQueue -> IO (Bool, TimeoutQueue)
base System.Event
step :: ReadPrec a -> ReadPrec a
base Text.ParserCombinators.ReadPrec
Increases the precedence context by one.
class Storable a
base Foreign.Storable
The member functions of this class facilitate writing values of primitive types to raw memory (which may have been allocated with the above mentioned routines) and reading values from blocks of raw memory. The class, furthermore, includes support for computing the storage requirements and alignment restrictions of storable types. Memory addresses are represented as values of type Ptr a, for some a which is an instance of class Storable. The type argument to Ptr helps provide some valuable type safety in FFI code (you can't mix pointers of different types without an explicit cast), while helping the Haskell type system figure out which marshalling method is needed for a given pointer. All marshalling between Haskell and a foreign language ultimately boils down to translating Haskell data structures into the binary representation of a corresponding data structure of the foreign language and vice versa. To code this marshalling in Haskell, it is necessary to manipulate primitive data types stored in unstructured memory blocks. The class Storable facilitates this manipulation on all types for which it is instantiated, which are the standard basic types of Haskell, the fixed size Int types (Int8, Int16, Int32, Int64), the fixed size Word types (Word8, Word16, Word32, Word64), StablePtr, all types from Foreign.C.Types, as well as Ptr. Minimal complete definition: sizeOf, alignment, one of peek, peekElemOff and peekByteOff, and one of poke, pokeElemOff and pokeByteOff.
strictToLazyST :: ST s a -> ST s a
base Control.Monad.ST.Lazy
Convert a strict ST computation into a lazy one. The strict state thread passed to strictToLazyST is not performed until the result of the lazy state thread it returns is demanded.
String :: String -> Lexeme
base Text.Read.Lex, base Text.Read
String literal, with escapes interpreted
string :: String -> ReadP String
base Text.ParserCombinators.ReadP
Parses and returns the specified string.
stripPrefix :: Eq a => [a] -> [a] -> Maybe [a]
base Data.List
The stripPrefix function drops the given prefix from a list. It returns Nothing if the list did not start with the prefix given, or Just the list after the prefix, if it does. > stripPrefix "foo" "foobar" == Just "bar" > stripPrefix "foo" "foo" == Just "" > stripPrefix "foo" "barfoo" == Nothing > stripPrefix "foo" "barfoobaz" == Nothing
stToIO :: ST RealWorld a -> IO a
base Control.Monad.ST.Lazy
A monad transformer embedding lazy state transformers in the IO monad. The RealWorld parameter indicates that the internal state used by the ST computation is a special one supplied by the IO monad, and thus distinct from those used by invocations of runST.
stToIO :: ST RealWorld a -> IO a
base Control.Monad.ST
A monad transformer embedding strict state transformers in the IO monad. The RealWorld parameter indicates that the internal state used by the ST computation is a special one supplied by the IO monad, and thus distinct from those used by invocations of runST.
module System.Mem.StableName
base System.Mem.StableName
Stable names are a way of performing fast (O(1)), not-quite-exact comparison between objects. Stable names solve the following problem: suppose you want to build a hash table with Haskell objects as keys, but you want to use pointer equality for comparison; maybe because the keys are large and hashing would be slow, or perhaps because the keys are infinite in size. We can't build a hash table using the address of the object as the key, because objects get moved around by the garbage collector, meaning a re-hash would be necessary after every garbage collection.
module Control.Monad.RWS.Strict
mtl Control.Monad.RWS.Strict
Strict RWS monad. 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.
module Control.Monad.State
mtl Control.Monad.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.

Show more results