Update base for latest Safe Haskell.
[packages/base.git] / Control / Monad / ST / Lazy.hs
1 {-# LANGUAGE Unsafe #-}
2
3 -----------------------------------------------------------------------------
4 -- |
5 -- Module : Control.Monad.ST.Lazy
6 -- Copyright : (c) The University of Glasgow 2001
7 -- License : BSD-style (see the file libraries/base/LICENSE)
8 --
9 -- Maintainer : libraries@haskell.org
10 -- Stability : provisional
11 -- Portability : non-portable (requires universal quantification for runST)
12 --
13 -- This module presents an identical interface to "Control.Monad.ST",
14 -- except that the monad delays evaluation of state operations until
15 -- a value depending on them is required.
16 --
17 -----------------------------------------------------------------------------
18
19 module Control.Monad.ST.Lazy (
20 -- * The 'ST' monad
21 ST,
22 runST,
23 fixST,
24
25 -- * Converting between strict and lazy 'ST'
26 strictToLazyST, lazyToStrictST,
27
28 -- * Converting 'ST' To 'IO'
29 RealWorld,
30 stToIO,
31
32 -- * Unsafe Functions
33 unsafeInterleaveST,
34 unsafeIOToST
35 ) where
36
37 import Control.Monad.ST.Lazy.Safe
38 import qualified Control.Monad.ST.Lazy.Unsafe as U
39
40 {-# DEPRECATED unsafeInterleaveST, unsafeIOToST
41 "Please import from Control.Monad.ST.Lazy.Unsafe instead; This will be removed in the next release"
42 #-}
43
44 {-# INLINE unsafeInterleaveST #-}
45 unsafeInterleaveST :: ST s a -> ST s a
46 unsafeInterleaveST = U.unsafeInterleaveST
47
48 {-# INLINE unsafeIOToST #-}
49 unsafeIOToST :: IO a -> ST s a
50 unsafeIOToST = U.unsafeIOToST
51