Haskell Core Libraries (base package)ParentContentsIndex
Control.Monad.ST.Lazy
Portability non-portable (requires universal quantification for runST)
Stability provisional
Maintainer libraries@haskell.org
Contents
The ST monad
Unsafe operations
Converting ST To IO
Converting between strict and lazy ST
Description
This module presents an identical interface to Control.Monad.ST, but the underlying implementation of the state thread is lazy (in the sense that (_|_ >> a is not necessarily equal to _|_).
Synopsis
data ST s a
runST :: (forall s . ST s a) -> a
fixST :: (a -> ST s a) -> ST s a
unsafeInterleaveST :: ST s a -> ST s a
unsafeIOToST :: IO a -> ST s a
stToIO :: ST RealWorld a -> IO a
strictToLazyST :: ST s a -> ST s a
lazyToStrictST :: ST s a -> ST s a
The ST monad
data ST s a
Instances
Functor (ST s)
Monad (ST s)
MonadFix (ST s)
runST :: (forall s . ST s a) -> a
fixST :: (a -> ST s a) -> ST s a
Unsafe operations
unsafeInterleaveST :: ST s a -> ST s a
unsafeIOToST :: IO a -> ST s a
Converting ST To IO
stToIO :: ST RealWorld a -> IO a
Converting between strict and lazy ST
strictToLazyST :: ST s a -> ST s a
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.
lazyToStrictST :: ST s a -> ST s a
Convert a lazy ST computation into a strict one.
Produced by Haddock version 0.4