143f792df086ce05b0a8191d51e799f0e9615279
[packages/base.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 -- $Id: ST.hs,v 1.1 2001/06/28 14:15:02 simonmar Exp $
12 --
13 -- Mutable boxed/unboxed arrays in the ST monad.
14 --
15 -----------------------------------------------------------------------------
16
17 module Data.Array.ST (
18 module Data.Array.MArray,
19 STArray, -- instance of: Eq, MArray
20 STUArray, -- instance of: Eq, MArray
21 castSTUArray, -- :: STUArray s i a -> ST s (STUArray s i b)
22 ) where
23
24 import Prelude
25
26 import Data.Array.MArray
27 import Data.Array.Base
28
29 #ifdef __GLASGOW_HASKELL__
30 import GHC.Arr
31 import GHC.ST
32
33 castSTUArray :: STUArray s ix a -> ST s (STUArray s ix b)
34 castSTUArray (STUArray l u marr#) = return (STUArray l u marr#)
35 #endif