Prime -> 2010
[haskell-report.git] / report / lib-hdrs / Array.hs
1 module Array (
2 module Ix, -- export all of Ix for convenience
3 Array, array, listArray, (!), bounds, indices, elems, assocs,
4 accumArray, (//), accum, ixmap ) where
5
6 import Ix
7
8 infixl 9 !, //
9
10 data (Ix a) => Array a b = ... -- Abstract
11
12 array :: (Ix a) => (a,a) -> [(a,b)] -> Array a b
13 listArray :: (Ix a) => (a,a) -> [b] -> Array a b
14 (!) :: (Ix a) => Array a b -> a -> b
15 bounds :: (Ix a) => Array a b -> (a,a)
16 indices :: (Ix a) => Array a b -> [a]
17 elems :: (Ix a) => Array a b -> [b]
18 assocs :: (Ix a) => Array a b -> [(a,b)]
19 accumArray :: (Ix a) => (b -> c -> b) -> b -> (a,a) -> [(a,c)]
20 -> Array a b
21 (//) :: (Ix a) => Array a b -> [(a,b)] -> Array a b
22 accum :: (Ix a) => (b -> c -> b) -> Array a b -> [(a,c)]
23 -> Array a b
24 ixmap :: (Ix a, Ix b) => (a,a) -> (a -> b) -> Array b c
25 -> Array a c
26
27 instance Functor (Array a) where ...
28 instance (Ix a, Eq b) => Eq (Array a b) where ...
29 instance (Ix a, Ord b) => Ord (Array a b) where ...
30 instance (Ix a, Show a, Show b) => Show (Array a b) where ...
31 instance (Ix a, Read a, Read b) => Read (Array a b) where ...
32