Ix and a few typos
[haskell-report.git] / libraries / headers / Ix.hs
1 module Ix ( Ix(range, index, inRange), rangeSize ) where
2
3 class Ix a where
4 range :: (a,a) -> [a]
5 index :: (a,a) -> a -> Int
6 inRange :: (a,a) -> a -> Bool
7 rangeSize :: (a,a) -> Int
8
9 instance Ix Char where ...
10 instance Ix Int where ...
11 instance Ix Integer where ...
12 instance (Ix a, Ix b) => Ix (a,b) where ...
13 -- et cetera
14 instance Ix Bool where ...
15 instance Ix Ordering where ...