ac5199d8126829d12b9cc9d87e2d4d3194fcd7eb
[haskell-report.git] / report / lib-hdrs / Ix.hs
1 module Ix ( Ix(range, index, inRange, rangeSize) ) where
2
3 class Ord a => 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 ...