e71dece303c7f1c08079702140da79ac05ddf39f
[packages/random.git] / Data / Array / ST.hs
1 -----------------------------------------------------------------------------
2 -- |
3 -- Module : Data.Array.ST
4 -- Copyright : (c) The University of Glasgow 2001
5 -- License : BSD-style (see the file libraries/core/LICENSE)
6 --
7 -- Maintainer : libraries@haskell.org
8 -- Stability : experimental
9 -- Portability : non-portable
10 --
11 -- Mutable boxed and unboxed arrays in the ST monad.
12 --
13 -----------------------------------------------------------------------------
14
15 module Data.Array.ST (
16 module Data.Array.MArray,
17 STArray, -- instance of: Eq, MArray
18 STUArray, -- instance of: Eq, MArray
19 castSTUArray, -- :: STUArray s i a -> ST s (STUArray s i b)
20 ) where
21
22 import Prelude
23
24 import Data.Array.MArray
25 import Data.Array.Base
26
27 #ifdef __GLASGOW_HASKELL__
28 import GHC.Arr
29 import GHC.ST
30
31 castSTUArray :: STUArray s ix a -> ST s (STUArray s ix b)
32 castSTUArray (STUArray l u marr#) = return (STUArray l u marr#)
33 #endif