c053dcc64d3f14850b569415a750c9ef2ab11aed
[ghc.git] / libraries / base / Control / Monad / ST / Imp.hs
1 {-# LANGUAGE Unsafe #-}
2 {-# OPTIONS_HADDOCK hide #-}
3
4 -----------------------------------------------------------------------------
5 -- |
6 -- Module : Control.Monad.ST.Imp
7 -- Copyright : (c) The University of Glasgow 2001
8 -- License : BSD-style (see the file libraries/base/LICENSE)
9 --
10 -- Maintainer : libraries@haskell.org
11 -- Stability : experimental
12 -- Portability : non-portable (requires universal quantification for runST)
13 --
14 -- This library provides support for /strict/ state threads, as
15 -- described in the PLDI \'94 paper by John Launchbury and Simon Peyton
16 -- Jones /Lazy Functional State Threads/.
17 --
18 -----------------------------------------------------------------------------
19
20 module Control.Monad.ST.Imp (
21 -- * The 'ST' Monad
22 ST, -- abstract, instance of Functor, Monad, Typeable.
23 runST,
24 fixST,
25
26 -- * Converting 'ST' to 'IO'
27 RealWorld, -- abstract
28 stToIO,
29
30 -- * Unsafe operations
31 unsafeInterleaveST,
32 unsafeDupableInterleaveST,
33 unsafeIOToST,
34 unsafeSTToIO
35 ) where
36
37 import GHC.ST ( ST, runST, fixST, unsafeInterleaveST
38 , unsafeDupableInterleaveST )
39 import GHC.Base ( RealWorld )
40 import GHC.IO ( stToIO, unsafeIOToST, unsafeSTToIO )