X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FArray%2FIArray.hs;h=2a887649da2445e3e9ae01d8ec7b1b25db1a2116;hb=6b1a36a595eddf1e124529646afdb75c76a9966d;hp=5c7c57f590c2d80f24f0879dfb5fedd35a231a56;hpb=634212177b3810448c96e171ccaf73fa357400b3;p=haskell-directory.git diff --git a/Data/Array/IArray.hs b/Data/Array/IArray.hs index 5c7c57f..2a88764 100644 --- a/Data/Array/IArray.hs +++ b/Data/Array/IArray.hs @@ -6,56 +6,46 @@ -- -- Maintainer : libraries@haskell.org -- Stability : experimental --- Portability : non-portable +-- Portability : non-portable (uses Data.Array.Base) -- --- Immutable arrays, with an overloaded interface. For array types --- which can be used with this interface, see "Data.Array", --- "Data.Array.Unboxed", and "Data.Array.Diff". +-- Immutable arrays, with an overloaded interface. For array types which +-- can be used with this interface, see the 'Array' type exported by this +-- module, and the "Data.Array.Unboxed" and "Data.Array.Diff" modules. -- ----------------------------------------------------------------------------- module Data.Array.IArray ( - -- * Class of immutable array types + -- * Array classes IArray, -- :: (* -> * -> *) -> * -> class - -- * Class of array types with immutable bounds - HasBounds, -- :: (* -> * -> *) -> class + module Data.Ix, - -- * Ordinary boxed/lazy arrays + -- * Immutable non-strict (boxed) arrays Array, - -- * The @Ix@ class and operations - module Data.Ix, - -- * Array construction array, -- :: (IArray a e, Ix i) => (i,i) -> [(i, e)] -> a i e listArray, -- :: (IArray a e, Ix i) => (i,i) -> [e] -> a i e accumArray, -- :: (IArray a e, Ix i) => (e -> e' -> e) -> e -> (i,i) -> [(i, e')] -> a i e - -- * Indexing arrays + -- * Accessing arrays (!), -- :: (IArray a e, Ix i) => a i e -> i -> e + bounds, -- :: (HasBounds a, Ix i) => a i e -> (i,i) + indices, -- :: (HasBounds a, Ix i) => a i e -> [i] + elems, -- :: (IArray a e, Ix i) => a i e -> [e] + assocs, -- :: (IArray a e, Ix i) => a i e -> [(i, e)] - -- * Incremental updates + -- * Incremental array updates (//), -- :: (IArray a e, Ix i) => a i e -> [(i, e)] -> a i e accum, -- :: (IArray a e, Ix i) => (e -> e' -> e) -> a i e -> [(i, e')] -> a i e - -- * Derived Arrays + -- * Derived arrays amap, -- :: (IArray a e', IArray a e, Ix i) => (e' -> e) -> a i e' -> a i e ixmap, -- :: (IArray a e, Ix i, Ix j) => (i,i) -> (i -> j) -> a j e -> a i e - - -- * Deconstructing arrays - bounds, -- :: (HasBounds a, Ix i) => a i e -> (i,i) - indices, -- :: (HasBounds a, Ix i) => a i e -> [i] - elems, -- :: (IArray a e, Ix i) => a i e -> [e] - assocs, -- :: (IArray a e, Ix i) => a i e -> [(i, e)] ) where import Prelude import Data.Ix import Data.Array (Array) -#ifdef __HUGS__ -import Hugs.Array.Base -#else import Data.Array.Base -#endif