[project @ 2002-04-24 16:31:37 by simonmar]
[ghc-base.git] / Data / Ix.hs
1 -----------------------------------------------------------------------------
2 -- |
3 -- Module      :  Data.Ix
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   :  provisional
9 -- Portability :  portable
10 --
11 -- $Id: Ix.hs,v 1.3 2002/04/24 16:31:39 simonmar Exp $
12 --
13 -- Class of index types.
14 --
15 -----------------------------------------------------------------------------
16
17 module Data.Ix
18     (
19         Ix
20           ( range       -- :: (Ix a) => (a,a) -> [a]
21           , index       -- :: (Ix a) => (a,a) -> a   -> Int
22           , inRange     -- :: (Ix a) => (a,a) -> a   -> Bool
23           , rangeSize   -- :: (Ix a) => (a,a) -> Int
24           )
25     -- Ix instances:
26     --
27     --  Ix Char
28     --  Ix Int
29     --  Ix Integer
30     --  Ix Bool
31     --  Ix Ordering
32     --  Ix ()
33     --  (Ix a, Ix b) => Ix (a, b)
34     --  ...
35
36     -- Implementation checked wrt. Haskell 98 lib report, 1/99.
37     ) where
38
39 import Prelude
40
41 #ifdef __GLASGOW_HASKELL__
42 import GHC.Arr
43 #endif