add install-includes: field
[packages/pretty.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/base/LICENSE)
6 --
7 -- Maintainer : libraries@haskell.org
8 -- Stability : experimental
9 -- Portability : non-portable (uses Data.Array.Base)
10 --
11 -- Immutable arrays, with an overloaded interface. For array types which
12 -- can be used with this interface, see the 'Array' type exported by this
13 -- module, and the "Data.Array.Unboxed" and "Data.Array.Diff" modules.
14 --
15 -----------------------------------------------------------------------------
16
17 module Data.Array.IArray (
18 -- * Array classes
19 IArray, -- :: (* -> * -> *) -> * -> class
20
21 module Data.Ix,
22
23 -- * Immutable non-strict (boxed) arrays
24 Array,
25
26 -- * Array construction
27 array, -- :: (IArray a e, Ix i) => (i,i) -> [(i, e)] -> a i e
28 listArray, -- :: (IArray a e, Ix i) => (i,i) -> [e] -> a i e
29 accumArray, -- :: (IArray a e, Ix i) => (e -> e' -> e) -> e -> (i,i) -> [(i, e')] -> a i e
30
31 -- * Accessing arrays
32 (!), -- :: (IArray a e, Ix i) => a i e -> i -> e
33 bounds, -- :: (HasBounds a, Ix i) => a i e -> (i,i)
34 indices, -- :: (HasBounds a, Ix i) => a i e -> [i]
35 elems, -- :: (IArray a e, Ix i) => a i e -> [e]
36 assocs, -- :: (IArray a e, Ix i) => a i e -> [(i, e)]
37
38 -- * Incremental array updates
39 (//), -- :: (IArray a e, Ix i) => a i e -> [(i, e)] -> a i e
40 accum, -- :: (IArray a e, Ix i) => (e -> e' -> e) -> a i e -> [(i, e')] -> a i e
41
42 -- * Derived arrays
43 amap, -- :: (IArray a e', IArray a e, Ix i) => (e' -> e) -> a i e' -> a i e
44 ixmap, -- :: (IArray a e, Ix i, Ix j) => (i,i) -> (i -> j) -> a j e -> a i e
45 ) where
46
47 import Prelude
48
49 import Data.Ix
50 import Data.Array (Array)
51 import Data.Array.Base