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