{-# LANGUAGE MagicHash #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK not-home #-}
module GHC.Ix (
Ix(..), indexError
) where
import GHC.Enum
import GHC.Num
import GHC.Base
import GHC.Real( fromIntegral )
import GHC.Show
import GHC.Tuple (Solo (..))
class (Ord a) => Ix a where
{-# MINIMAL range, (index | unsafeIndex), inRange #-}
range :: (a,a) -> [a]
index :: (a,a) -> a -> Int
unsafeIndex :: (a,a) -> a -> Int
inRange :: (a,a) -> a -> Bool
rangeSize :: (a,a) -> Int
unsafeRangeSize :: (a,a) -> Int
{-# INLINE index #-}
index (a, a)
b a
i | forall a. Ix a => (a, a) -> a -> Bool
inRange (a, a)
b a
i = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a, a)
b a
i
| Bool
otherwise = Int
hopelessIndexError
unsafeIndex (a, a)
b a
i = forall a. Ix a => (a, a) -> a -> Int
index (a, a)
b a
i
rangeSize b :: (a, a)
b@(a
_l,a
h) | forall a. Ix a => (a, a) -> a -> Bool
inRange (a, a)
b a
h = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a, a)
b a
h forall a. Num a => a -> a -> a
+ Int
1
| Bool
otherwise = Int
0
unsafeRangeSize b :: (a, a)
b@(a
_l,a
h) = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a, a)
b a
h forall a. Num a => a -> a -> a
+ Int
1
{-# NOINLINE indexError #-}
indexError :: Show a => (a,a) -> a -> String -> b
indexError :: forall a b. Show a => (a, a) -> a -> String -> b
indexError (a, a)
rng a
i String
tp
= forall a. String -> a
errorWithoutStackTrace (String -> String -> String
showString String
"Ix{" forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String -> String
showString String
tp forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String -> String
showString String
"}.index: Index " forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Bool -> (String -> String) -> String -> String
showParen Bool
True (forall a. Show a => Int -> a -> String -> String
showsPrec Int
0 a
i) forall b c a. (b -> c) -> (a -> b) -> a -> c
.
String -> String -> String
showString String
" out of range " forall a b. (a -> b) -> a -> b
$
Bool -> (String -> String) -> String -> String
showParen Bool
True (forall a. Show a => Int -> a -> String -> String
showsPrec Int
0 (a, a)
rng) String
"")
hopelessIndexError :: Int
hopelessIndexError :: Int
hopelessIndexError = forall a. String -> a
errorWithoutStackTrace String
"Error in array index"
instance Ix Char where
{-# INLINE range #-}
range :: (Char, Char) -> String
range (Char
m,Char
n) = [Char
m..Char
n]
{-# INLINE unsafeIndex #-}
unsafeIndex :: (Char, Char) -> Char -> Int
unsafeIndex (Char
m,Char
_n) Char
i = forall a. Enum a => a -> Int
fromEnum Char
i forall a. Num a => a -> a -> a
- forall a. Enum a => a -> Int
fromEnum Char
m
{-# INLINE index #-}
index :: (Char, Char) -> Char -> Int
index (Char, Char)
b Char
i | forall a. Ix a => (a, a) -> a -> Bool
inRange (Char, Char)
b Char
i = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (Char, Char)
b Char
i
| Bool
otherwise = forall a b. Show a => (a, a) -> a -> String -> b
indexError (Char, Char)
b Char
i String
"Char"
inRange :: (Char, Char) -> Char -> Bool
inRange (Char
m,Char
n) Char
i = Char
m forall a. Ord a => a -> a -> Bool
<= Char
i Bool -> Bool -> Bool
&& Char
i forall a. Ord a => a -> a -> Bool
<= Char
n
instance Ix Int where
{-# INLINE range #-}
range :: (Int, Int) -> [Int]
range (Int
m,Int
n) = [Int
m..Int
n]
{-# INLINE unsafeIndex #-}
unsafeIndex :: (Int, Int) -> Int -> Int
unsafeIndex (Int
m,Int
_n) Int
i = Int
i forall a. Num a => a -> a -> a
- Int
m
{-# INLINE index #-}
index :: (Int, Int) -> Int -> Int
index (Int, Int)
b Int
i | forall a. Ix a => (a, a) -> a -> Bool
inRange (Int, Int)
b Int
i = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (Int, Int)
b Int
i
| Bool
otherwise = forall a b. Show a => (a, a) -> a -> String -> b
indexError (Int, Int)
b Int
i String
"Int"
{-# INLINE inRange #-}
inRange :: (Int, Int) -> Int -> Bool
inRange (I# Int#
m,I# Int#
n) (I# Int#
i) = Int# -> Bool
isTrue# (Int#
m Int# -> Int# -> Int#
<=# Int#
i) Bool -> Bool -> Bool
&& Int# -> Bool
isTrue# (Int#
i Int# -> Int# -> Int#
<=# Int#
n)
instance Ix Word where
range :: (Word, Word) -> [Word]
range (Word
m,Word
n) = [Word
m..Word
n]
unsafeIndex :: (Word, Word) -> Word -> Int
unsafeIndex (Word
m,Word
_) Word
i = forall a b. (Integral a, Num b) => a -> b
fromIntegral (Word
i forall a. Num a => a -> a -> a
- Word
m)
inRange :: (Word, Word) -> Word -> Bool
inRange (Word
m,Word
n) Word
i = Word
m forall a. Ord a => a -> a -> Bool
<= Word
i Bool -> Bool -> Bool
&& Word
i forall a. Ord a => a -> a -> Bool
<= Word
n
instance Ix Integer where
{-# INLINE range #-}
range :: (Integer, Integer) -> [Integer]
range (Integer
m,Integer
n) = [Integer
m..Integer
n]
{-# INLINE unsafeIndex #-}
unsafeIndex :: (Integer, Integer) -> Integer -> Int
unsafeIndex (Integer
m,Integer
_n) Integer
i = forall a. Num a => Integer -> a
fromInteger (Integer
i forall a. Num a => a -> a -> a
- Integer
m)
{-# INLINE index #-}
index :: (Integer, Integer) -> Integer -> Int
index (Integer, Integer)
b Integer
i | forall a. Ix a => (a, a) -> a -> Bool
inRange (Integer, Integer)
b Integer
i = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (Integer, Integer)
b Integer
i
| Bool
otherwise = forall a b. Show a => (a, a) -> a -> String -> b
indexError (Integer, Integer)
b Integer
i String
"Integer"
inRange :: (Integer, Integer) -> Integer -> Bool
inRange (Integer
m,Integer
n) Integer
i = Integer
m forall a. Ord a => a -> a -> Bool
<= Integer
i Bool -> Bool -> Bool
&& Integer
i forall a. Ord a => a -> a -> Bool
<= Integer
n
instance Ix Natural where
range :: (Natural, Natural) -> [Natural]
range (Natural
m,Natural
n) = [Natural
m..Natural
n]
inRange :: (Natural, Natural) -> Natural -> Bool
inRange (Natural
m,Natural
n) Natural
i = Natural
m forall a. Ord a => a -> a -> Bool
<= Natural
i Bool -> Bool -> Bool
&& Natural
i forall a. Ord a => a -> a -> Bool
<= Natural
n
unsafeIndex :: (Natural, Natural) -> Natural -> Int
unsafeIndex (Natural
m,Natural
_) Natural
i = forall a b. (Integral a, Num b) => a -> b
fromIntegral (Natural
iforall a. Num a => a -> a -> a
-Natural
m)
index :: (Natural, Natural) -> Natural -> Int
index (Natural, Natural)
b Natural
i | forall a. Ix a => (a, a) -> a -> Bool
inRange (Natural, Natural)
b Natural
i = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (Natural, Natural)
b Natural
i
| Bool
otherwise = forall a b. Show a => (a, a) -> a -> String -> b
indexError (Natural, Natural)
b Natural
i String
"Natural"
instance Ix Bool where
{-# INLINE range #-}
range :: (Bool, Bool) -> [Bool]
range (Bool
m,Bool
n) = [Bool
m..Bool
n]
{-# INLINE unsafeIndex #-}
unsafeIndex :: (Bool, Bool) -> Bool -> Int
unsafeIndex (Bool
l,Bool
_) Bool
i = forall a. Enum a => a -> Int
fromEnum Bool
i forall a. Num a => a -> a -> a
- forall a. Enum a => a -> Int
fromEnum Bool
l
{-# INLINE index #-}
index :: (Bool, Bool) -> Bool -> Int
index (Bool, Bool)
b Bool
i | forall a. Ix a => (a, a) -> a -> Bool
inRange (Bool, Bool)
b Bool
i = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (Bool, Bool)
b Bool
i
| Bool
otherwise = forall a b. Show a => (a, a) -> a -> String -> b
indexError (Bool, Bool)
b Bool
i String
"Bool"
inRange :: (Bool, Bool) -> Bool -> Bool
inRange (Bool
l,Bool
u) Bool
i = forall a. Enum a => a -> Int
fromEnum Bool
i forall a. Ord a => a -> a -> Bool
>= forall a. Enum a => a -> Int
fromEnum Bool
l Bool -> Bool -> Bool
&& forall a. Enum a => a -> Int
fromEnum Bool
i forall a. Ord a => a -> a -> Bool
<= forall a. Enum a => a -> Int
fromEnum Bool
u
instance Ix Ordering where
{-# INLINE range #-}
range :: (Ordering, Ordering) -> [Ordering]
range (Ordering
m,Ordering
n) = [Ordering
m..Ordering
n]
{-# INLINE unsafeIndex #-}
unsafeIndex :: (Ordering, Ordering) -> Ordering -> Int
unsafeIndex (Ordering
l,Ordering
_) Ordering
i = forall a. Enum a => a -> Int
fromEnum Ordering
i forall a. Num a => a -> a -> a
- forall a. Enum a => a -> Int
fromEnum Ordering
l
{-# INLINE index #-}
index :: (Ordering, Ordering) -> Ordering -> Int
index (Ordering, Ordering)
b Ordering
i | forall a. Ix a => (a, a) -> a -> Bool
inRange (Ordering, Ordering)
b Ordering
i = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (Ordering, Ordering)
b Ordering
i
| Bool
otherwise = forall a b. Show a => (a, a) -> a -> String -> b
indexError (Ordering, Ordering)
b Ordering
i String
"Ordering"
inRange :: (Ordering, Ordering) -> Ordering -> Bool
inRange (Ordering
l,Ordering
u) Ordering
i = forall a. Enum a => a -> Int
fromEnum Ordering
i forall a. Ord a => a -> a -> Bool
>= forall a. Enum a => a -> Int
fromEnum Ordering
l Bool -> Bool -> Bool
&& forall a. Enum a => a -> Int
fromEnum Ordering
i forall a. Ord a => a -> a -> Bool
<= forall a. Enum a => a -> Int
fromEnum Ordering
u
instance Ix () where
{-# INLINE range #-}
range :: ((), ()) -> [()]
range ((), ()) = [()]
{-# INLINE unsafeIndex #-}
unsafeIndex :: ((), ()) -> () -> Int
unsafeIndex ((), ()) () = Int
0
{-# INLINE inRange #-}
inRange :: ((), ()) -> () -> Bool
inRange ((), ()) () = Bool
True
{-# INLINE index #-}
index :: ((), ()) -> () -> Int
index ((), ())
b ()
i = forall a. Ix a => (a, a) -> a -> Int
unsafeIndex ((), ())
b ()
i
instance Ix a => Ix (Solo a) where
{-# SPECIALISE instance Ix (Solo Int) #-}
{-# INLINE range #-}
range :: (Solo a, Solo a) -> [Solo a]
range (Solo a
l, Solo a
u) =
[ forall a. a -> Solo a
Solo a
i | a
i <- forall a. Ix a => (a, a) -> [a]
range (a
l,a
u) ]
{-# INLINE unsafeIndex #-}
unsafeIndex :: (Solo a, Solo a) -> Solo a -> Int
unsafeIndex (Solo a
l, Solo a
u) (Solo a
i) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a
l,a
u) a
i
{-# INLINE inRange #-}
inRange :: (Solo a, Solo a) -> Solo a -> Bool
inRange (Solo a
l, Solo a
u) (Solo a
i) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a
l, a
u) a
i
instance (Ix a, Ix b) => Ix (a, b) where
{-# SPECIALISE instance Ix (Int,Int) #-}
{-# INLINE range #-}
range :: ((a, b), (a, b)) -> [(a, b)]
range ((a
l1,b
l2),(a
u1,b
u2)) =
[ (a
i1,b
i2) | a
i1 <- forall a. Ix a => (a, a) -> [a]
range (a
l1,a
u1), b
i2 <- forall a. Ix a => (a, a) -> [a]
range (b
l2,b
u2) ]
{-# INLINE unsafeIndex #-}
unsafeIndex :: ((a, b), (a, b)) -> (a, b) -> Int
unsafeIndex ((a
l1,b
l2),(a
u1,b
u2)) (a
i1,b
i2) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a
l1,a
u1) a
i1 forall a. Num a => a -> a -> a
* forall a. Ix a => (a, a) -> Int
unsafeRangeSize (b
l2,b
u2) forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (b
l2,b
u2) b
i2
{-# INLINE inRange #-}
inRange :: ((a, b), (a, b)) -> (a, b) -> Bool
inRange ((a
l1,b
l2),(a
u1,b
u2)) (a
i1,b
i2) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a
l1,a
u1) a
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (b
l2,b
u2) b
i2
instance (Ix a1, Ix a2, Ix a3) => Ix (a1,a2,a3) where
{-# SPECIALISE instance Ix (Int,Int,Int) #-}
range :: ((a1, a2, a3), (a1, a2, a3)) -> [(a1, a2, a3)]
range ((a1
l1,a2
l2,a3
l3),(a1
u1,a2
u2,a3
u3)) =
[(a1
i1,a2
i2,a3
i3) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3)]
unsafeIndex :: ((a1, a2, a3), (a1, a2, a3)) -> (a1, a2, a3) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3),(a1
u1,a2
u2,a3
u3)) (a1
i1,a2
i2,a3
i3) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1))
inRange :: ((a1, a2, a3), (a1, a2, a3)) -> (a1, a2, a3) -> Bool
inRange ((a1
l1,a2
l2,a3
l3),(a1
u1,a2
u2,a3
u3)) (a1
i1,a2
i2,a3
i3) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3
instance (Ix a1, Ix a2, Ix a3, Ix a4) => Ix (a1,a2,a3,a4) where
range :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> [(a1, a2, a3, a4)]
range ((a1
l1,a2
l2,a3
l3,a4
l4),(a1
u1,a2
u2,a3
u3,a4
u4)) =
[(a1
i1,a2
i2,a3
i3,a4
i4) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4)]
unsafeIndex :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> (a1, a2, a3, a4) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4),(a1
u1,a2
u2,a3
u3,a4
u4)) (a1
i1,a2
i2,a3
i3,a4
i4) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1)))
inRange :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> (a1, a2, a3, a4) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4),(a1
u1,a2
u2,a3
u3,a4
u4)) (a1
i1,a2
i2,a3
i3,a4
i4) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5) => Ix (a1,a2,a3,a4,a5) where
range :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5))
-> [(a1, a2, a3, a4, a5)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5)]
unsafeIndex :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5))
-> (a1, a2, a3, a4, a5) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5)) (a1
i1,a2
i2,a3
i3,a4
i4,a5
i5) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1))))
inRange :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5))
-> (a1, a2, a3, a4, a5) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5)) (a1
i1,a2
i2,a3
i3,a4
i4,a5
i5) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6) =>
Ix (a1,a2,a3,a4,a5,a6) where
range :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6))
-> [(a1, a2, a3, a4, a5, a6)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6))
-> (a1, a2, a3, a4, a5, a6) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6)) (a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1)))))
inRange :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6))
-> (a1, a2, a3, a4, a5, a6) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6)) (a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7) =>
Ix (a1,a2,a3,a4,a5,a6,a7) where
range :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7))
-> [(a1, a2, a3, a4, a5, a6, a7)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7))
-> (a1, a2, a3, a4, a5, a6, a7) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7))
-> (a1, a2, a3, a4, a5, a6, a7) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8) =>
Ix (a1,a2,a3,a4,a5,a6,a7,a8) where
range :: ((a1, a2, a3, a4, a5, a6, a7, a8),
(a1, a2, a3, a4, a5, a6, a7, a8))
-> [(a1, a2, a3, a4, a5, a6, a7, a8)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7),
a8
i8 <- forall a. Ix a => (a, a) -> [a]
range (a8
l8,a8
u8)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8),
(a1, a2, a3, a4, a5, a6, a7, a8))
-> (a1, a2, a3, a4, a5, a6, a7, a8) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a8
l8,a8
u8) a8
i8 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a8
l8,a8
u8) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1)))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8),
(a1, a2, a3, a4, a5, a6, a7, a8))
-> (a1, a2, a3, a4, a5, a6, a7, a8) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a8
l8,a8
u8) a8
i8
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9) =>
Ix (a1,a2,a3,a4,a5,a6,a7,a8,a9) where
range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9),
(a1, a2, a3, a4, a5, a6, a7, a8, a9))
-> [(a1, a2, a3, a4, a5, a6, a7, a8, a9)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7),
a8
i8 <- forall a. Ix a => (a, a) -> [a]
range (a8
l8,a8
u8),
a9
i9 <- forall a. Ix a => (a, a) -> [a]
range (a9
l9,a9
u9)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9),
(a1, a2, a3, a4, a5, a6, a7, a8, a9))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a9
l9,a9
u9) a9
i9 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a9
l9,a9
u9) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a8
l8,a8
u8) a8
i8 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a8
l8,a8
u8) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1))))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9),
(a1, a2, a3, a4, a5, a6, a7, a8, a9))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a8
l8,a8
u8) a8
i8 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a9
l9,a9
u9) a9
i9
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9,
Ix aA) =>
Ix (a1,a2,a3,a4,a5,a6,a7,a8,a9,aA) where
range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA))
-> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7),
a8
i8 <- forall a. Ix a => (a, a) -> [a]
range (a8
l8,a8
u8),
a9
i9 <- forall a. Ix a => (a, a) -> [a]
range (a9
l9,a9
u9),
aA
iA <- forall a. Ix a => (a, a) -> [a]
range (aA
lA,aA
uA)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aA
lA,aA
uA) aA
iA forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aA
lA,aA
uA) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a9
l9,a9
u9) a9
i9 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a9
l9,a9
u9) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a8
l8,a8
u8) a8
i8 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a8
l8,a8
u8) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1)))))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA),(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a8
l8,a8
u8) a8
i8 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a9
l9,a9
u9) a9
i9 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aA
lA,aA
uA) aA
iA
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9,
Ix aA, Ix aB) =>
Ix (a1,a2,a3,a4,a5,a6,a7,a8,a9,aA,aB) where
range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB))
-> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7),
a8
i8 <- forall a. Ix a => (a, a) -> [a]
range (a8
l8,a8
u8),
a9
i9 <- forall a. Ix a => (a, a) -> [a]
range (a9
l9,a9
u9),
aA
iA <- forall a. Ix a => (a, a) -> [a]
range (aA
lA,aA
uA),
aB
iB <- forall a. Ix a => (a, a) -> [a]
range (aB
lB,aB
uB)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aB
lB,aB
uB) aB
iB forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aB
lB,aB
uB) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aA
lA,aA
uA) aA
iA forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aA
lA,aA
uA) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a9
l9,a9
u9) a9
i9 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a9
l9,a9
u9) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a8
l8,a8
u8) a8
i8 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a8
l8,a8
u8) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1))))))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a8
l8,a8
u8) a8
i8 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a9
l9,a9
u9) a9
i9 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aA
lA,aA
uA) aA
iA Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aB
lB,aB
uB) aB
iB
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9,
Ix aA, Ix aB, Ix aC) =>
Ix (a1,a2,a3,a4,a5,a6,a7,a8,a9,aA,aB,aC) where
range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC))
-> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7),
a8
i8 <- forall a. Ix a => (a, a) -> [a]
range (a8
l8,a8
u8),
a9
i9 <- forall a. Ix a => (a, a) -> [a]
range (a9
l9,a9
u9),
aA
iA <- forall a. Ix a => (a, a) -> [a]
range (aA
lA,aA
uA),
aB
iB <- forall a. Ix a => (a, a) -> [a]
range (aB
lB,aB
uB),
aC
iC <- forall a. Ix a => (a, a) -> [a]
range (aC
lC,aC
uC)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aC
lC,aC
uC) aC
iC forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aC
lC,aC
uC) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aB
lB,aB
uB) aB
iB forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aB
lB,aB
uB) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aA
lA,aA
uA) aA
iA forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aA
lA,aA
uA) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a9
l9,a9
u9) a9
i9 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a9
l9,a9
u9) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a8
l8,a8
u8) a8
i8 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a8
l8,a8
u8) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1)))))))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a8
l8,a8
u8) a8
i8 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a9
l9,a9
u9) a9
i9 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aA
lA,aA
uA) aA
iA Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aB
lB,aB
uB) aB
iB Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aC
lC,aC
uC) aC
iC
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9,
Ix aA, Ix aB, Ix aC, Ix aD) =>
Ix (a1,a2,a3,a4,a5,a6,a7,a8,a9,aA,aB,aC,aD) where
range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD))
-> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7),
a8
i8 <- forall a. Ix a => (a, a) -> [a]
range (a8
l8,a8
u8),
a9
i9 <- forall a. Ix a => (a, a) -> [a]
range (a9
l9,a9
u9),
aA
iA <- forall a. Ix a => (a, a) -> [a]
range (aA
lA,aA
uA),
aB
iB <- forall a. Ix a => (a, a) -> [a]
range (aB
lB,aB
uB),
aC
iC <- forall a. Ix a => (a, a) -> [a]
range (aC
lC,aC
uC),
aD
iD <- forall a. Ix a => (a, a) -> [a]
range (aD
lD,aD
uD)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aD
lD,aD
uD) aD
iD forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aD
lD,aD
uD) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aC
lC,aC
uC) aC
iC forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aC
lC,aC
uC) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aB
lB,aB
uB) aB
iB forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aB
lB,aB
uB) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aA
lA,aA
uA) aA
iA forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aA
lA,aA
uA) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a9
l9,a9
u9) a9
i9 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a9
l9,a9
u9) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a8
l8,a8
u8) a8
i8 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a8
l8,a8
u8) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1))))))))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a8
l8,a8
u8) a8
i8 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a9
l9,a9
u9) a9
i9 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aA
lA,aA
uA) aA
iA Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aB
lB,aB
uB) aB
iB Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aC
lC,aC
uC) aC
iC Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aD
lD,aD
uD) aD
iD
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9,
Ix aA, Ix aB, Ix aC, Ix aD, Ix aE) =>
Ix (a1,a2,a3,a4,a5,a6,a7,a8,a9,aA,aB,aC,aD,aE) where
range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE))
-> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD,aE
lE),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD,aE
uE)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD,aE
iE) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7),
a8
i8 <- forall a. Ix a => (a, a) -> [a]
range (a8
l8,a8
u8),
a9
i9 <- forall a. Ix a => (a, a) -> [a]
range (a9
l9,a9
u9),
aA
iA <- forall a. Ix a => (a, a) -> [a]
range (aA
lA,aA
uA),
aB
iB <- forall a. Ix a => (a, a) -> [a]
range (aB
lB,aB
uB),
aC
iC <- forall a. Ix a => (a, a) -> [a]
range (aC
lC,aC
uC),
aD
iD <- forall a. Ix a => (a, a) -> [a]
range (aD
lD,aD
uD),
aE
iE <- forall a. Ix a => (a, a) -> [a]
range (aE
lE,aE
uE)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE) -> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD,aE
lE),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD,aE
uE))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD,aE
iE) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aE
lE,aE
uE) aE
iE forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aE
lE,aE
uE) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aD
lD,aD
uD) aD
iD forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aD
lD,aD
uD) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aC
lC,aC
uC) aC
iC forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aC
lC,aC
uC) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aB
lB,aB
uB) aB
iB forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aB
lB,aB
uB) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aA
lA,aA
uA) aA
iA forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aA
lA,aA
uA) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a9
l9,a9
u9) a9
i9 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a9
l9,a9
u9) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a8
l8,a8
u8) a8
i8 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a8
l8,a8
u8) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1)))))))))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE) -> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD,aE
lE),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD,aE
uE))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD,aE
iE) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a8
l8,a8
u8) a8
i8 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a9
l9,a9
u9) a9
i9 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aA
lA,aA
uA) aA
iA Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aB
lB,aB
uB) aB
iB Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aC
lC,aC
uC) aC
iC Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aD
lD,aD
uD) aD
iD Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aE
lE,aE
uE) aE
iE
instance (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9,
Ix aA, Ix aB, Ix aC, Ix aD, Ix aE, Ix aF) =>
Ix (a1,a2,a3,a4,a5,a6,a7,a8,a9,aA,aB,aC,aD,aE,aF) where
range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF))
-> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)]
range ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD,aE
lE,aF
lF),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD,aE
uE,aF
uF)) =
[(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD,aE
iE,aF
iF) | a1
i1 <- forall a. Ix a => (a, a) -> [a]
range (a1
l1,a1
u1),
a2
i2 <- forall a. Ix a => (a, a) -> [a]
range (a2
l2,a2
u2),
a3
i3 <- forall a. Ix a => (a, a) -> [a]
range (a3
l3,a3
u3),
a4
i4 <- forall a. Ix a => (a, a) -> [a]
range (a4
l4,a4
u4),
a5
i5 <- forall a. Ix a => (a, a) -> [a]
range (a5
l5,a5
u5),
a6
i6 <- forall a. Ix a => (a, a) -> [a]
range (a6
l6,a6
u6),
a7
i7 <- forall a. Ix a => (a, a) -> [a]
range (a7
l7,a7
u7),
a8
i8 <- forall a. Ix a => (a, a) -> [a]
range (a8
l8,a8
u8),
a9
i9 <- forall a. Ix a => (a, a) -> [a]
range (a9
l9,a9
u9),
aA
iA <- forall a. Ix a => (a, a) -> [a]
range (aA
lA,aA
uA),
aB
iB <- forall a. Ix a => (a, a) -> [a]
range (aB
lB,aB
uB),
aC
iC <- forall a. Ix a => (a, a) -> [a]
range (aC
lC,aC
uC),
aD
iD <- forall a. Ix a => (a, a) -> [a]
range (aD
lD,aD
uD),
aE
iE <- forall a. Ix a => (a, a) -> [a]
range (aE
lE,aE
uE),
aF
iF <- forall a. Ix a => (a, a) -> [a]
range (aF
lF,aF
uF)]
unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)
-> Int
unsafeIndex ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD,aE
lE,aF
lF),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD,aE
uE,aF
uF))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD,aE
iE,aF
iF) =
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aF
lF,aF
uF) aF
iF forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aF
lF,aF
uF) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aE
lE,aE
uE) aE
iE forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aE
lE,aE
uE) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aD
lD,aD
uD) aD
iD forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aD
lD,aD
uD) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aC
lC,aC
uC) aC
iC forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aC
lC,aC
uC) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aB
lB,aB
uB) aB
iB forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aB
lB,aB
uB) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (aA
lA,aA
uA) aA
iA forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (aA
lA,aA
uA) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a9
l9,a9
u9) a9
i9 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a9
l9,a9
u9) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a8
l8,a8
u8) a8
i8 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a8
l8,a8
u8) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a7
l7,a7
u7) a7
i7 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a7
l7,a7
u7) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a6
l6,a6
u6) a6
i6 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a6
l6,a6
u6) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a5
l5,a5
u5) a5
i5 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a5
l5,a5
u5) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a4
l4,a4
u4) a4
i4 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a4
l4,a4
u4) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a3
l3,a3
u3) a3
i3 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a3
l3,a3
u3) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a2
l2,a2
u2) a2
i2 forall a. Num a => a -> a -> a
+ forall a. Ix a => (a, a) -> Int
unsafeRangeSize (a2
l2,a2
u2) forall a. Num a => a -> a -> a
* (
forall a. Ix a => (a, a) -> a -> Int
unsafeIndex (a1
l1,a1
u1) a1
i1))))))))))))))
inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF),
(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF))
-> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)
-> Bool
inRange ((a1
l1,a2
l2,a3
l3,a4
l4,a5
l5,a6
l6,a7
l7,a8
l8,a9
l9,aA
lA,aB
lB,aC
lC,aD
lD,aE
lE,aF
lF),
(a1
u1,a2
u2,a3
u3,a4
u4,a5
u5,a6
u6,a7
u7,a8
u8,a9
u9,aA
uA,aB
uB,aC
uC,aD
uD,aE
uE,aF
uF))
(a1
i1,a2
i2,a3
i3,a4
i4,a5
i5,a6
i6,a7
i7,a8
i8,a9
i9,aA
iA,aB
iB,aC
iC,aD
iD,aE
iE,aF
iF) =
forall a. Ix a => (a, a) -> a -> Bool
inRange (a1
l1,a1
u1) a1
i1 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a2
l2,a2
u2) a2
i2 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a3
l3,a3
u3) a3
i3 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a4
l4,a4
u4) a4
i4 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a5
l5,a5
u5) a5
i5 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a6
l6,a6
u6) a6
i6 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a7
l7,a7
u7) a7
i7 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (a8
l8,a8
u8) a8
i8 Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (a9
l9,a9
u9) a9
i9 Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aA
lA,aA
uA) aA
iA Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aB
lB,aB
uB) aB
iB Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aC
lC,aC
uC) aC
iC Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aD
lD,aD
uD) aD
iD Bool -> Bool -> Bool
&& forall a. Ix a => (a, a) -> a -> Bool
inRange (aE
lE,aE
uE) aE
iE Bool -> Bool -> Bool
&&
forall a. Ix a => (a, a) -> a -> Bool
inRange (aF
lF,aF
uF) aF
iF