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