- Ix
- ( range -- :: (Ix a) => (a,a) -> [a]
- , index -- :: (Ix a) => (a,a) -> a -> Int
- , inRange -- :: (Ix a) => (a,a) -> a -> Bool
- , rangeSize -- :: (Ix a) => (a,a) -> Int
- )
+ Ix
+ ( range -- :: (Ix a) => (a,a) -> [a]
+ , index -- :: (Ix a) => (a,a) -> a -> Int
+ , inRange -- :: (Ix a) => (a,a) -> a -> Bool
+ , rangeSize -- :: (Ix a) => (a,a) -> Int
+ )
- -- > range (Yellow,Blue) == [Yellow,Green,Blue]
- -- > index (Yellow,Blue) Green == 1
- -- > inRange (Yellow,Blue) Red == False
+ -- > range (Yellow,Blue) == [Yellow,Green,Blue]
+ -- > index (Yellow,Blue) Green == 1
+ -- > inRange (Yellow,Blue) Red == False
--
-- * For single-constructor datatypes, the derived instance declarations
-- are as shown for tuples in Figure 1
--
-- * For single-constructor datatypes, the derived instance declarations
-- are as shown for tuples in Figure 1