b97daeec6a25fece20e491cb07cf040f984a6715
[packages/base.git] / Data / Array / IArray.hs
1 -----------------------------------------------------------------------------
2 --
3 -- Module : Data.Array.IArray
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: IArray.hs,v 1.1 2001/06/28 14:15:02 simonmar Exp $
12 --
13 -- Overloaded immutable array class.
14 --
15 -----------------------------------------------------------------------------
16
17 module Data.Array.IArray (
18 module Data.Ix,
19
20 -- Class of immutable array types
21 IArray, -- :: (* -> * -> *) -> * -> class
22 -- Class of array types with immutable bounds
23 HasBounds, -- :: (* -> * -> *) -> class
24
25 array, -- :: (IArray a e, Ix i) => (i,i) -> [(i, e)] -> a i e
26 listArray, -- :: (IArray a e, Ix i) => (i,i) -> [e] -> a i e
27 (!), -- :: (IArray a e, Ix i) => a i e -> i -> e
28 bounds, -- :: (HasBounds a, Ix i) => a i e -> (i,i)
29 indices, -- :: (HasBounds a, Ix i) => a i e -> [i]
30 elems, -- :: (IArray a e, Ix i) => a i e -> [e]
31 assocs, -- :: (IArray a e, Ix i) => a i e -> [(i, e)]
32 accumArray, -- :: (IArray a e, Ix i) => (e -> e' -> e) -> e -> (i,i) -> [(i, e')] -> a i e
33 (//), -- :: (IArray a e, Ix i) => a i e -> [(i, e)] -> a i e
34 accum, -- :: (IArray a e, Ix i) => (e -> e' -> e) -> a i e -> [(i, e')] -> a i e
35 amap, -- :: (IArray a e', IArray a e, Ix i) => (e' -> e) -> a i e' -> a i e
36 ixmap) -- :: (IArray a e, Ix i, Ix j) => (i,i) -> (i -> j) -> a j e -> a i e
37 where
38
39 import Prelude
40
41 import Data.Ix
42 import Data.Array.Base