summaryrefslogtreecommitdiff
path: root/libraries/base/Data/Array/ST.hs
blob: d8c302848c34a62f96c5f8e1cf29d8a00ba5a82c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
-----------------------------------------------------------------------------
-- |
-- Module      :  Data.Array.ST
-- Copyright   :  (c) The University of Glasgow 2001
-- License     :  BSD-style (see the file libraries/core/LICENSE)
-- 
-- Maintainer  :  libraries@haskell.org
-- Stability   :  experimental
-- Portability :  non-portable
--
-- Mutable boxed/unboxed arrays in the ST monad.
--
-----------------------------------------------------------------------------

module Data.Array.ST (
   module Data.Array.MArray,
   STArray,		-- instance of: Eq, MArray
   STUArray,		-- instance of: Eq, MArray
   castSTUArray,	-- :: STUArray s i a -> ST s (STUArray s i b)
 ) where

import Prelude

import Data.Array.MArray
import Data.Array.Base

#ifdef __GLASGOW_HASKELL__
import GHC.Arr
import GHC.ST

castSTUArray :: STUArray s ix a -> ST s (STUArray s ix b)
castSTUArray (STUArray l u marr#) = return (STUArray l u marr#)
#endif