module Data.Adaptive.List where
import Data.Adaptive.Tuple
import qualified Prelude
import Prelude (Eq(..),Ord(..),Ordering(..), (.)
,Int,Char,Float,Double,Integer,Bool(..),otherwise,())
import Data.Int
import Data.Word
import Data.String
class AdaptList a where
data List a
empty :: List a
cons :: a -> List a -> List a
null :: List a -> Bool
head :: List a -> a
tail :: List a -> List a
infixr 5 ++
infixr 5 :
infix 4 `elem`, `notElem`
toList :: AdaptList a => List a -> [a]
toList xs
| null xs = []
| otherwise = head xs : toList (tail xs)
fromList :: AdaptList a => [a] -> List a
fromList [] = empty
fromList (x:xs) = x `cons` fromList xs
enumFromToList :: (AdaptList a, Ord a, Prelude.Enum a) => a -> a ->List a
enumFromToList x0 y
| x0 > y = empty
| otherwise = go x0
where
go x = x `cons` if x == y then empty else go (Prelude.succ x)
uncons :: AdaptList a => List a -> Prelude.Maybe (a, List a)
uncons xs | null xs = Prelude.Nothing
| otherwise = Prelude.Just (head xs, tail xs)
(++) :: AdaptList a => List a -> List a -> List a
(++) xs ys
| null xs = ys
| otherwise = head xs `cons` tail xs ++ ys
last :: AdaptList a => List a -> a
last xs
| null xs = errorEmptyList "last"
| otherwise = go (head xs) (tail xs)
where
go y z
| null z = y
| otherwise = go (head z) (tail z)
init :: AdaptList a => List a -> List a
init xs
| null xs = errorEmptyList "init"
| otherwise = go (head xs) (tail xs)
where
go y z
| null z = empty
| otherwise = y `cons` go (head z) (tail z)
length :: AdaptList a => List a -> Int
length xs0 = go xs0 0
where
go :: AdaptList a => List a -> Int -> Int
go xs !a
| null xs = a
| otherwise = go (tail xs) (a Prelude.+ 1)
map :: (AdaptList a, AdaptList b) => (a -> b) -> List a -> List b
map f as = go as
where
go xs
| null xs = empty
| otherwise = f (head xs) `cons` go (tail xs)
reverse :: AdaptList a => List a -> List a
reverse = foldl (Prelude.flip cons) empty
intersperse :: AdaptList a => a -> List a -> List a
intersperse sep zs
| null zs = empty
| otherwise = head zs `cons` go (tail zs)
where
go xs
| null xs = empty
| otherwise = sep `cons` (head xs `cons` go (tail xs))
intercalate :: (AdaptList (List a), AdaptList a)
=> List a -> List (List a) -> List a
intercalate sep xss = go (intersperse sep xss)
where
go ys
| null ys = empty
| otherwise = head ys ++ go (tail ys)
foldl :: AdaptList b => (a -> b -> a) -> a -> List b -> a
foldl f z0 xs0 = go z0 xs0
where
go !z xs
| null xs = z
| otherwise = go (f z (head xs)) (tail xs)
foldl1 :: AdaptList a => (a -> a -> a) -> List a -> a
foldl1 f zs
| null zs = errorEmptyList "foldl1"
| otherwise = go (head zs) (tail zs)
where
go !z xs
| null xs = z
| otherwise = go (f z (head xs)) (tail xs)
foldr :: AdaptList a => (a -> b -> b) -> b -> List a -> b
foldr k z xs = go xs
where
go ys
| null xs = z
| otherwise = head ys `k` go (tail ys)
foldr1 :: AdaptList a => (a -> a -> a) -> List a -> a
foldr1 k xs
| null xs = errorEmptyList "foldr1"
| otherwise = go (head xs) (tail xs)
where
go z ys
| null ys = z
| otherwise = z `k` go (head ys) (tail ys)
concat :: (AdaptList (List a), AdaptList a)
=> List (List a) -> List a
concat xss0 = to xss0
where
go xs xss
| null xs = to xss
| otherwise = head xs `cons` go (tail xs) xss
to xs
| null xs = empty
| otherwise = go (head xs) (tail xs)
concatMap :: (AdaptList a1, AdaptList a)
=> (a -> List a1) -> List a -> List a1
concatMap f = foldr (\x y -> f x ++ y) empty
and :: List Bool -> Bool
and xs
| null xs = True
| Prelude.not (head xs) = False
| otherwise = and (tail xs)
or :: List Bool -> Bool
or xs
| null xs = False
| head xs = True
| otherwise = or (tail xs)
any :: AdaptList a => (a -> Bool) -> List a -> Bool
any p xs0 = go xs0
where
go xs
| null xs = False
| otherwise = case p (head xs) of
True -> True
_ -> go (tail xs)
all :: AdaptList a => (a -> Bool) -> List a -> Bool
all p xs0 = go xs0
where
go xs
| null xs = True
| otherwise = case p (head xs) of
True -> go (tail xs)
_ -> False
sum :: (AdaptList a, Prelude.Num a) => List a -> a
sum l = go l 0
where
go xs !a
| null xs = a
| otherwise = go (tail xs) (a Prelude.+ head xs)
product :: (AdaptList a, Prelude.Num a) => List a -> a
product l = go l 1
where
go xs !a
| null xs = a
| otherwise = go (tail xs) (a Prelude.* head xs)
maximum :: (AdaptList a, Prelude.Ord a) => List a -> a
maximum xs
| null xs = errorEmptyList "maximum"
| otherwise = foldl1 Prelude.max xs
minimum :: (AdaptList a, Prelude.Ord a) => List a -> a
minimum xs
| null xs = errorEmptyList "minimum"
| otherwise = foldl1 Prelude.min xs
scanl :: (AdaptList b, AdaptList a) => (a -> b -> a) -> a -> List b -> List a
scanl f q ls = q `cons` if null ls
then empty
else scanl f (f q (head ls)) (tail ls)
scanl1 :: AdaptList a => (a -> a -> a) -> List a -> List a
scanl1 f xs
| null xs = empty
| otherwise = scanl f (head xs) (tail xs)
scanr :: (AdaptList a, AdaptList b) => (a -> b -> b) -> b -> List a -> List b
scanr f q0 xs
| null xs = cons q0 empty
| otherwise = f (head xs) (head qs) `cons` qs
where qs = scanr f q0 (tail xs)
scanr1 :: AdaptList a => (a -> a -> a) -> List a -> List a
scanr1 f xs
| null xs = empty
| null (tail xs) = xs
| otherwise = f (head xs) (head qs) `cons` qs
where qs = scanr1 f (tail xs)
iterate :: AdaptList a => (a -> a) -> a -> List a
iterate f x = go x
where go z = z `cons` go (f z)
repeat :: AdaptList a => a -> List a
repeat x = xs where xs = x `cons` xs
replicate :: AdaptList a => Int -> a -> List a
replicate n0 _ | n0 <= 0 = empty
replicate n0 x = go n0
where
go 0 = empty
go n = x `cons` go (n1)
cycle :: AdaptList a => List a -> List a
cycle xs0
| null xs0 = errorEmptyList "cycle"
| otherwise = go xs0
where
go xs
| null xs = go xs0
| otherwise = head xs `cons` go (tail xs)
unfoldr :: AdaptList a => (b -> Prelude.Maybe (a, b)) -> b -> List a
unfoldr f b0 = unfold b0
where
unfold b = case f b of
Prelude.Just (a,b') -> a `cons` unfold b'
Prelude.Nothing -> empty
take :: AdaptList a => Int -> List a -> List a
take i _ | i <= 0 = empty
take i ls = go i ls
where
go :: AdaptList a => Int -> List a -> List a
go 0 _ = empty
go n xs
| null xs = empty
| otherwise = (head xs) `cons` go (n1) (tail xs)
drop :: AdaptList a => Int -> List a -> List a
drop n ls
| n Prelude.< 0 = ls
| otherwise = go n ls
where
go :: AdaptList a => Int -> List a -> List a
go 0 xs = xs
go m xs
| null xs = empty
| otherwise = go (m1) (tail xs)
splitAt :: AdaptList a => Int -> List a -> (List a, List a)
splitAt n ls
| n Prelude.< 0 = (empty, ls)
| otherwise = go n ls
where
go :: AdaptList a => Int -> List a -> (List a, List a)
go 0 xs = (empty, xs)
go m xs
| null xs = (empty, empty)
| otherwise = (head xs `cons` xs', xs'')
where
(xs', xs'') = go (m1) (tail xs)
elem :: (AdaptList a, Prelude.Eq a) => a -> List a -> Bool
elem x ys
| null ys = False
| x Prelude.== head ys = True
| otherwise = elem x (tail ys)
notElem :: (AdaptList a, Prelude.Eq a) => a -> List a -> Bool
notElem x xs = Prelude.not (elem x xs)
filter :: AdaptList a => (a -> Bool) -> List a -> List a
filter p xs0
| null xs0 = empty
| otherwise = go xs0
where
go xs
| null xs = empty
| p x = x `cons` go ys
| otherwise = go ys
where x = head xs
ys = tail xs
zip :: (AdaptPair a b, AdaptList a , AdaptList b, AdaptList (Pair a b))
=> List a -> List b -> List (Pair a b)
zip as bs
| null as = empty
| null bs = empty
| otherwise = pair (head as) (head bs) `cons` zip (tail as) (tail bs)
errorEmptyList :: Prelude.String -> a
errorEmptyList fun = moduleError fun "empty list"
moduleError :: Prelude.String -> Prelude.String -> a
moduleError fun msg = Prelude.error ("Data.Adaptive.List." Prelude.++ fun Prelude.++ ':':' ':msg)
bottom :: a
bottom = Prelude.error "Data.List.Stream: bottom"
instance (AdaptList a, Prelude.Eq a) => Prelude.Eq (List a) where
xs == ys
| null xs Prelude.&& null ys = True
| null xs = False
| null ys = False
| otherwise = (head xs Prelude.== head ys)
Prelude.&& (tail xs Prelude.== tail ys)
instance (AdaptList a, Prelude.Ord a) => Prelude.Ord (List a) where
compare xs ys
| null xs Prelude.&& null ys = EQ
| null xs = LT
| null ys = GT
| otherwise = case compare (head xs) (head ys) of
EQ -> compare (tail xs) (tail ys)
other -> other
instance (AdaptList a, Prelude.Show a) => Prelude.Show (List a) where
showsPrec _ = Prelude.showList . toList
instance IsString (List Char) where fromString = fromList
instance AdaptList Bool where
data List Bool = EmptyBool | ConsBool !Int (List Bool)
empty = EmptyBool
cons x xs = ConsBool (Prelude.fromEnum x) xs
null EmptyBool = True
null _ = False
head EmptyBool = errorEmptyList "head"
head (ConsBool x _) = Prelude.toEnum x
tail EmptyBool = errorEmptyList "tail"
tail (ConsBool _ xs) = xs
instance AdaptList Int where
data List Int = EmptyInt | ConsInt !Int (List Int)
empty = EmptyInt
cons = ConsInt
null EmptyInt = True
null _ = False
head EmptyInt = errorEmptyList "head"
head (ConsInt x _) = x
tail EmptyInt = errorEmptyList "tail"
tail (ConsInt _ x) = x
instance AdaptList Integer where
data List Integer = EmptyInteger | ConsInteger !Integer (List Integer)
empty = EmptyInteger
cons = ConsInteger
null EmptyInteger = True
null _ = False
head EmptyInteger = errorEmptyList "head"
head (ConsInteger x _) = x
tail EmptyInteger = errorEmptyList "tail"
tail (ConsInteger _ x) = x
instance AdaptList Int8 where
data List Int8 = EmptyInt8 | ConsInt8 !Int8 (List Int8)
empty = EmptyInt8
cons = ConsInt8
null EmptyInt8 = True
null _ = False
head EmptyInt8 = errorEmptyList "head"
head (ConsInt8 x _) = x
tail EmptyInt8 = errorEmptyList "tail"
tail (ConsInt8 _ x) = x
instance AdaptList Int16 where
data List Int16 = EmptyInt16 | ConsInt16 !Int16 (List Int16)
empty = EmptyInt16
cons = ConsInt16
null EmptyInt16 = True
null _ = False
head EmptyInt16 = errorEmptyList "head"
head (ConsInt16 x _) = x
tail EmptyInt16 = errorEmptyList "tail"
tail (ConsInt16 _ x) = x
instance AdaptList Int32 where
data List Int32 = EmptyInt32 | ConsInt32 !Int32 (List Int32)
empty = EmptyInt32
cons = ConsInt32
null EmptyInt32 = True
null _ = False
head EmptyInt32 = errorEmptyList "head"
head (ConsInt32 x _) = x
tail EmptyInt32 = errorEmptyList "tail"
tail (ConsInt32 _ x) = x
instance AdaptList Int64 where
data List Int64 = EmptyInt64 | ConsInt64 !Int64 (List Int64)
empty = EmptyInt64
cons = ConsInt64
null EmptyInt64 = True
null _ = False
head EmptyInt64 = errorEmptyList "head"
head (ConsInt64 x _) = x
tail EmptyInt64 = errorEmptyList "tail"
tail (ConsInt64 _ x) = x
instance AdaptList Word where
data List Word = EmptyWord | ConsWord !Word (List Word)
empty = EmptyWord
cons = ConsWord
null EmptyWord = True
null _ = False
head EmptyWord = errorEmptyList "head"
head (ConsWord x _) = x
tail EmptyWord = errorEmptyList "tail"
tail (ConsWord _ x) = x
instance AdaptList Word8 where
data List Word8 = EmptyWord8 | ConsWord8 !Word8 (List Word8)
empty = EmptyWord8
cons = ConsWord8
null EmptyWord8 = True
null _ = False
head EmptyWord8 = errorEmptyList "head"
head (ConsWord8 x _) = x
tail EmptyWord8 = errorEmptyList "tail"
tail (ConsWord8 _ x) = x
instance AdaptList Word16 where
data List Word16 = EmptyWord16 | ConsWord16 !Word16 (List Word16)
empty = EmptyWord16
cons = ConsWord16
null EmptyWord16 = True
null _ = False
head EmptyWord16 = errorEmptyList "head"
head (ConsWord16 x _) = x
tail EmptyWord16 = errorEmptyList "tail"
tail (ConsWord16 _ x) = x
instance AdaptList Word32 where
data List Word32 = EmptyWord32 | ConsWord32 !Word32 (List Word32)
empty = EmptyWord32
cons = ConsWord32
null EmptyWord32 = True
null _ = False
head EmptyWord32 = errorEmptyList "head"
head (ConsWord32 x _) = x
tail EmptyWord32 = errorEmptyList "tail"
tail (ConsWord32 _ x) = x
instance AdaptList Word64 where
data List Word64 = EmptyWord64 | ConsWord64 !Word64 (List Word64)
empty = EmptyWord64
cons = ConsWord64
null EmptyWord64 = True
null _ = False
head EmptyWord64 = errorEmptyList "head"
head (ConsWord64 x _) = x
tail EmptyWord64 = errorEmptyList "tail"
tail (ConsWord64 _ x) = x
instance AdaptList Double where
data List Double = EmptyDouble | ConsDouble !Double (List Double)
empty = EmptyDouble
cons = ConsDouble
null EmptyDouble = True
null _ = False
head EmptyDouble = errorEmptyList "head"
head (ConsDouble x _) = x
tail EmptyDouble = errorEmptyList "tail"
tail (ConsDouble _ x) = x
instance AdaptList Float where
data List Float = EmptyFloat | ConsFloat !Float (List Float)
empty = EmptyFloat
cons = ConsFloat
null EmptyFloat = True
null _ = False
head EmptyFloat = errorEmptyList "head"
head (ConsFloat x _) = x
tail EmptyFloat = errorEmptyList "tail"
tail (ConsFloat _ x) = x
instance AdaptList Char where
data List Char = EmptyChar | ConsChar !Char (List Char)
empty = EmptyChar
cons = ConsChar
null EmptyChar = True
null _ = False
head EmptyChar = errorEmptyList "head"
head (ConsChar x _) = x
tail EmptyChar = errorEmptyList "tail"
tail (ConsChar _ x) = x
instance AdaptList (Pair Int Int) where
data List (Pair Int Int)
= EmptyPairIntInt
| ConsPairIntInt !Int !Int (List (Pair Int Int))
empty = EmptyPairIntInt
cons x z = ConsPairIntInt (fst x) (snd x) z
null EmptyPairIntInt = True
null _ = False
head EmptyPairIntInt = errorEmptyList "head"
head (ConsPairIntInt x y _) = pair x y
tail EmptyPairIntInt = errorEmptyList "tail"
tail (ConsPairIntInt _ _ x) = x
instance AdaptList (Pair Int Integer) where
data List (Pair Int Integer)
= EmptyPairIntInteger
| ConsPairIntInteger !Int !Integer (List (Pair Int Integer))
empty = EmptyPairIntInteger
cons x z = ConsPairIntInteger (fst x) (snd x) z
null EmptyPairIntInteger = True
null _ = False
head EmptyPairIntInteger = errorEmptyList "head"
head (ConsPairIntInteger x y _) = pair x y
tail EmptyPairIntInteger = errorEmptyList "tail"
tail (ConsPairIntInteger _ _ x) = x
instance AdaptList (Pair Int Int8) where
data List (Pair Int Int8)
= EmptyPairIntInt8
| ConsPairIntInt8 !Int !Int8 (List (Pair Int Int8))
empty = EmptyPairIntInt8
cons x z = ConsPairIntInt8 (fst x) (snd x) z
null EmptyPairIntInt8 = True
null _ = False
head EmptyPairIntInt8 = errorEmptyList "head"
head (ConsPairIntInt8 x y _) = pair x y
tail EmptyPairIntInt8 = errorEmptyList "tail"
tail (ConsPairIntInt8 _ _ x) = x
instance AdaptList (Pair Int Int16) where
data List (Pair Int Int16)
= EmptyPairIntInt16
| ConsPairIntInt16 !Int !Int16 (List (Pair Int Int16))
empty = EmptyPairIntInt16
cons x z = ConsPairIntInt16 (fst x) (snd x) z
null EmptyPairIntInt16 = True
null _ = False
head EmptyPairIntInt16 = errorEmptyList "head"
head (ConsPairIntInt16 x y _) = pair x y
tail EmptyPairIntInt16 = errorEmptyList "tail"
tail (ConsPairIntInt16 _ _ x) = x
instance AdaptList (Pair Int Int32) where
data List (Pair Int Int32)
= EmptyPairIntInt32
| ConsPairIntInt32 !Int !Int32 (List (Pair Int Int32))
empty = EmptyPairIntInt32
cons x z = ConsPairIntInt32 (fst x) (snd x) z
null EmptyPairIntInt32 = True
null _ = False
head EmptyPairIntInt32 = errorEmptyList "head"
head (ConsPairIntInt32 x y _) = pair x y
tail EmptyPairIntInt32 = errorEmptyList "tail"
tail (ConsPairIntInt32 _ _ x) = x
instance AdaptList (Pair Int Int64) where
data List (Pair Int Int64)
= EmptyPairIntInt64
| ConsPairIntInt64 !Int !Int64 (List (Pair Int Int64))
empty = EmptyPairIntInt64
cons x z = ConsPairIntInt64 (fst x) (snd x) z
null EmptyPairIntInt64 = True
null _ = False
head EmptyPairIntInt64 = errorEmptyList "head"
head (ConsPairIntInt64 x y _) = pair x y
tail EmptyPairIntInt64 = errorEmptyList "tail"
tail (ConsPairIntInt64 _ _ x) = x
instance AdaptList (Pair Int Word) where
data List (Pair Int Word)
= EmptyPairIntWord
| ConsPairIntWord !Int !Word (List (Pair Int Word))
empty = EmptyPairIntWord
cons x z = ConsPairIntWord (fst x) (snd x) z
null EmptyPairIntWord = True
null _ = False
head EmptyPairIntWord = errorEmptyList "head"
head (ConsPairIntWord x y _) = pair x y
tail EmptyPairIntWord = errorEmptyList "tail"
tail (ConsPairIntWord _ _ x) = x
instance AdaptList (Pair Int Word8) where
data List (Pair Int Word8)
= EmptyPairIntWord8
| ConsPairIntWord8 !Int !Word8 (List (Pair Int Word8))
empty = EmptyPairIntWord8
cons x z = ConsPairIntWord8 (fst x) (snd x) z
null EmptyPairIntWord8 = True
null _ = False
head EmptyPairIntWord8 = errorEmptyList "head"
head (ConsPairIntWord8 x y _) = pair x y
tail EmptyPairIntWord8 = errorEmptyList "tail"
tail (ConsPairIntWord8 _ _ x) = x
instance AdaptList (Pair Int Word16) where
data List (Pair Int Word16)
= EmptyPairIntWord16
| ConsPairIntWord16 !Int !Word16 (List (Pair Int Word16))
empty = EmptyPairIntWord16
cons x z = ConsPairIntWord16 (fst x) (snd x) z
null EmptyPairIntWord16 = True
null _ = False
head EmptyPairIntWord16 = errorEmptyList "head"
head (ConsPairIntWord16 x y _) = pair x y
tail EmptyPairIntWord16 = errorEmptyList "tail"
tail (ConsPairIntWord16 _ _ x) = x
instance AdaptList (Pair Int Word32) where
data List (Pair Int Word32)
= EmptyPairIntWord32
| ConsPairIntWord32 !Int !Word32 (List (Pair Int Word32))
empty = EmptyPairIntWord32
cons x z = ConsPairIntWord32 (fst x) (snd x) z
null EmptyPairIntWord32 = True
null _ = False
head EmptyPairIntWord32 = errorEmptyList "head"
head (ConsPairIntWord32 x y _) = pair x y
tail EmptyPairIntWord32 = errorEmptyList "tail"
tail (ConsPairIntWord32 _ _ x) = x
instance AdaptList (Pair Int Word64) where
data List (Pair Int Word64)
= EmptyPairIntWord64
| ConsPairIntWord64 !Int !Word64 (List (Pair Int Word64))
empty = EmptyPairIntWord64
cons x z = ConsPairIntWord64 (fst x) (snd x) z
null EmptyPairIntWord64 = True
null _ = False
head EmptyPairIntWord64 = errorEmptyList "head"
head (ConsPairIntWord64 x y _) = pair x y
tail EmptyPairIntWord64 = errorEmptyList "tail"
tail (ConsPairIntWord64 _ _ x) = x
instance AdaptList (Pair Int Double) where
data List (Pair Int Double)
= EmptyPairIntDouble
| ConsPairIntDouble !Int !Double (List (Pair Int Double))
empty = EmptyPairIntDouble
cons x z = ConsPairIntDouble (fst x) (snd x) z
null EmptyPairIntDouble = True
null _ = False
head EmptyPairIntDouble = errorEmptyList "head"
head (ConsPairIntDouble x y _) = pair x y
tail EmptyPairIntDouble = errorEmptyList "tail"
tail (ConsPairIntDouble _ _ x) = x
instance AdaptList (Pair Int Float) where
data List (Pair Int Float)
= EmptyPairIntFloat
| ConsPairIntFloat !Int !Float (List (Pair Int Float))
empty = EmptyPairIntFloat
cons x z = ConsPairIntFloat (fst x) (snd x) z
null EmptyPairIntFloat = True
null _ = False
head EmptyPairIntFloat = errorEmptyList "head"
head (ConsPairIntFloat x y _) = pair x y
tail EmptyPairIntFloat = errorEmptyList "tail"
tail (ConsPairIntFloat _ _ x) = x
instance AdaptList (Pair Int Char) where
data List (Pair Int Char)
= EmptyPairIntChar
| ConsPairIntChar !Int !Char (List (Pair Int Char))
empty = EmptyPairIntChar
cons x z = ConsPairIntChar (fst x) (snd x) z
null EmptyPairIntChar = True
null _ = False
head EmptyPairIntChar = errorEmptyList "head"
head (ConsPairIntChar x y _) = pair x y
tail EmptyPairIntChar = errorEmptyList "tail"
tail (ConsPairIntChar _ _ x) = x
instance AdaptList (Pair Integer Int) where
data List (Pair Integer Int)
= EmptyPairIntegerInt
| ConsPairIntegerInt !Integer !Int (List (Pair Integer Int))
empty = EmptyPairIntegerInt
cons x z = ConsPairIntegerInt (fst x) (snd x) z
null EmptyPairIntegerInt = True
null _ = False
head EmptyPairIntegerInt = errorEmptyList "head"
head (ConsPairIntegerInt x y _) = pair x y
tail EmptyPairIntegerInt = errorEmptyList "tail"
tail (ConsPairIntegerInt _ _ x) = x
instance AdaptList (Pair Integer Integer) where
data List (Pair Integer Integer)
= EmptyPairIntegerInteger
| ConsPairIntegerInteger !Integer !Integer (List (Pair Integer Integer))
empty = EmptyPairIntegerInteger
cons x z = ConsPairIntegerInteger (fst x) (snd x) z
null EmptyPairIntegerInteger = True
null _ = False
head EmptyPairIntegerInteger = errorEmptyList "head"
head (ConsPairIntegerInteger x y _) = pair x y
tail EmptyPairIntegerInteger = errorEmptyList "tail"
tail (ConsPairIntegerInteger _ _ x) = x
instance AdaptList (Pair Integer Int8) where
data List (Pair Integer Int8)
= EmptyPairIntegerInt8
| ConsPairIntegerInt8 !Integer !Int8 (List (Pair Integer Int8))
empty = EmptyPairIntegerInt8
cons x z = ConsPairIntegerInt8 (fst x) (snd x) z
null EmptyPairIntegerInt8 = True
null _ = False
head EmptyPairIntegerInt8 = errorEmptyList "head"
head (ConsPairIntegerInt8 x y _) = pair x y
tail EmptyPairIntegerInt8 = errorEmptyList "tail"
tail (ConsPairIntegerInt8 _ _ x) = x
instance AdaptList (Pair Integer Int16) where
data List (Pair Integer Int16)
= EmptyPairIntegerInt16
| ConsPairIntegerInt16 !Integer !Int16 (List (Pair Integer Int16))
empty = EmptyPairIntegerInt16
cons x z = ConsPairIntegerInt16 (fst x) (snd x) z
null EmptyPairIntegerInt16 = True
null _ = False
head EmptyPairIntegerInt16 = errorEmptyList "head"
head (ConsPairIntegerInt16 x y _) = pair x y
tail EmptyPairIntegerInt16 = errorEmptyList "tail"
tail (ConsPairIntegerInt16 _ _ x) = x
instance AdaptList (Pair Integer Int32) where
data List (Pair Integer Int32)
= EmptyPairIntegerInt32
| ConsPairIntegerInt32 !Integer !Int32 (List (Pair Integer Int32))
empty = EmptyPairIntegerInt32
cons x z = ConsPairIntegerInt32 (fst x) (snd x) z
null EmptyPairIntegerInt32 = True
null _ = False
head EmptyPairIntegerInt32 = errorEmptyList "head"
head (ConsPairIntegerInt32 x y _) = pair x y
tail EmptyPairIntegerInt32 = errorEmptyList "tail"
tail (ConsPairIntegerInt32 _ _ x) = x
instance AdaptList (Pair Integer Int64) where
data List (Pair Integer Int64)
= EmptyPairIntegerInt64
| ConsPairIntegerInt64 !Integer !Int64 (List (Pair Integer Int64))
empty = EmptyPairIntegerInt64
cons x z = ConsPairIntegerInt64 (fst x) (snd x) z
null EmptyPairIntegerInt64 = True
null _ = False
head EmptyPairIntegerInt64 = errorEmptyList "head"
head (ConsPairIntegerInt64 x y _) = pair x y
tail EmptyPairIntegerInt64 = errorEmptyList "tail"
tail (ConsPairIntegerInt64 _ _ x) = x
instance AdaptList (Pair Integer Word) where
data List (Pair Integer Word)
= EmptyPairIntegerWord
| ConsPairIntegerWord !Integer !Word (List (Pair Integer Word))
empty = EmptyPairIntegerWord
cons x z = ConsPairIntegerWord (fst x) (snd x) z
null EmptyPairIntegerWord = True
null _ = False
head EmptyPairIntegerWord = errorEmptyList "head"
head (ConsPairIntegerWord x y _) = pair x y
tail EmptyPairIntegerWord = errorEmptyList "tail"
tail (ConsPairIntegerWord _ _ x) = x
instance AdaptList (Pair Integer Word8) where
data List (Pair Integer Word8)
= EmptyPairIntegerWord8
| ConsPairIntegerWord8 !Integer !Word8 (List (Pair Integer Word8))
empty = EmptyPairIntegerWord8
cons x z = ConsPairIntegerWord8 (fst x) (snd x) z
null EmptyPairIntegerWord8 = True
null _ = False
head EmptyPairIntegerWord8 = errorEmptyList "head"
head (ConsPairIntegerWord8 x y _) = pair x y
tail EmptyPairIntegerWord8 = errorEmptyList "tail"
tail (ConsPairIntegerWord8 _ _ x) = x
instance AdaptList (Pair Integer Word16) where
data List (Pair Integer Word16)
= EmptyPairIntegerWord16
| ConsPairIntegerWord16 !Integer !Word16 (List (Pair Integer Word16))
empty = EmptyPairIntegerWord16
cons x z = ConsPairIntegerWord16 (fst x) (snd x) z
null EmptyPairIntegerWord16 = True
null _ = False
head EmptyPairIntegerWord16 = errorEmptyList "head"
head (ConsPairIntegerWord16 x y _) = pair x y
tail EmptyPairIntegerWord16 = errorEmptyList "tail"
tail (ConsPairIntegerWord16 _ _ x) = x
instance AdaptList (Pair Integer Word32) where
data List (Pair Integer Word32)
= EmptyPairIntegerWord32
| ConsPairIntegerWord32 !Integer !Word32 (List (Pair Integer Word32))
empty = EmptyPairIntegerWord32
cons x z = ConsPairIntegerWord32 (fst x) (snd x) z
null EmptyPairIntegerWord32 = True
null _ = False
head EmptyPairIntegerWord32 = errorEmptyList "head"
head (ConsPairIntegerWord32 x y _) = pair x y
tail EmptyPairIntegerWord32 = errorEmptyList "tail"
tail (ConsPairIntegerWord32 _ _ x) = x
instance AdaptList (Pair Integer Word64) where
data List (Pair Integer Word64)
= EmptyPairIntegerWord64
| ConsPairIntegerWord64 !Integer !Word64 (List (Pair Integer Word64))
empty = EmptyPairIntegerWord64
cons x z = ConsPairIntegerWord64 (fst x) (snd x) z
null EmptyPairIntegerWord64 = True
null _ = False
head EmptyPairIntegerWord64 = errorEmptyList "head"
head (ConsPairIntegerWord64 x y _) = pair x y
tail EmptyPairIntegerWord64 = errorEmptyList "tail"
tail (ConsPairIntegerWord64 _ _ x) = x
instance AdaptList (Pair Integer Double) where
data List (Pair Integer Double)
= EmptyPairIntegerDouble
| ConsPairIntegerDouble !Integer !Double (List (Pair Integer Double))
empty = EmptyPairIntegerDouble
cons x z = ConsPairIntegerDouble (fst x) (snd x) z
null EmptyPairIntegerDouble = True
null _ = False
head EmptyPairIntegerDouble = errorEmptyList "head"
head (ConsPairIntegerDouble x y _) = pair x y
tail EmptyPairIntegerDouble = errorEmptyList "tail"
tail (ConsPairIntegerDouble _ _ x) = x
instance AdaptList (Pair Integer Float) where
data List (Pair Integer Float)
= EmptyPairIntegerFloat
| ConsPairIntegerFloat !Integer !Float (List (Pair Integer Float))
empty = EmptyPairIntegerFloat
cons x z = ConsPairIntegerFloat (fst x) (snd x) z
null EmptyPairIntegerFloat = True
null _ = False
head EmptyPairIntegerFloat = errorEmptyList "head"
head (ConsPairIntegerFloat x y _) = pair x y
tail EmptyPairIntegerFloat = errorEmptyList "tail"
tail (ConsPairIntegerFloat _ _ x) = x
instance AdaptList (Pair Integer Char) where
data List (Pair Integer Char)
= EmptyPairIntegerChar
| ConsPairIntegerChar !Integer !Char (List (Pair Integer Char))
empty = EmptyPairIntegerChar
cons x z = ConsPairIntegerChar (fst x) (snd x) z
null EmptyPairIntegerChar = True
null _ = False
head EmptyPairIntegerChar = errorEmptyList "head"
head (ConsPairIntegerChar x y _) = pair x y
tail EmptyPairIntegerChar = errorEmptyList "tail"
tail (ConsPairIntegerChar _ _ x) = x
instance AdaptList (Pair Int8 Int) where
data List (Pair Int8 Int)
= EmptyPairInt8Int
| ConsPairInt8Int !Int8 !Int (List (Pair Int8 Int))
empty = EmptyPairInt8Int
cons x z = ConsPairInt8Int (fst x) (snd x) z
null EmptyPairInt8Int = True
null _ = False
head EmptyPairInt8Int = errorEmptyList "head"
head (ConsPairInt8Int x y _) = pair x y
tail EmptyPairInt8Int = errorEmptyList "tail"
tail (ConsPairInt8Int _ _ x) = x
instance AdaptList (Pair Int8 Integer) where
data List (Pair Int8 Integer)
= EmptyPairInt8Integer
| ConsPairInt8Integer !Int8 !Integer (List (Pair Int8 Integer))
empty = EmptyPairInt8Integer
cons x z = ConsPairInt8Integer (fst x) (snd x) z
null EmptyPairInt8Integer = True
null _ = False
head EmptyPairInt8Integer = errorEmptyList "head"
head (ConsPairInt8Integer x y _) = pair x y
tail EmptyPairInt8Integer = errorEmptyList "tail"
tail (ConsPairInt8Integer _ _ x) = x
instance AdaptList (Pair Int8 Int8) where
data List (Pair Int8 Int8)
= EmptyPairInt8Int8
| ConsPairInt8Int8 !Int8 !Int8 (List (Pair Int8 Int8))
empty = EmptyPairInt8Int8
cons x z = ConsPairInt8Int8 (fst x) (snd x) z
null EmptyPairInt8Int8 = True
null _ = False
head EmptyPairInt8Int8 = errorEmptyList "head"
head (ConsPairInt8Int8 x y _) = pair x y
tail EmptyPairInt8Int8 = errorEmptyList "tail"
tail (ConsPairInt8Int8 _ _ x) = x
instance AdaptList (Pair Int8 Int16) where
data List (Pair Int8 Int16)
= EmptyPairInt8Int16
| ConsPairInt8Int16 !Int8 !Int16 (List (Pair Int8 Int16))
empty = EmptyPairInt8Int16
cons x z = ConsPairInt8Int16 (fst x) (snd x) z
null EmptyPairInt8Int16 = True
null _ = False
head EmptyPairInt8Int16 = errorEmptyList "head"
head (ConsPairInt8Int16 x y _) = pair x y
tail EmptyPairInt8Int16 = errorEmptyList "tail"
tail (ConsPairInt8Int16 _ _ x) = x
instance AdaptList (Pair Int8 Int32) where
data List (Pair Int8 Int32)
= EmptyPairInt8Int32
| ConsPairInt8Int32 !Int8 !Int32 (List (Pair Int8 Int32))
empty = EmptyPairInt8Int32
cons x z = ConsPairInt8Int32 (fst x) (snd x) z
null EmptyPairInt8Int32 = True
null _ = False
head EmptyPairInt8Int32 = errorEmptyList "head"
head (ConsPairInt8Int32 x y _) = pair x y
tail EmptyPairInt8Int32 = errorEmptyList "tail"
tail (ConsPairInt8Int32 _ _ x) = x
instance AdaptList (Pair Int8 Int64) where
data List (Pair Int8 Int64)
= EmptyPairInt8Int64
| ConsPairInt8Int64 !Int8 !Int64 (List (Pair Int8 Int64))
empty = EmptyPairInt8Int64
cons x z = ConsPairInt8Int64 (fst x) (snd x) z
null EmptyPairInt8Int64 = True
null _ = False
head EmptyPairInt8Int64 = errorEmptyList "head"
head (ConsPairInt8Int64 x y _) = pair x y
tail EmptyPairInt8Int64 = errorEmptyList "tail"
tail (ConsPairInt8Int64 _ _ x) = x
instance AdaptList (Pair Int8 Word) where
data List (Pair Int8 Word)
= EmptyPairInt8Word
| ConsPairInt8Word !Int8 !Word (List (Pair Int8 Word))
empty = EmptyPairInt8Word
cons x z = ConsPairInt8Word (fst x) (snd x) z
null EmptyPairInt8Word = True
null _ = False
head EmptyPairInt8Word = errorEmptyList "head"
head (ConsPairInt8Word x y _) = pair x y
tail EmptyPairInt8Word = errorEmptyList "tail"
tail (ConsPairInt8Word _ _ x) = x
instance AdaptList (Pair Int8 Word8) where
data List (Pair Int8 Word8)
= EmptyPairInt8Word8
| ConsPairInt8Word8 !Int8 !Word8 (List (Pair Int8 Word8))
empty = EmptyPairInt8Word8
cons x z = ConsPairInt8Word8 (fst x) (snd x) z
null EmptyPairInt8Word8 = True
null _ = False
head EmptyPairInt8Word8 = errorEmptyList "head"
head (ConsPairInt8Word8 x y _) = pair x y
tail EmptyPairInt8Word8 = errorEmptyList "tail"
tail (ConsPairInt8Word8 _ _ x) = x
instance AdaptList (Pair Int8 Word16) where
data List (Pair Int8 Word16)
= EmptyPairInt8Word16
| ConsPairInt8Word16 !Int8 !Word16 (List (Pair Int8 Word16))
empty = EmptyPairInt8Word16
cons x z = ConsPairInt8Word16 (fst x) (snd x) z
null EmptyPairInt8Word16 = True
null _ = False
head EmptyPairInt8Word16 = errorEmptyList "head"
head (ConsPairInt8Word16 x y _) = pair x y
tail EmptyPairInt8Word16 = errorEmptyList "tail"
tail (ConsPairInt8Word16 _ _ x) = x
instance AdaptList (Pair Int8 Word32) where
data List (Pair Int8 Word32)
= EmptyPairInt8Word32
| ConsPairInt8Word32 !Int8 !Word32 (List (Pair Int8 Word32))
empty = EmptyPairInt8Word32
cons x z = ConsPairInt8Word32 (fst x) (snd x) z
null EmptyPairInt8Word32 = True
null _ = False
head EmptyPairInt8Word32 = errorEmptyList "head"
head (ConsPairInt8Word32 x y _) = pair x y
tail EmptyPairInt8Word32 = errorEmptyList "tail"
tail (ConsPairInt8Word32 _ _ x) = x
instance AdaptList (Pair Int8 Word64) where
data List (Pair Int8 Word64)
= EmptyPairInt8Word64
| ConsPairInt8Word64 !Int8 !Word64 (List (Pair Int8 Word64))
empty = EmptyPairInt8Word64
cons x z = ConsPairInt8Word64 (fst x) (snd x) z
null EmptyPairInt8Word64 = True
null _ = False
head EmptyPairInt8Word64 = errorEmptyList "head"
head (ConsPairInt8Word64 x y _) = pair x y
tail EmptyPairInt8Word64 = errorEmptyList "tail"
tail (ConsPairInt8Word64 _ _ x) = x
instance AdaptList (Pair Int8 Double) where
data List (Pair Int8 Double)
= EmptyPairInt8Double
| ConsPairInt8Double !Int8 !Double (List (Pair Int8 Double))
empty = EmptyPairInt8Double
cons x z = ConsPairInt8Double (fst x) (snd x) z
null EmptyPairInt8Double = True
null _ = False
head EmptyPairInt8Double = errorEmptyList "head"
head (ConsPairInt8Double x y _) = pair x y
tail EmptyPairInt8Double = errorEmptyList "tail"
tail (ConsPairInt8Double _ _ x) = x
instance AdaptList (Pair Int8 Float) where
data List (Pair Int8 Float)
= EmptyPairInt8Float
| ConsPairInt8Float !Int8 !Float (List (Pair Int8 Float))
empty = EmptyPairInt8Float
cons x z = ConsPairInt8Float (fst x) (snd x) z
null EmptyPairInt8Float = True
null _ = False
head EmptyPairInt8Float = errorEmptyList "head"
head (ConsPairInt8Float x y _) = pair x y
tail EmptyPairInt8Float = errorEmptyList "tail"
tail (ConsPairInt8Float _ _ x) = x
instance AdaptList (Pair Int8 Char) where
data List (Pair Int8 Char)
= EmptyPairInt8Char
| ConsPairInt8Char !Int8 !Char (List (Pair Int8 Char))
empty = EmptyPairInt8Char
cons x z = ConsPairInt8Char (fst x) (snd x) z
null EmptyPairInt8Char = True
null _ = False
head EmptyPairInt8Char = errorEmptyList "head"
head (ConsPairInt8Char x y _) = pair x y
tail EmptyPairInt8Char = errorEmptyList "tail"
tail (ConsPairInt8Char _ _ x) = x
instance AdaptList (Pair Int16 Int) where
data List (Pair Int16 Int)
= EmptyPairInt16Int
| ConsPairInt16Int !Int16 !Int (List (Pair Int16 Int))
empty = EmptyPairInt16Int
cons x z = ConsPairInt16Int (fst x) (snd x) z
null EmptyPairInt16Int = True
null _ = False
head EmptyPairInt16Int = errorEmptyList "head"
head (ConsPairInt16Int x y _) = pair x y
tail EmptyPairInt16Int = errorEmptyList "tail"
tail (ConsPairInt16Int _ _ x) = x
instance AdaptList (Pair Int16 Integer) where
data List (Pair Int16 Integer)
= EmptyPairInt16Integer
| ConsPairInt16Integer !Int16 !Integer (List (Pair Int16 Integer))
empty = EmptyPairInt16Integer
cons x z = ConsPairInt16Integer (fst x) (snd x) z
null EmptyPairInt16Integer = True
null _ = False
head EmptyPairInt16Integer = errorEmptyList "head"
head (ConsPairInt16Integer x y _) = pair x y
tail EmptyPairInt16Integer = errorEmptyList "tail"
tail (ConsPairInt16Integer _ _ x) = x
instance AdaptList (Pair Int16 Int8) where
data List (Pair Int16 Int8)
= EmptyPairInt16Int8
| ConsPairInt16Int8 !Int16 !Int8 (List (Pair Int16 Int8))
empty = EmptyPairInt16Int8
cons x z = ConsPairInt16Int8 (fst x) (snd x) z
null EmptyPairInt16Int8 = True
null _ = False
head EmptyPairInt16Int8 = errorEmptyList "head"
head (ConsPairInt16Int8 x y _) = pair x y
tail EmptyPairInt16Int8 = errorEmptyList "tail"
tail (ConsPairInt16Int8 _ _ x) = x
instance AdaptList (Pair Int16 Int16) where
data List (Pair Int16 Int16)
= EmptyPairInt16Int16
| ConsPairInt16Int16 !Int16 !Int16 (List (Pair Int16 Int16))
empty = EmptyPairInt16Int16
cons x z = ConsPairInt16Int16 (fst x) (snd x) z
null EmptyPairInt16Int16 = True
null _ = False
head EmptyPairInt16Int16 = errorEmptyList "head"
head (ConsPairInt16Int16 x y _) = pair x y
tail EmptyPairInt16Int16 = errorEmptyList "tail"
tail (ConsPairInt16Int16 _ _ x) = x
instance AdaptList (Pair Int16 Int32) where
data List (Pair Int16 Int32)
= EmptyPairInt16Int32
| ConsPairInt16Int32 !Int16 !Int32 (List (Pair Int16 Int32))
empty = EmptyPairInt16Int32
cons x z = ConsPairInt16Int32 (fst x) (snd x) z
null EmptyPairInt16Int32 = True
null _ = False
head EmptyPairInt16Int32 = errorEmptyList "head"
head (ConsPairInt16Int32 x y _) = pair x y
tail EmptyPairInt16Int32 = errorEmptyList "tail"
tail (ConsPairInt16Int32 _ _ x) = x
instance AdaptList (Pair Int16 Int64) where
data List (Pair Int16 Int64)
= EmptyPairInt16Int64
| ConsPairInt16Int64 !Int16 !Int64 (List (Pair Int16 Int64))
empty = EmptyPairInt16Int64
cons x z = ConsPairInt16Int64 (fst x) (snd x) z
null EmptyPairInt16Int64 = True
null _ = False
head EmptyPairInt16Int64 = errorEmptyList "head"
head (ConsPairInt16Int64 x y _) = pair x y
tail EmptyPairInt16Int64 = errorEmptyList "tail"
tail (ConsPairInt16Int64 _ _ x) = x
instance AdaptList (Pair Int16 Word) where
data List (Pair Int16 Word)
= EmptyPairInt16Word
| ConsPairInt16Word !Int16 !Word (List (Pair Int16 Word))
empty = EmptyPairInt16Word
cons x z = ConsPairInt16Word (fst x) (snd x) z
null EmptyPairInt16Word = True
null _ = False
head EmptyPairInt16Word = errorEmptyList "head"
head (ConsPairInt16Word x y _) = pair x y
tail EmptyPairInt16Word = errorEmptyList "tail"
tail (ConsPairInt16Word _ _ x) = x
instance AdaptList (Pair Int16 Word8) where
data List (Pair Int16 Word8)
= EmptyPairInt16Word8
| ConsPairInt16Word8 !Int16 !Word8 (List (Pair Int16 Word8))
empty = EmptyPairInt16Word8
cons x z = ConsPairInt16Word8 (fst x) (snd x) z
null EmptyPairInt16Word8 = True
null _ = False
head EmptyPairInt16Word8 = errorEmptyList "head"
head (ConsPairInt16Word8 x y _) = pair x y
tail EmptyPairInt16Word8 = errorEmptyList "tail"
tail (ConsPairInt16Word8 _ _ x) = x
instance AdaptList (Pair Int16 Word16) where
data List (Pair Int16 Word16)
= EmptyPairInt16Word16
| ConsPairInt16Word16 !Int16 !Word16 (List (Pair Int16 Word16))
empty = EmptyPairInt16Word16
cons x z = ConsPairInt16Word16 (fst x) (snd x) z
null EmptyPairInt16Word16 = True
null _ = False
head EmptyPairInt16Word16 = errorEmptyList "head"
head (ConsPairInt16Word16 x y _) = pair x y
tail EmptyPairInt16Word16 = errorEmptyList "tail"
tail (ConsPairInt16Word16 _ _ x) = x
instance AdaptList (Pair Int16 Word32) where
data List (Pair Int16 Word32)
= EmptyPairInt16Word32
| ConsPairInt16Word32 !Int16 !Word32 (List (Pair Int16 Word32))
empty = EmptyPairInt16Word32
cons x z = ConsPairInt16Word32 (fst x) (snd x) z
null EmptyPairInt16Word32 = True
null _ = False
head EmptyPairInt16Word32 = errorEmptyList "head"
head (ConsPairInt16Word32 x y _) = pair x y
tail EmptyPairInt16Word32 = errorEmptyList "tail"
tail (ConsPairInt16Word32 _ _ x) = x
instance AdaptList (Pair Int16 Word64) where
data List (Pair Int16 Word64)
= EmptyPairInt16Word64
| ConsPairInt16Word64 !Int16 !Word64 (List (Pair Int16 Word64))
empty = EmptyPairInt16Word64
cons x z = ConsPairInt16Word64 (fst x) (snd x) z
null EmptyPairInt16Word64 = True
null _ = False
head EmptyPairInt16Word64 = errorEmptyList "head"
head (ConsPairInt16Word64 x y _) = pair x y
tail EmptyPairInt16Word64 = errorEmptyList "tail"
tail (ConsPairInt16Word64 _ _ x) = x
instance AdaptList (Pair Int16 Double) where
data List (Pair Int16 Double)
= EmptyPairInt16Double
| ConsPairInt16Double !Int16 !Double (List (Pair Int16 Double))
empty = EmptyPairInt16Double
cons x z = ConsPairInt16Double (fst x) (snd x) z
null EmptyPairInt16Double = True
null _ = False
head EmptyPairInt16Double = errorEmptyList "head"
head (ConsPairInt16Double x y _) = pair x y
tail EmptyPairInt16Double = errorEmptyList "tail"
tail (ConsPairInt16Double _ _ x) = x
instance AdaptList (Pair Int16 Float) where
data List (Pair Int16 Float)
= EmptyPairInt16Float
| ConsPairInt16Float !Int16 !Float (List (Pair Int16 Float))
empty = EmptyPairInt16Float
cons x z = ConsPairInt16Float (fst x) (snd x) z
null EmptyPairInt16Float = True
null _ = False
head EmptyPairInt16Float = errorEmptyList "head"
head (ConsPairInt16Float x y _) = pair x y
tail EmptyPairInt16Float = errorEmptyList "tail"
tail (ConsPairInt16Float _ _ x) = x
instance AdaptList (Pair Int16 Char) where
data List (Pair Int16 Char)
= EmptyPairInt16Char
| ConsPairInt16Char !Int16 !Char (List (Pair Int16 Char))
empty = EmptyPairInt16Char
cons x z = ConsPairInt16Char (fst x) (snd x) z
null EmptyPairInt16Char = True
null _ = False
head EmptyPairInt16Char = errorEmptyList "head"
head (ConsPairInt16Char x y _) = pair x y
tail EmptyPairInt16Char = errorEmptyList "tail"
tail (ConsPairInt16Char _ _ x) = x
instance AdaptList (Pair Int32 Int) where
data List (Pair Int32 Int)
= EmptyPairInt32Int
| ConsPairInt32Int !Int32 !Int (List (Pair Int32 Int))
empty = EmptyPairInt32Int
cons x z = ConsPairInt32Int (fst x) (snd x) z
null EmptyPairInt32Int = True
null _ = False
head EmptyPairInt32Int = errorEmptyList "head"
head (ConsPairInt32Int x y _) = pair x y
tail EmptyPairInt32Int = errorEmptyList "tail"
tail (ConsPairInt32Int _ _ x) = x
instance AdaptList (Pair Int32 Integer) where
data List (Pair Int32 Integer)
= EmptyPairInt32Integer
| ConsPairInt32Integer !Int32 !Integer (List (Pair Int32 Integer))
empty = EmptyPairInt32Integer
cons x z = ConsPairInt32Integer (fst x) (snd x) z
null EmptyPairInt32Integer = True
null _ = False
head EmptyPairInt32Integer = errorEmptyList "head"
head (ConsPairInt32Integer x y _) = pair x y
tail EmptyPairInt32Integer = errorEmptyList "tail"
tail (ConsPairInt32Integer _ _ x) = x
instance AdaptList (Pair Int32 Int8) where
data List (Pair Int32 Int8)
= EmptyPairInt32Int8
| ConsPairInt32Int8 !Int32 !Int8 (List (Pair Int32 Int8))
empty = EmptyPairInt32Int8
cons x z = ConsPairInt32Int8 (fst x) (snd x) z
null EmptyPairInt32Int8 = True
null _ = False
head EmptyPairInt32Int8 = errorEmptyList "head"
head (ConsPairInt32Int8 x y _) = pair x y
tail EmptyPairInt32Int8 = errorEmptyList "tail"
tail (ConsPairInt32Int8 _ _ x) = x
instance AdaptList (Pair Int32 Int16) where
data List (Pair Int32 Int16)
= EmptyPairInt32Int16
| ConsPairInt32Int16 !Int32 !Int16 (List (Pair Int32 Int16))
empty = EmptyPairInt32Int16
cons x z = ConsPairInt32Int16 (fst x) (snd x) z
null EmptyPairInt32Int16 = True
null _ = False
head EmptyPairInt32Int16 = errorEmptyList "head"
head (ConsPairInt32Int16 x y _) = pair x y
tail EmptyPairInt32Int16 = errorEmptyList "tail"
tail (ConsPairInt32Int16 _ _ x) = x
instance AdaptList (Pair Int32 Int32) where
data List (Pair Int32 Int32)
= EmptyPairInt32Int32
| ConsPairInt32Int32 !Int32 !Int32 (List (Pair Int32 Int32))
empty = EmptyPairInt32Int32
cons x z = ConsPairInt32Int32 (fst x) (snd x) z
null EmptyPairInt32Int32 = True
null _ = False
head EmptyPairInt32Int32 = errorEmptyList "head"
head (ConsPairInt32Int32 x y _) = pair x y
tail EmptyPairInt32Int32 = errorEmptyList "tail"
tail (ConsPairInt32Int32 _ _ x) = x
instance AdaptList (Pair Int32 Int64) where
data List (Pair Int32 Int64)
= EmptyPairInt32Int64
| ConsPairInt32Int64 !Int32 !Int64 (List (Pair Int32 Int64))
empty = EmptyPairInt32Int64
cons x z = ConsPairInt32Int64 (fst x) (snd x) z
null EmptyPairInt32Int64 = True
null _ = False
head EmptyPairInt32Int64 = errorEmptyList "head"
head (ConsPairInt32Int64 x y _) = pair x y
tail EmptyPairInt32Int64 = errorEmptyList "tail"
tail (ConsPairInt32Int64 _ _ x) = x
instance AdaptList (Pair Int32 Word) where
data List (Pair Int32 Word)
= EmptyPairInt32Word
| ConsPairInt32Word !Int32 !Word (List (Pair Int32 Word))
empty = EmptyPairInt32Word
cons x z = ConsPairInt32Word (fst x) (snd x) z
null EmptyPairInt32Word = True
null _ = False
head EmptyPairInt32Word = errorEmptyList "head"
head (ConsPairInt32Word x y _) = pair x y
tail EmptyPairInt32Word = errorEmptyList "tail"
tail (ConsPairInt32Word _ _ x) = x
instance AdaptList (Pair Int32 Word8) where
data List (Pair Int32 Word8)
= EmptyPairInt32Word8
| ConsPairInt32Word8 !Int32 !Word8 (List (Pair Int32 Word8))
empty = EmptyPairInt32Word8
cons x z = ConsPairInt32Word8 (fst x) (snd x) z
null EmptyPairInt32Word8 = True
null _ = False
head EmptyPairInt32Word8 = errorEmptyList "head"
head (ConsPairInt32Word8 x y _) = pair x y
tail EmptyPairInt32Word8 = errorEmptyList "tail"
tail (ConsPairInt32Word8 _ _ x) = x
instance AdaptList (Pair Int32 Word16) where
data List (Pair Int32 Word16)
= EmptyPairInt32Word16
| ConsPairInt32Word16 !Int32 !Word16 (List (Pair Int32 Word16))
empty = EmptyPairInt32Word16
cons x z = ConsPairInt32Word16 (fst x) (snd x) z
null EmptyPairInt32Word16 = True
null _ = False
head EmptyPairInt32Word16 = errorEmptyList "head"
head (ConsPairInt32Word16 x y _) = pair x y
tail EmptyPairInt32Word16 = errorEmptyList "tail"
tail (ConsPairInt32Word16 _ _ x) = x
instance AdaptList (Pair Int32 Word32) where
data List (Pair Int32 Word32)
= EmptyPairInt32Word32
| ConsPairInt32Word32 !Int32 !Word32 (List (Pair Int32 Word32))
empty = EmptyPairInt32Word32
cons x z = ConsPairInt32Word32 (fst x) (snd x) z
null EmptyPairInt32Word32 = True
null _ = False
head EmptyPairInt32Word32 = errorEmptyList "head"
head (ConsPairInt32Word32 x y _) = pair x y
tail EmptyPairInt32Word32 = errorEmptyList "tail"
tail (ConsPairInt32Word32 _ _ x) = x
instance AdaptList (Pair Int32 Word64) where
data List (Pair Int32 Word64)
= EmptyPairInt32Word64
| ConsPairInt32Word64 !Int32 !Word64 (List (Pair Int32 Word64))
empty = EmptyPairInt32Word64
cons x z = ConsPairInt32Word64 (fst x) (snd x) z
null EmptyPairInt32Word64 = True
null _ = False
head EmptyPairInt32Word64 = errorEmptyList "head"
head (ConsPairInt32Word64 x y _) = pair x y
tail EmptyPairInt32Word64 = errorEmptyList "tail"
tail (ConsPairInt32Word64 _ _ x) = x
instance AdaptList (Pair Int32 Double) where
data List (Pair Int32 Double)
= EmptyPairInt32Double
| ConsPairInt32Double !Int32 !Double (List (Pair Int32 Double))
empty = EmptyPairInt32Double
cons x z = ConsPairInt32Double (fst x) (snd x) z
null EmptyPairInt32Double = True
null _ = False
head EmptyPairInt32Double = errorEmptyList "head"
head (ConsPairInt32Double x y _) = pair x y
tail EmptyPairInt32Double = errorEmptyList "tail"
tail (ConsPairInt32Double _ _ x) = x
instance AdaptList (Pair Int32 Float) where
data List (Pair Int32 Float)
= EmptyPairInt32Float
| ConsPairInt32Float !Int32 !Float (List (Pair Int32 Float))
empty = EmptyPairInt32Float
cons x z = ConsPairInt32Float (fst x) (snd x) z
null EmptyPairInt32Float = True
null _ = False
head EmptyPairInt32Float = errorEmptyList "head"
head (ConsPairInt32Float x y _) = pair x y
tail EmptyPairInt32Float = errorEmptyList "tail"
tail (ConsPairInt32Float _ _ x) = x
instance AdaptList (Pair Int32 Char) where
data List (Pair Int32 Char)
= EmptyPairInt32Char
| ConsPairInt32Char !Int32 !Char (List (Pair Int32 Char))
empty = EmptyPairInt32Char
cons x z = ConsPairInt32Char (fst x) (snd x) z
null EmptyPairInt32Char = True
null _ = False
head EmptyPairInt32Char = errorEmptyList "head"
head (ConsPairInt32Char x y _) = pair x y
tail EmptyPairInt32Char = errorEmptyList "tail"
tail (ConsPairInt32Char _ _ x) = x
instance AdaptList (Pair Int64 Int) where
data List (Pair Int64 Int)
= EmptyPairInt64Int
| ConsPairInt64Int !Int64 !Int (List (Pair Int64 Int))
empty = EmptyPairInt64Int
cons x z = ConsPairInt64Int (fst x) (snd x) z
null EmptyPairInt64Int = True
null _ = False
head EmptyPairInt64Int = errorEmptyList "head"
head (ConsPairInt64Int x y _) = pair x y
tail EmptyPairInt64Int = errorEmptyList "tail"
tail (ConsPairInt64Int _ _ x) = x
instance AdaptList (Pair Int64 Integer) where
data List (Pair Int64 Integer)
= EmptyPairInt64Integer
| ConsPairInt64Integer !Int64 !Integer (List (Pair Int64 Integer))
empty = EmptyPairInt64Integer
cons x z = ConsPairInt64Integer (fst x) (snd x) z
null EmptyPairInt64Integer = True
null _ = False
head EmptyPairInt64Integer = errorEmptyList "head"
head (ConsPairInt64Integer x y _) = pair x y
tail EmptyPairInt64Integer = errorEmptyList "tail"
tail (ConsPairInt64Integer _ _ x) = x
instance AdaptList (Pair Int64 Int8) where
data List (Pair Int64 Int8)
= EmptyPairInt64Int8
| ConsPairInt64Int8 !Int64 !Int8 (List (Pair Int64 Int8))
empty = EmptyPairInt64Int8
cons x z = ConsPairInt64Int8 (fst x) (snd x) z
null EmptyPairInt64Int8 = True
null _ = False
head EmptyPairInt64Int8 = errorEmptyList "head"
head (ConsPairInt64Int8 x y _) = pair x y
tail EmptyPairInt64Int8 = errorEmptyList "tail"
tail (ConsPairInt64Int8 _ _ x) = x
instance AdaptList (Pair Int64 Int16) where
data List (Pair Int64 Int16)
= EmptyPairInt64Int16
| ConsPairInt64Int16 !Int64 !Int16 (List (Pair Int64 Int16))
empty = EmptyPairInt64Int16
cons x z = ConsPairInt64Int16 (fst x) (snd x) z
null EmptyPairInt64Int16 = True
null _ = False
head EmptyPairInt64Int16 = errorEmptyList "head"
head (ConsPairInt64Int16 x y _) = pair x y
tail EmptyPairInt64Int16 = errorEmptyList "tail"
tail (ConsPairInt64Int16 _ _ x) = x
instance AdaptList (Pair Int64 Int32) where
data List (Pair Int64 Int32)
= EmptyPairInt64Int32
| ConsPairInt64Int32 !Int64 !Int32 (List (Pair Int64 Int32))
empty = EmptyPairInt64Int32
cons x z = ConsPairInt64Int32 (fst x) (snd x) z
null EmptyPairInt64Int32 = True
null _ = False
head EmptyPairInt64Int32 = errorEmptyList "head"
head (ConsPairInt64Int32 x y _) = pair x y
tail EmptyPairInt64Int32 = errorEmptyList "tail"
tail (ConsPairInt64Int32 _ _ x) = x
instance AdaptList (Pair Int64 Int64) where
data List (Pair Int64 Int64)
= EmptyPairInt64Int64
| ConsPairInt64Int64 !Int64 !Int64 (List (Pair Int64 Int64))
empty = EmptyPairInt64Int64
cons x z = ConsPairInt64Int64 (fst x) (snd x) z
null EmptyPairInt64Int64 = True
null _ = False
head EmptyPairInt64Int64 = errorEmptyList "head"
head (ConsPairInt64Int64 x y _) = pair x y
tail EmptyPairInt64Int64 = errorEmptyList "tail"
tail (ConsPairInt64Int64 _ _ x) = x
instance AdaptList (Pair Int64 Word) where
data List (Pair Int64 Word)
= EmptyPairInt64Word
| ConsPairInt64Word !Int64 !Word (List (Pair Int64 Word))
empty = EmptyPairInt64Word
cons x z = ConsPairInt64Word (fst x) (snd x) z
null EmptyPairInt64Word = True
null _ = False
head EmptyPairInt64Word = errorEmptyList "head"
head (ConsPairInt64Word x y _) = pair x y
tail EmptyPairInt64Word = errorEmptyList "tail"
tail (ConsPairInt64Word _ _ x) = x
instance AdaptList (Pair Int64 Word8) where
data List (Pair Int64 Word8)
= EmptyPairInt64Word8
| ConsPairInt64Word8 !Int64 !Word8 (List (Pair Int64 Word8))
empty = EmptyPairInt64Word8
cons x z = ConsPairInt64Word8 (fst x) (snd x) z
null EmptyPairInt64Word8 = True
null _ = False
head EmptyPairInt64Word8 = errorEmptyList "head"
head (ConsPairInt64Word8 x y _) = pair x y
tail EmptyPairInt64Word8 = errorEmptyList "tail"
tail (ConsPairInt64Word8 _ _ x) = x
instance AdaptList (Pair Int64 Word16) where
data List (Pair Int64 Word16)
= EmptyPairInt64Word16
| ConsPairInt64Word16 !Int64 !Word16 (List (Pair Int64 Word16))
empty = EmptyPairInt64Word16
cons x z = ConsPairInt64Word16 (fst x) (snd x) z
null EmptyPairInt64Word16 = True
null _ = False
head EmptyPairInt64Word16 = errorEmptyList "head"
head (ConsPairInt64Word16 x y _) = pair x y
tail EmptyPairInt64Word16 = errorEmptyList "tail"
tail (ConsPairInt64Word16 _ _ x) = x
instance AdaptList (Pair Int64 Word32) where
data List (Pair Int64 Word32)
= EmptyPairInt64Word32
| ConsPairInt64Word32 !Int64 !Word32 (List (Pair Int64 Word32))
empty = EmptyPairInt64Word32
cons x z = ConsPairInt64Word32 (fst x) (snd x) z
null EmptyPairInt64Word32 = True
null _ = False
head EmptyPairInt64Word32 = errorEmptyList "head"
head (ConsPairInt64Word32 x y _) = pair x y
tail EmptyPairInt64Word32 = errorEmptyList "tail"
tail (ConsPairInt64Word32 _ _ x) = x
instance AdaptList (Pair Int64 Word64) where
data List (Pair Int64 Word64)
= EmptyPairInt64Word64
| ConsPairInt64Word64 !Int64 !Word64 (List (Pair Int64 Word64))
empty = EmptyPairInt64Word64
cons x z = ConsPairInt64Word64 (fst x) (snd x) z
null EmptyPairInt64Word64 = True
null _ = False
head EmptyPairInt64Word64 = errorEmptyList "head"
head (ConsPairInt64Word64 x y _) = pair x y
tail EmptyPairInt64Word64 = errorEmptyList "tail"
tail (ConsPairInt64Word64 _ _ x) = x
instance AdaptList (Pair Int64 Double) where
data List (Pair Int64 Double)
= EmptyPairInt64Double
| ConsPairInt64Double !Int64 !Double (List (Pair Int64 Double))
empty = EmptyPairInt64Double
cons x z = ConsPairInt64Double (fst x) (snd x) z
null EmptyPairInt64Double = True
null _ = False
head EmptyPairInt64Double = errorEmptyList "head"
head (ConsPairInt64Double x y _) = pair x y
tail EmptyPairInt64Double = errorEmptyList "tail"
tail (ConsPairInt64Double _ _ x) = x
instance AdaptList (Pair Int64 Float) where
data List (Pair Int64 Float)
= EmptyPairInt64Float
| ConsPairInt64Float !Int64 !Float (List (Pair Int64 Float))
empty = EmptyPairInt64Float
cons x z = ConsPairInt64Float (fst x) (snd x) z
null EmptyPairInt64Float = True
null _ = False
head EmptyPairInt64Float = errorEmptyList "head"
head (ConsPairInt64Float x y _) = pair x y
tail EmptyPairInt64Float = errorEmptyList "tail"
tail (ConsPairInt64Float _ _ x) = x
instance AdaptList (Pair Int64 Char) where
data List (Pair Int64 Char)
= EmptyPairInt64Char
| ConsPairInt64Char !Int64 !Char (List (Pair Int64 Char))
empty = EmptyPairInt64Char
cons x z = ConsPairInt64Char (fst x) (snd x) z
null EmptyPairInt64Char = True
null _ = False
head EmptyPairInt64Char = errorEmptyList "head"
head (ConsPairInt64Char x y _) = pair x y
tail EmptyPairInt64Char = errorEmptyList "tail"
tail (ConsPairInt64Char _ _ x) = x
instance AdaptList (Pair Word Int) where
data List (Pair Word Int)
= EmptyPairWordInt
| ConsPairWordInt !Word !Int (List (Pair Word Int))
empty = EmptyPairWordInt
cons x z = ConsPairWordInt (fst x) (snd x) z
null EmptyPairWordInt = True
null _ = False
head EmptyPairWordInt = errorEmptyList "head"
head (ConsPairWordInt x y _) = pair x y
tail EmptyPairWordInt = errorEmptyList "tail"
tail (ConsPairWordInt _ _ x) = x
instance AdaptList (Pair Word Integer) where
data List (Pair Word Integer)
= EmptyPairWordInteger
| ConsPairWordInteger !Word !Integer (List (Pair Word Integer))
empty = EmptyPairWordInteger
cons x z = ConsPairWordInteger (fst x) (snd x) z
null EmptyPairWordInteger = True
null _ = False
head EmptyPairWordInteger = errorEmptyList "head"
head (ConsPairWordInteger x y _) = pair x y
tail EmptyPairWordInteger = errorEmptyList "tail"
tail (ConsPairWordInteger _ _ x) = x
instance AdaptList (Pair Word Int8) where
data List (Pair Word Int8)
= EmptyPairWordInt8
| ConsPairWordInt8 !Word !Int8 (List (Pair Word Int8))
empty = EmptyPairWordInt8
cons x z = ConsPairWordInt8 (fst x) (snd x) z
null EmptyPairWordInt8 = True
null _ = False
head EmptyPairWordInt8 = errorEmptyList "head"
head (ConsPairWordInt8 x y _) = pair x y
tail EmptyPairWordInt8 = errorEmptyList "tail"
tail (ConsPairWordInt8 _ _ x) = x
instance AdaptList (Pair Word Int16) where
data List (Pair Word Int16)
= EmptyPairWordInt16
| ConsPairWordInt16 !Word !Int16 (List (Pair Word Int16))
empty = EmptyPairWordInt16
cons x z = ConsPairWordInt16 (fst x) (snd x) z
null EmptyPairWordInt16 = True
null _ = False
head EmptyPairWordInt16 = errorEmptyList "head"
head (ConsPairWordInt16 x y _) = pair x y
tail EmptyPairWordInt16 = errorEmptyList "tail"
tail (ConsPairWordInt16 _ _ x) = x
instance AdaptList (Pair Word Int32) where
data List (Pair Word Int32)
= EmptyPairWordInt32
| ConsPairWordInt32 !Word !Int32 (List (Pair Word Int32))
empty = EmptyPairWordInt32
cons x z = ConsPairWordInt32 (fst x) (snd x) z
null EmptyPairWordInt32 = True
null _ = False
head EmptyPairWordInt32 = errorEmptyList "head"
head (ConsPairWordInt32 x y _) = pair x y
tail EmptyPairWordInt32 = errorEmptyList "tail"
tail (ConsPairWordInt32 _ _ x) = x
instance AdaptList (Pair Word Int64) where
data List (Pair Word Int64)
= EmptyPairWordInt64
| ConsPairWordInt64 !Word !Int64 (List (Pair Word Int64))
empty = EmptyPairWordInt64
cons x z = ConsPairWordInt64 (fst x) (snd x) z
null EmptyPairWordInt64 = True
null _ = False
head EmptyPairWordInt64 = errorEmptyList "head"
head (ConsPairWordInt64 x y _) = pair x y
tail EmptyPairWordInt64 = errorEmptyList "tail"
tail (ConsPairWordInt64 _ _ x) = x
instance AdaptList (Pair Word Word) where
data List (Pair Word Word)
= EmptyPairWordWord
| ConsPairWordWord !Word !Word (List (Pair Word Word))
empty = EmptyPairWordWord
cons x z = ConsPairWordWord (fst x) (snd x) z
null EmptyPairWordWord = True
null _ = False
head EmptyPairWordWord = errorEmptyList "head"
head (ConsPairWordWord x y _) = pair x y
tail EmptyPairWordWord = errorEmptyList "tail"
tail (ConsPairWordWord _ _ x) = x
instance AdaptList (Pair Word Word8) where
data List (Pair Word Word8)
= EmptyPairWordWord8
| ConsPairWordWord8 !Word !Word8 (List (Pair Word Word8))
empty = EmptyPairWordWord8
cons x z = ConsPairWordWord8 (fst x) (snd x) z
null EmptyPairWordWord8 = True
null _ = False
head EmptyPairWordWord8 = errorEmptyList "head"
head (ConsPairWordWord8 x y _) = pair x y
tail EmptyPairWordWord8 = errorEmptyList "tail"
tail (ConsPairWordWord8 _ _ x) = x
instance AdaptList (Pair Word Word16) where
data List (Pair Word Word16)
= EmptyPairWordWord16
| ConsPairWordWord16 !Word !Word16 (List (Pair Word Word16))
empty = EmptyPairWordWord16
cons x z = ConsPairWordWord16 (fst x) (snd x) z
null EmptyPairWordWord16 = True
null _ = False
head EmptyPairWordWord16 = errorEmptyList "head"
head (ConsPairWordWord16 x y _) = pair x y
tail EmptyPairWordWord16 = errorEmptyList "tail"
tail (ConsPairWordWord16 _ _ x) = x
instance AdaptList (Pair Word Word32) where
data List (Pair Word Word32)
= EmptyPairWordWord32
| ConsPairWordWord32 !Word !Word32 (List (Pair Word Word32))
empty = EmptyPairWordWord32
cons x z = ConsPairWordWord32 (fst x) (snd x) z
null EmptyPairWordWord32 = True
null _ = False
head EmptyPairWordWord32 = errorEmptyList "head"
head (ConsPairWordWord32 x y _) = pair x y
tail EmptyPairWordWord32 = errorEmptyList "tail"
tail (ConsPairWordWord32 _ _ x) = x
instance AdaptList (Pair Word Word64) where
data List (Pair Word Word64)
= EmptyPairWordWord64
| ConsPairWordWord64 !Word !Word64 (List (Pair Word Word64))
empty = EmptyPairWordWord64
cons x z = ConsPairWordWord64 (fst x) (snd x) z
null EmptyPairWordWord64 = True
null _ = False
head EmptyPairWordWord64 = errorEmptyList "head"
head (ConsPairWordWord64 x y _) = pair x y
tail EmptyPairWordWord64 = errorEmptyList "tail"
tail (ConsPairWordWord64 _ _ x) = x
instance AdaptList (Pair Word Double) where
data List (Pair Word Double)
= EmptyPairWordDouble
| ConsPairWordDouble !Word !Double (List (Pair Word Double))
empty = EmptyPairWordDouble
cons x z = ConsPairWordDouble (fst x) (snd x) z
null EmptyPairWordDouble = True
null _ = False
head EmptyPairWordDouble = errorEmptyList "head"
head (ConsPairWordDouble x y _) = pair x y
tail EmptyPairWordDouble = errorEmptyList "tail"
tail (ConsPairWordDouble _ _ x) = x
instance AdaptList (Pair Word Float) where
data List (Pair Word Float)
= EmptyPairWordFloat
| ConsPairWordFloat !Word !Float (List (Pair Word Float))
empty = EmptyPairWordFloat
cons x z = ConsPairWordFloat (fst x) (snd x) z
null EmptyPairWordFloat = True
null _ = False
head EmptyPairWordFloat = errorEmptyList "head"
head (ConsPairWordFloat x y _) = pair x y
tail EmptyPairWordFloat = errorEmptyList "tail"
tail (ConsPairWordFloat _ _ x) = x
instance AdaptList (Pair Word Char) where
data List (Pair Word Char)
= EmptyPairWordChar
| ConsPairWordChar !Word !Char (List (Pair Word Char))
empty = EmptyPairWordChar
cons x z = ConsPairWordChar (fst x) (snd x) z
null EmptyPairWordChar = True
null _ = False
head EmptyPairWordChar = errorEmptyList "head"
head (ConsPairWordChar x y _) = pair x y
tail EmptyPairWordChar = errorEmptyList "tail"
tail (ConsPairWordChar _ _ x) = x
instance AdaptList (Pair Word8 Int) where
data List (Pair Word8 Int)
= EmptyPairWord8Int
| ConsPairWord8Int !Word8 !Int (List (Pair Word8 Int))
empty = EmptyPairWord8Int
cons x z = ConsPairWord8Int (fst x) (snd x) z
null EmptyPairWord8Int = True
null _ = False
head EmptyPairWord8Int = errorEmptyList "head"
head (ConsPairWord8Int x y _) = pair x y
tail EmptyPairWord8Int = errorEmptyList "tail"
tail (ConsPairWord8Int _ _ x) = x
instance AdaptList (Pair Word8 Integer) where
data List (Pair Word8 Integer)
= EmptyPairWord8Integer
| ConsPairWord8Integer !Word8 !Integer (List (Pair Word8 Integer))
empty = EmptyPairWord8Integer
cons x z = ConsPairWord8Integer (fst x) (snd x) z
null EmptyPairWord8Integer = True
null _ = False
head EmptyPairWord8Integer = errorEmptyList "head"
head (ConsPairWord8Integer x y _) = pair x y
tail EmptyPairWord8Integer = errorEmptyList "tail"
tail (ConsPairWord8Integer _ _ x) = x
instance AdaptList (Pair Word8 Int8) where
data List (Pair Word8 Int8)
= EmptyPairWord8Int8
| ConsPairWord8Int8 !Word8 !Int8 (List (Pair Word8 Int8))
empty = EmptyPairWord8Int8
cons x z = ConsPairWord8Int8 (fst x) (snd x) z
null EmptyPairWord8Int8 = True
null _ = False
head EmptyPairWord8Int8 = errorEmptyList "head"
head (ConsPairWord8Int8 x y _) = pair x y
tail EmptyPairWord8Int8 = errorEmptyList "tail"
tail (ConsPairWord8Int8 _ _ x) = x
instance AdaptList (Pair Word8 Int16) where
data List (Pair Word8 Int16)
= EmptyPairWord8Int16
| ConsPairWord8Int16 !Word8 !Int16 (List (Pair Word8 Int16))
empty = EmptyPairWord8Int16
cons x z = ConsPairWord8Int16 (fst x) (snd x) z
null EmptyPairWord8Int16 = True
null _ = False
head EmptyPairWord8Int16 = errorEmptyList "head"
head (ConsPairWord8Int16 x y _) = pair x y
tail EmptyPairWord8Int16 = errorEmptyList "tail"
tail (ConsPairWord8Int16 _ _ x) = x
instance AdaptList (Pair Word8 Int32) where
data List (Pair Word8 Int32)
= EmptyPairWord8Int32
| ConsPairWord8Int32 !Word8 !Int32 (List (Pair Word8 Int32))
empty = EmptyPairWord8Int32
cons x z = ConsPairWord8Int32 (fst x) (snd x) z
null EmptyPairWord8Int32 = True
null _ = False
head EmptyPairWord8Int32 = errorEmptyList "head"
head (ConsPairWord8Int32 x y _) = pair x y
tail EmptyPairWord8Int32 = errorEmptyList "tail"
tail (ConsPairWord8Int32 _ _ x) = x
instance AdaptList (Pair Word8 Int64) where
data List (Pair Word8 Int64)
= EmptyPairWord8Int64
| ConsPairWord8Int64 !Word8 !Int64 (List (Pair Word8 Int64))
empty = EmptyPairWord8Int64
cons x z = ConsPairWord8Int64 (fst x) (snd x) z
null EmptyPairWord8Int64 = True
null _ = False
head EmptyPairWord8Int64 = errorEmptyList "head"
head (ConsPairWord8Int64 x y _) = pair x y
tail EmptyPairWord8Int64 = errorEmptyList "tail"
tail (ConsPairWord8Int64 _ _ x) = x
instance AdaptList (Pair Word8 Word) where
data List (Pair Word8 Word)
= EmptyPairWord8Word
| ConsPairWord8Word !Word8 !Word (List (Pair Word8 Word))
empty = EmptyPairWord8Word
cons x z = ConsPairWord8Word (fst x) (snd x) z
null EmptyPairWord8Word = True
null _ = False
head EmptyPairWord8Word = errorEmptyList "head"
head (ConsPairWord8Word x y _) = pair x y
tail EmptyPairWord8Word = errorEmptyList "tail"
tail (ConsPairWord8Word _ _ x) = x
instance AdaptList (Pair Word8 Word8) where
data List (Pair Word8 Word8)
= EmptyPairWord8Word8
| ConsPairWord8Word8 !Word8 !Word8 (List (Pair Word8 Word8))
empty = EmptyPairWord8Word8
cons x z = ConsPairWord8Word8 (fst x) (snd x) z
null EmptyPairWord8Word8 = True
null _ = False
head EmptyPairWord8Word8 = errorEmptyList "head"
head (ConsPairWord8Word8 x y _) = pair x y
tail EmptyPairWord8Word8 = errorEmptyList "tail"
tail (ConsPairWord8Word8 _ _ x) = x
instance AdaptList (Pair Word8 Word16) where
data List (Pair Word8 Word16)
= EmptyPairWord8Word16
| ConsPairWord8Word16 !Word8 !Word16 (List (Pair Word8 Word16))
empty = EmptyPairWord8Word16
cons x z = ConsPairWord8Word16 (fst x) (snd x) z
null EmptyPairWord8Word16 = True
null _ = False
head EmptyPairWord8Word16 = errorEmptyList "head"
head (ConsPairWord8Word16 x y _) = pair x y
tail EmptyPairWord8Word16 = errorEmptyList "tail"
tail (ConsPairWord8Word16 _ _ x) = x
instance AdaptList (Pair Word8 Word32) where
data List (Pair Word8 Word32)
= EmptyPairWord8Word32
| ConsPairWord8Word32 !Word8 !Word32 (List (Pair Word8 Word32))
empty = EmptyPairWord8Word32
cons x z = ConsPairWord8Word32 (fst x) (snd x) z
null EmptyPairWord8Word32 = True
null _ = False
head EmptyPairWord8Word32 = errorEmptyList "head"
head (ConsPairWord8Word32 x y _) = pair x y
tail EmptyPairWord8Word32 = errorEmptyList "tail"
tail (ConsPairWord8Word32 _ _ x) = x
instance AdaptList (Pair Word8 Word64) where
data List (Pair Word8 Word64)
= EmptyPairWord8Word64
| ConsPairWord8Word64 !Word8 !Word64 (List (Pair Word8 Word64))
empty = EmptyPairWord8Word64
cons x z = ConsPairWord8Word64 (fst x) (snd x) z
null EmptyPairWord8Word64 = True
null _ = False
head EmptyPairWord8Word64 = errorEmptyList "head"
head (ConsPairWord8Word64 x y _) = pair x y
tail EmptyPairWord8Word64 = errorEmptyList "tail"
tail (ConsPairWord8Word64 _ _ x) = x
instance AdaptList (Pair Word8 Double) where
data List (Pair Word8 Double)
= EmptyPairWord8Double
| ConsPairWord8Double !Word8 !Double (List (Pair Word8 Double))
empty = EmptyPairWord8Double
cons x z = ConsPairWord8Double (fst x) (snd x) z
null EmptyPairWord8Double = True
null _ = False
head EmptyPairWord8Double = errorEmptyList "head"
head (ConsPairWord8Double x y _) = pair x y
tail EmptyPairWord8Double = errorEmptyList "tail"
tail (ConsPairWord8Double _ _ x) = x
instance AdaptList (Pair Word8 Float) where
data List (Pair Word8 Float)
= EmptyPairWord8Float
| ConsPairWord8Float !Word8 !Float (List (Pair Word8 Float))
empty = EmptyPairWord8Float
cons x z = ConsPairWord8Float (fst x) (snd x) z
null EmptyPairWord8Float = True
null _ = False
head EmptyPairWord8Float = errorEmptyList "head"
head (ConsPairWord8Float x y _) = pair x y
tail EmptyPairWord8Float = errorEmptyList "tail"
tail (ConsPairWord8Float _ _ x) = x
instance AdaptList (Pair Word8 Char) where
data List (Pair Word8 Char)
= EmptyPairWord8Char
| ConsPairWord8Char !Word8 !Char (List (Pair Word8 Char))
empty = EmptyPairWord8Char
cons x z = ConsPairWord8Char (fst x) (snd x) z
null EmptyPairWord8Char = True
null _ = False
head EmptyPairWord8Char = errorEmptyList "head"
head (ConsPairWord8Char x y _) = pair x y
tail EmptyPairWord8Char = errorEmptyList "tail"
tail (ConsPairWord8Char _ _ x) = x
instance AdaptList (Pair Word16 Int) where
data List (Pair Word16 Int)
= EmptyPairWord16Int
| ConsPairWord16Int !Word16 !Int (List (Pair Word16 Int))
empty = EmptyPairWord16Int
cons x z = ConsPairWord16Int (fst x) (snd x) z
null EmptyPairWord16Int = True
null _ = False
head EmptyPairWord16Int = errorEmptyList "head"
head (ConsPairWord16Int x y _) = pair x y
tail EmptyPairWord16Int = errorEmptyList "tail"
tail (ConsPairWord16Int _ _ x) = x
instance AdaptList (Pair Word16 Integer) where
data List (Pair Word16 Integer)
= EmptyPairWord16Integer
| ConsPairWord16Integer !Word16 !Integer (List (Pair Word16 Integer))
empty = EmptyPairWord16Integer
cons x z = ConsPairWord16Integer (fst x) (snd x) z
null EmptyPairWord16Integer = True
null _ = False
head EmptyPairWord16Integer = errorEmptyList "head"
head (ConsPairWord16Integer x y _) = pair x y
tail EmptyPairWord16Integer = errorEmptyList "tail"
tail (ConsPairWord16Integer _ _ x) = x
instance AdaptList (Pair Word16 Int8) where
data List (Pair Word16 Int8)
= EmptyPairWord16Int8
| ConsPairWord16Int8 !Word16 !Int8 (List (Pair Word16 Int8))
empty = EmptyPairWord16Int8
cons x z = ConsPairWord16Int8 (fst x) (snd x) z
null EmptyPairWord16Int8 = True
null _ = False
head EmptyPairWord16Int8 = errorEmptyList "head"
head (ConsPairWord16Int8 x y _) = pair x y
tail EmptyPairWord16Int8 = errorEmptyList "tail"
tail (ConsPairWord16Int8 _ _ x) = x
instance AdaptList (Pair Word16 Int16) where
data List (Pair Word16 Int16)
= EmptyPairWord16Int16
| ConsPairWord16Int16 !Word16 !Int16 (List (Pair Word16 Int16))
empty = EmptyPairWord16Int16
cons x z = ConsPairWord16Int16 (fst x) (snd x) z
null EmptyPairWord16Int16 = True
null _ = False
head EmptyPairWord16Int16 = errorEmptyList "head"
head (ConsPairWord16Int16 x y _) = pair x y
tail EmptyPairWord16Int16 = errorEmptyList "tail"
tail (ConsPairWord16Int16 _ _ x) = x
instance AdaptList (Pair Word16 Int32) where
data List (Pair Word16 Int32)
= EmptyPairWord16Int32
| ConsPairWord16Int32 !Word16 !Int32 (List (Pair Word16 Int32))
empty = EmptyPairWord16Int32
cons x z = ConsPairWord16Int32 (fst x) (snd x) z
null EmptyPairWord16Int32 = True
null _ = False
head EmptyPairWord16Int32 = errorEmptyList "head"
head (ConsPairWord16Int32 x y _) = pair x y
tail EmptyPairWord16Int32 = errorEmptyList "tail"
tail (ConsPairWord16Int32 _ _ x) = x
instance AdaptList (Pair Word16 Int64) where
data List (Pair Word16 Int64)
= EmptyPairWord16Int64
| ConsPairWord16Int64 !Word16 !Int64 (List (Pair Word16 Int64))
empty = EmptyPairWord16Int64
cons x z = ConsPairWord16Int64 (fst x) (snd x) z
null EmptyPairWord16Int64 = True
null _ = False
head EmptyPairWord16Int64 = errorEmptyList "head"
head (ConsPairWord16Int64 x y _) = pair x y
tail EmptyPairWord16Int64 = errorEmptyList "tail"
tail (ConsPairWord16Int64 _ _ x) = x
instance AdaptList (Pair Word16 Word) where
data List (Pair Word16 Word)
= EmptyPairWord16Word
| ConsPairWord16Word !Word16 !Word (List (Pair Word16 Word))
empty = EmptyPairWord16Word
cons x z = ConsPairWord16Word (fst x) (snd x) z
null EmptyPairWord16Word = True
null _ = False
head EmptyPairWord16Word = errorEmptyList "head"
head (ConsPairWord16Word x y _) = pair x y
tail EmptyPairWord16Word = errorEmptyList "tail"
tail (ConsPairWord16Word _ _ x) = x
instance AdaptList (Pair Word16 Word8) where
data List (Pair Word16 Word8)
= EmptyPairWord16Word8
| ConsPairWord16Word8 !Word16 !Word8 (List (Pair Word16 Word8))
empty = EmptyPairWord16Word8
cons x z = ConsPairWord16Word8 (fst x) (snd x) z
null EmptyPairWord16Word8 = True
null _ = False
head EmptyPairWord16Word8 = errorEmptyList "head"
head (ConsPairWord16Word8 x y _) = pair x y
tail EmptyPairWord16Word8 = errorEmptyList "tail"
tail (ConsPairWord16Word8 _ _ x) = x
instance AdaptList (Pair Word16 Word16) where
data List (Pair Word16 Word16)
= EmptyPairWord16Word16
| ConsPairWord16Word16 !Word16 !Word16 (List (Pair Word16 Word16))
empty = EmptyPairWord16Word16
cons x z = ConsPairWord16Word16 (fst x) (snd x) z
null EmptyPairWord16Word16 = True
null _ = False
head EmptyPairWord16Word16 = errorEmptyList "head"
head (ConsPairWord16Word16 x y _) = pair x y
tail EmptyPairWord16Word16 = errorEmptyList "tail"
tail (ConsPairWord16Word16 _ _ x) = x
instance AdaptList (Pair Word16 Word32) where
data List (Pair Word16 Word32)
= EmptyPairWord16Word32
| ConsPairWord16Word32 !Word16 !Word32 (List (Pair Word16 Word32))
empty = EmptyPairWord16Word32
cons x z = ConsPairWord16Word32 (fst x) (snd x) z
null EmptyPairWord16Word32 = True
null _ = False
head EmptyPairWord16Word32 = errorEmptyList "head"
head (ConsPairWord16Word32 x y _) = pair x y
tail EmptyPairWord16Word32 = errorEmptyList "tail"
tail (ConsPairWord16Word32 _ _ x) = x
instance AdaptList (Pair Word16 Word64) where
data List (Pair Word16 Word64)
= EmptyPairWord16Word64
| ConsPairWord16Word64 !Word16 !Word64 (List (Pair Word16 Word64))
empty = EmptyPairWord16Word64
cons x z = ConsPairWord16Word64 (fst x) (snd x) z
null EmptyPairWord16Word64 = True
null _ = False
head EmptyPairWord16Word64 = errorEmptyList "head"
head (ConsPairWord16Word64 x y _) = pair x y
tail EmptyPairWord16Word64 = errorEmptyList "tail"
tail (ConsPairWord16Word64 _ _ x) = x
instance AdaptList (Pair Word16 Double) where
data List (Pair Word16 Double)
= EmptyPairWord16Double
| ConsPairWord16Double !Word16 !Double (List (Pair Word16 Double))
empty = EmptyPairWord16Double
cons x z = ConsPairWord16Double (fst x) (snd x) z
null EmptyPairWord16Double = True
null _ = False
head EmptyPairWord16Double = errorEmptyList "head"
head (ConsPairWord16Double x y _) = pair x y
tail EmptyPairWord16Double = errorEmptyList "tail"
tail (ConsPairWord16Double _ _ x) = x
instance AdaptList (Pair Word16 Float) where
data List (Pair Word16 Float)
= EmptyPairWord16Float
| ConsPairWord16Float !Word16 !Float (List (Pair Word16 Float))
empty = EmptyPairWord16Float
cons x z = ConsPairWord16Float (fst x) (snd x) z
null EmptyPairWord16Float = True
null _ = False
head EmptyPairWord16Float = errorEmptyList "head"
head (ConsPairWord16Float x y _) = pair x y
tail EmptyPairWord16Float = errorEmptyList "tail"
tail (ConsPairWord16Float _ _ x) = x
instance AdaptList (Pair Word16 Char) where
data List (Pair Word16 Char)
= EmptyPairWord16Char
| ConsPairWord16Char !Word16 !Char (List (Pair Word16 Char))
empty = EmptyPairWord16Char
cons x z = ConsPairWord16Char (fst x) (snd x) z
null EmptyPairWord16Char = True
null _ = False
head EmptyPairWord16Char = errorEmptyList "head"
head (ConsPairWord16Char x y _) = pair x y
tail EmptyPairWord16Char = errorEmptyList "tail"
tail (ConsPairWord16Char _ _ x) = x
instance AdaptList (Pair Word32 Int) where
data List (Pair Word32 Int)
= EmptyPairWord32Int
| ConsPairWord32Int !Word32 !Int (List (Pair Word32 Int))
empty = EmptyPairWord32Int
cons x z = ConsPairWord32Int (fst x) (snd x) z
null EmptyPairWord32Int = True
null _ = False
head EmptyPairWord32Int = errorEmptyList "head"
head (ConsPairWord32Int x y _) = pair x y
tail EmptyPairWord32Int = errorEmptyList "tail"
tail (ConsPairWord32Int _ _ x) = x
instance AdaptList (Pair Word32 Integer) where
data List (Pair Word32 Integer)
= EmptyPairWord32Integer
| ConsPairWord32Integer !Word32 !Integer (List (Pair Word32 Integer))
empty = EmptyPairWord32Integer
cons x z = ConsPairWord32Integer (fst x) (snd x) z
null EmptyPairWord32Integer = True
null _ = False
head EmptyPairWord32Integer = errorEmptyList "head"
head (ConsPairWord32Integer x y _) = pair x y
tail EmptyPairWord32Integer = errorEmptyList "tail"
tail (ConsPairWord32Integer _ _ x) = x
instance AdaptList (Pair Word32 Int8) where
data List (Pair Word32 Int8)
= EmptyPairWord32Int8
| ConsPairWord32Int8 !Word32 !Int8 (List (Pair Word32 Int8))
empty = EmptyPairWord32Int8
cons x z = ConsPairWord32Int8 (fst x) (snd x) z
null EmptyPairWord32Int8 = True
null _ = False
head EmptyPairWord32Int8 = errorEmptyList "head"
head (ConsPairWord32Int8 x y _) = pair x y
tail EmptyPairWord32Int8 = errorEmptyList "tail"
tail (ConsPairWord32Int8 _ _ x) = x
instance AdaptList (Pair Word32 Int16) where
data List (Pair Word32 Int16)
= EmptyPairWord32Int16
| ConsPairWord32Int16 !Word32 !Int16 (List (Pair Word32 Int16))
empty = EmptyPairWord32Int16
cons x z = ConsPairWord32Int16 (fst x) (snd x) z
null EmptyPairWord32Int16 = True
null _ = False
head EmptyPairWord32Int16 = errorEmptyList "head"
head (ConsPairWord32Int16 x y _) = pair x y
tail EmptyPairWord32Int16 = errorEmptyList "tail"
tail (ConsPairWord32Int16 _ _ x) = x
instance AdaptList (Pair Word32 Int32) where
data List (Pair Word32 Int32)
= EmptyPairWord32Int32
| ConsPairWord32Int32 !Word32 !Int32 (List (Pair Word32 Int32))
empty = EmptyPairWord32Int32
cons x z = ConsPairWord32Int32 (fst x) (snd x) z
null EmptyPairWord32Int32 = True
null _ = False
head EmptyPairWord32Int32 = errorEmptyList "head"
head (ConsPairWord32Int32 x y _) = pair x y
tail EmptyPairWord32Int32 = errorEmptyList "tail"
tail (ConsPairWord32Int32 _ _ x) = x
instance AdaptList (Pair Word32 Int64) where
data List (Pair Word32 Int64)
= EmptyPairWord32Int64
| ConsPairWord32Int64 !Word32 !Int64 (List (Pair Word32 Int64))
empty = EmptyPairWord32Int64
cons x z = ConsPairWord32Int64 (fst x) (snd x) z
null EmptyPairWord32Int64 = True
null _ = False
head EmptyPairWord32Int64 = errorEmptyList "head"
head (ConsPairWord32Int64 x y _) = pair x y
tail EmptyPairWord32Int64 = errorEmptyList "tail"
tail (ConsPairWord32Int64 _ _ x) = x
instance AdaptList (Pair Word32 Word) where
data List (Pair Word32 Word)
= EmptyPairWord32Word
| ConsPairWord32Word !Word32 !Word (List (Pair Word32 Word))
empty = EmptyPairWord32Word
cons x z = ConsPairWord32Word (fst x) (snd x) z
null EmptyPairWord32Word = True
null _ = False
head EmptyPairWord32Word = errorEmptyList "head"
head (ConsPairWord32Word x y _) = pair x y
tail EmptyPairWord32Word = errorEmptyList "tail"
tail (ConsPairWord32Word _ _ x) = x
instance AdaptList (Pair Word32 Word8) where
data List (Pair Word32 Word8)
= EmptyPairWord32Word8
| ConsPairWord32Word8 !Word32 !Word8 (List (Pair Word32 Word8))
empty = EmptyPairWord32Word8
cons x z = ConsPairWord32Word8 (fst x) (snd x) z
null EmptyPairWord32Word8 = True
null _ = False
head EmptyPairWord32Word8 = errorEmptyList "head"
head (ConsPairWord32Word8 x y _) = pair x y
tail EmptyPairWord32Word8 = errorEmptyList "tail"
tail (ConsPairWord32Word8 _ _ x) = x
instance AdaptList (Pair Word32 Word16) where
data List (Pair Word32 Word16)
= EmptyPairWord32Word16
| ConsPairWord32Word16 !Word32 !Word16 (List (Pair Word32 Word16))
empty = EmptyPairWord32Word16
cons x z = ConsPairWord32Word16 (fst x) (snd x) z
null EmptyPairWord32Word16 = True
null _ = False
head EmptyPairWord32Word16 = errorEmptyList "head"
head (ConsPairWord32Word16 x y _) = pair x y
tail EmptyPairWord32Word16 = errorEmptyList "tail"
tail (ConsPairWord32Word16 _ _ x) = x
instance AdaptList (Pair Word32 Word32) where
data List (Pair Word32 Word32)
= EmptyPairWord32Word32
| ConsPairWord32Word32 !Word32 !Word32 (List (Pair Word32 Word32))
empty = EmptyPairWord32Word32
cons x z = ConsPairWord32Word32 (fst x) (snd x) z
null EmptyPairWord32Word32 = True
null _ = False
head EmptyPairWord32Word32 = errorEmptyList "head"
head (ConsPairWord32Word32 x y _) = pair x y
tail EmptyPairWord32Word32 = errorEmptyList "tail"
tail (ConsPairWord32Word32 _ _ x) = x
instance AdaptList (Pair Word32 Word64) where
data List (Pair Word32 Word64)
= EmptyPairWord32Word64
| ConsPairWord32Word64 !Word32 !Word64 (List (Pair Word32 Word64))
empty = EmptyPairWord32Word64
cons x z = ConsPairWord32Word64 (fst x) (snd x) z
null EmptyPairWord32Word64 = True
null _ = False
head EmptyPairWord32Word64 = errorEmptyList "head"
head (ConsPairWord32Word64 x y _) = pair x y
tail EmptyPairWord32Word64 = errorEmptyList "tail"
tail (ConsPairWord32Word64 _ _ x) = x
instance AdaptList (Pair Word32 Double) where
data List (Pair Word32 Double)
= EmptyPairWord32Double
| ConsPairWord32Double !Word32 !Double (List (Pair Word32 Double))
empty = EmptyPairWord32Double
cons x z = ConsPairWord32Double (fst x) (snd x) z
null EmptyPairWord32Double = True
null _ = False
head EmptyPairWord32Double = errorEmptyList "head"
head (ConsPairWord32Double x y _) = pair x y
tail EmptyPairWord32Double = errorEmptyList "tail"
tail (ConsPairWord32Double _ _ x) = x
instance AdaptList (Pair Word32 Float) where
data List (Pair Word32 Float)
= EmptyPairWord32Float
| ConsPairWord32Float !Word32 !Float (List (Pair Word32 Float))
empty = EmptyPairWord32Float
cons x z = ConsPairWord32Float (fst x) (snd x) z
null EmptyPairWord32Float = True
null _ = False
head EmptyPairWord32Float = errorEmptyList "head"
head (ConsPairWord32Float x y _) = pair x y
tail EmptyPairWord32Float = errorEmptyList "tail"
tail (ConsPairWord32Float _ _ x) = x
instance AdaptList (Pair Word32 Char) where
data List (Pair Word32 Char)
= EmptyPairWord32Char
| ConsPairWord32Char !Word32 !Char (List (Pair Word32 Char))
empty = EmptyPairWord32Char
cons x z = ConsPairWord32Char (fst x) (snd x) z
null EmptyPairWord32Char = True
null _ = False
head EmptyPairWord32Char = errorEmptyList "head"
head (ConsPairWord32Char x y _) = pair x y
tail EmptyPairWord32Char = errorEmptyList "tail"
tail (ConsPairWord32Char _ _ x) = x
instance AdaptList (Pair Word64 Int) where
data List (Pair Word64 Int)
= EmptyPairWord64Int
| ConsPairWord64Int !Word64 !Int (List (Pair Word64 Int))
empty = EmptyPairWord64Int
cons x z = ConsPairWord64Int (fst x) (snd x) z
null EmptyPairWord64Int = True
null _ = False
head EmptyPairWord64Int = errorEmptyList "head"
head (ConsPairWord64Int x y _) = pair x y
tail EmptyPairWord64Int = errorEmptyList "tail"
tail (ConsPairWord64Int _ _ x) = x
instance AdaptList (Pair Word64 Integer) where
data List (Pair Word64 Integer)
= EmptyPairWord64Integer
| ConsPairWord64Integer !Word64 !Integer (List (Pair Word64 Integer))
empty = EmptyPairWord64Integer
cons x z = ConsPairWord64Integer (fst x) (snd x) z
null EmptyPairWord64Integer = True
null _ = False
head EmptyPairWord64Integer = errorEmptyList "head"
head (ConsPairWord64Integer x y _) = pair x y
tail EmptyPairWord64Integer = errorEmptyList "tail"
tail (ConsPairWord64Integer _ _ x) = x
instance AdaptList (Pair Word64 Int8) where
data List (Pair Word64 Int8)
= EmptyPairWord64Int8
| ConsPairWord64Int8 !Word64 !Int8 (List (Pair Word64 Int8))
empty = EmptyPairWord64Int8
cons x z = ConsPairWord64Int8 (fst x) (snd x) z
null EmptyPairWord64Int8 = True
null _ = False
head EmptyPairWord64Int8 = errorEmptyList "head"
head (ConsPairWord64Int8 x y _) = pair x y
tail EmptyPairWord64Int8 = errorEmptyList "tail"
tail (ConsPairWord64Int8 _ _ x) = x
instance AdaptList (Pair Word64 Int16) where
data List (Pair Word64 Int16)
= EmptyPairWord64Int16
| ConsPairWord64Int16 !Word64 !Int16 (List (Pair Word64 Int16))
empty = EmptyPairWord64Int16
cons x z = ConsPairWord64Int16 (fst x) (snd x) z
null EmptyPairWord64Int16 = True
null _ = False
head EmptyPairWord64Int16 = errorEmptyList "head"
head (ConsPairWord64Int16 x y _) = pair x y
tail EmptyPairWord64Int16 = errorEmptyList "tail"
tail (ConsPairWord64Int16 _ _ x) = x
instance AdaptList (Pair Word64 Int32) where
data List (Pair Word64 Int32)
= EmptyPairWord64Int32
| ConsPairWord64Int32 !Word64 !Int32 (List (Pair Word64 Int32))
empty = EmptyPairWord64Int32
cons x z = ConsPairWord64Int32 (fst x) (snd x) z
null EmptyPairWord64Int32 = True
null _ = False
head EmptyPairWord64Int32 = errorEmptyList "head"
head (ConsPairWord64Int32 x y _) = pair x y
tail EmptyPairWord64Int32 = errorEmptyList "tail"
tail (ConsPairWord64Int32 _ _ x) = x
instance AdaptList (Pair Word64 Int64) where
data List (Pair Word64 Int64)
= EmptyPairWord64Int64
| ConsPairWord64Int64 !Word64 !Int64 (List (Pair Word64 Int64))
empty = EmptyPairWord64Int64
cons x z = ConsPairWord64Int64 (fst x) (snd x) z
null EmptyPairWord64Int64 = True
null _ = False
head EmptyPairWord64Int64 = errorEmptyList "head"
head (ConsPairWord64Int64 x y _) = pair x y
tail EmptyPairWord64Int64 = errorEmptyList "tail"
tail (ConsPairWord64Int64 _ _ x) = x
instance AdaptList (Pair Word64 Word) where
data List (Pair Word64 Word)
= EmptyPairWord64Word
| ConsPairWord64Word !Word64 !Word (List (Pair Word64 Word))
empty = EmptyPairWord64Word
cons x z = ConsPairWord64Word (fst x) (snd x) z
null EmptyPairWord64Word = True
null _ = False
head EmptyPairWord64Word = errorEmptyList "head"
head (ConsPairWord64Word x y _) = pair x y
tail EmptyPairWord64Word = errorEmptyList "tail"
tail (ConsPairWord64Word _ _ x) = x
instance AdaptList (Pair Word64 Word8) where
data List (Pair Word64 Word8)
= EmptyPairWord64Word8
| ConsPairWord64Word8 !Word64 !Word8 (List (Pair Word64 Word8))
empty = EmptyPairWord64Word8
cons x z = ConsPairWord64Word8 (fst x) (snd x) z
null EmptyPairWord64Word8 = True
null _ = False
head EmptyPairWord64Word8 = errorEmptyList "head"
head (ConsPairWord64Word8 x y _) = pair x y
tail EmptyPairWord64Word8 = errorEmptyList "tail"
tail (ConsPairWord64Word8 _ _ x) = x
instance AdaptList (Pair Word64 Word16) where
data List (Pair Word64 Word16)
= EmptyPairWord64Word16
| ConsPairWord64Word16 !Word64 !Word16 (List (Pair Word64 Word16))
empty = EmptyPairWord64Word16
cons x z = ConsPairWord64Word16 (fst x) (snd x) z
null EmptyPairWord64Word16 = True
null _ = False
head EmptyPairWord64Word16 = errorEmptyList "head"
head (ConsPairWord64Word16 x y _) = pair x y
tail EmptyPairWord64Word16 = errorEmptyList "tail"
tail (ConsPairWord64Word16 _ _ x) = x
instance AdaptList (Pair Word64 Word32) where
data List (Pair Word64 Word32)
= EmptyPairWord64Word32
| ConsPairWord64Word32 !Word64 !Word32 (List (Pair Word64 Word32))
empty = EmptyPairWord64Word32
cons x z = ConsPairWord64Word32 (fst x) (snd x) z
null EmptyPairWord64Word32 = True
null _ = False
head EmptyPairWord64Word32 = errorEmptyList "head"
head (ConsPairWord64Word32 x y _) = pair x y
tail EmptyPairWord64Word32 = errorEmptyList "tail"
tail (ConsPairWord64Word32 _ _ x) = x
instance AdaptList (Pair Word64 Word64) where
data List (Pair Word64 Word64)
= EmptyPairWord64Word64
| ConsPairWord64Word64 !Word64 !Word64 (List (Pair Word64 Word64))
empty = EmptyPairWord64Word64
cons x z = ConsPairWord64Word64 (fst x) (snd x) z
null EmptyPairWord64Word64 = True
null _ = False
head EmptyPairWord64Word64 = errorEmptyList "head"
head (ConsPairWord64Word64 x y _) = pair x y
tail EmptyPairWord64Word64 = errorEmptyList "tail"
tail (ConsPairWord64Word64 _ _ x) = x
instance AdaptList (Pair Word64 Double) where
data List (Pair Word64 Double)
= EmptyPairWord64Double
| ConsPairWord64Double !Word64 !Double (List (Pair Word64 Double))
empty = EmptyPairWord64Double
cons x z = ConsPairWord64Double (fst x) (snd x) z
null EmptyPairWord64Double = True
null _ = False
head EmptyPairWord64Double = errorEmptyList "head"
head (ConsPairWord64Double x y _) = pair x y
tail EmptyPairWord64Double = errorEmptyList "tail"
tail (ConsPairWord64Double _ _ x) = x
instance AdaptList (Pair Word64 Float) where
data List (Pair Word64 Float)
= EmptyPairWord64Float
| ConsPairWord64Float !Word64 !Float (List (Pair Word64 Float))
empty = EmptyPairWord64Float
cons x z = ConsPairWord64Float (fst x) (snd x) z
null EmptyPairWord64Float = True
null _ = False
head EmptyPairWord64Float = errorEmptyList "head"
head (ConsPairWord64Float x y _) = pair x y
tail EmptyPairWord64Float = errorEmptyList "tail"
tail (ConsPairWord64Float _ _ x) = x
instance AdaptList (Pair Word64 Char) where
data List (Pair Word64 Char)
= EmptyPairWord64Char
| ConsPairWord64Char !Word64 !Char (List (Pair Word64 Char))
empty = EmptyPairWord64Char
cons x z = ConsPairWord64Char (fst x) (snd x) z
null EmptyPairWord64Char = True
null _ = False
head EmptyPairWord64Char = errorEmptyList "head"
head (ConsPairWord64Char x y _) = pair x y
tail EmptyPairWord64Char = errorEmptyList "tail"
tail (ConsPairWord64Char _ _ x) = x
instance AdaptList (Pair Double Int) where
data List (Pair Double Int)
= EmptyPairDoubleInt
| ConsPairDoubleInt !Double !Int (List (Pair Double Int))
empty = EmptyPairDoubleInt
cons x z = ConsPairDoubleInt (fst x) (snd x) z
null EmptyPairDoubleInt = True
null _ = False
head EmptyPairDoubleInt = errorEmptyList "head"
head (ConsPairDoubleInt x y _) = pair x y
tail EmptyPairDoubleInt = errorEmptyList "tail"
tail (ConsPairDoubleInt _ _ x) = x
instance AdaptList (Pair Double Integer) where
data List (Pair Double Integer)
= EmptyPairDoubleInteger
| ConsPairDoubleInteger !Double !Integer (List (Pair Double Integer))
empty = EmptyPairDoubleInteger
cons x z = ConsPairDoubleInteger (fst x) (snd x) z
null EmptyPairDoubleInteger = True
null _ = False
head EmptyPairDoubleInteger = errorEmptyList "head"
head (ConsPairDoubleInteger x y _) = pair x y
tail EmptyPairDoubleInteger = errorEmptyList "tail"
tail (ConsPairDoubleInteger _ _ x) = x
instance AdaptList (Pair Double Int8) where
data List (Pair Double Int8)
= EmptyPairDoubleInt8
| ConsPairDoubleInt8 !Double !Int8 (List (Pair Double Int8))
empty = EmptyPairDoubleInt8
cons x z = ConsPairDoubleInt8 (fst x) (snd x) z
null EmptyPairDoubleInt8 = True
null _ = False
head EmptyPairDoubleInt8 = errorEmptyList "head"
head (ConsPairDoubleInt8 x y _) = pair x y
tail EmptyPairDoubleInt8 = errorEmptyList "tail"
tail (ConsPairDoubleInt8 _ _ x) = x
instance AdaptList (Pair Double Int16) where
data List (Pair Double Int16)
= EmptyPairDoubleInt16
| ConsPairDoubleInt16 !Double !Int16 (List (Pair Double Int16))
empty = EmptyPairDoubleInt16
cons x z = ConsPairDoubleInt16 (fst x) (snd x) z
null EmptyPairDoubleInt16 = True
null _ = False
head EmptyPairDoubleInt16 = errorEmptyList "head"
head (ConsPairDoubleInt16 x y _) = pair x y
tail EmptyPairDoubleInt16 = errorEmptyList "tail"
tail (ConsPairDoubleInt16 _ _ x) = x
instance AdaptList (Pair Double Int32) where
data List (Pair Double Int32)
= EmptyPairDoubleInt32
| ConsPairDoubleInt32 !Double !Int32 (List (Pair Double Int32))
empty = EmptyPairDoubleInt32
cons x z = ConsPairDoubleInt32 (fst x) (snd x) z
null EmptyPairDoubleInt32 = True
null _ = False
head EmptyPairDoubleInt32 = errorEmptyList "head"
head (ConsPairDoubleInt32 x y _) = pair x y
tail EmptyPairDoubleInt32 = errorEmptyList "tail"
tail (ConsPairDoubleInt32 _ _ x) = x
instance AdaptList (Pair Double Int64) where
data List (Pair Double Int64)
= EmptyPairDoubleInt64
| ConsPairDoubleInt64 !Double !Int64 (List (Pair Double Int64))
empty = EmptyPairDoubleInt64
cons x z = ConsPairDoubleInt64 (fst x) (snd x) z
null EmptyPairDoubleInt64 = True
null _ = False
head EmptyPairDoubleInt64 = errorEmptyList "head"
head (ConsPairDoubleInt64 x y _) = pair x y
tail EmptyPairDoubleInt64 = errorEmptyList "tail"
tail (ConsPairDoubleInt64 _ _ x) = x
instance AdaptList (Pair Double Word) where
data List (Pair Double Word)
= EmptyPairDoubleWord
| ConsPairDoubleWord !Double !Word (List (Pair Double Word))
empty = EmptyPairDoubleWord
cons x z = ConsPairDoubleWord (fst x) (snd x) z
null EmptyPairDoubleWord = True
null _ = False
head EmptyPairDoubleWord = errorEmptyList "head"
head (ConsPairDoubleWord x y _) = pair x y
tail EmptyPairDoubleWord = errorEmptyList "tail"
tail (ConsPairDoubleWord _ _ x) = x
instance AdaptList (Pair Double Word8) where
data List (Pair Double Word8)
= EmptyPairDoubleWord8
| ConsPairDoubleWord8 !Double !Word8 (List (Pair Double Word8))
empty = EmptyPairDoubleWord8
cons x z = ConsPairDoubleWord8 (fst x) (snd x) z
null EmptyPairDoubleWord8 = True
null _ = False
head EmptyPairDoubleWord8 = errorEmptyList "head"
head (ConsPairDoubleWord8 x y _) = pair x y
tail EmptyPairDoubleWord8 = errorEmptyList "tail"
tail (ConsPairDoubleWord8 _ _ x) = x
instance AdaptList (Pair Double Word16) where
data List (Pair Double Word16)
= EmptyPairDoubleWord16
| ConsPairDoubleWord16 !Double !Word16 (List (Pair Double Word16))
empty = EmptyPairDoubleWord16
cons x z = ConsPairDoubleWord16 (fst x) (snd x) z
null EmptyPairDoubleWord16 = True
null _ = False
head EmptyPairDoubleWord16 = errorEmptyList "head"
head (ConsPairDoubleWord16 x y _) = pair x y
tail EmptyPairDoubleWord16 = errorEmptyList "tail"
tail (ConsPairDoubleWord16 _ _ x) = x
instance AdaptList (Pair Double Word32) where
data List (Pair Double Word32)
= EmptyPairDoubleWord32
| ConsPairDoubleWord32 !Double !Word32 (List (Pair Double Word32))
empty = EmptyPairDoubleWord32
cons x z = ConsPairDoubleWord32 (fst x) (snd x) z
null EmptyPairDoubleWord32 = True
null _ = False
head EmptyPairDoubleWord32 = errorEmptyList "head"
head (ConsPairDoubleWord32 x y _) = pair x y
tail EmptyPairDoubleWord32 = errorEmptyList "tail"
tail (ConsPairDoubleWord32 _ _ x) = x
instance AdaptList (Pair Double Word64) where
data List (Pair Double Word64)
= EmptyPairDoubleWord64
| ConsPairDoubleWord64 !Double !Word64 (List (Pair Double Word64))
empty = EmptyPairDoubleWord64
cons x z = ConsPairDoubleWord64 (fst x) (snd x) z
null EmptyPairDoubleWord64 = True
null _ = False
head EmptyPairDoubleWord64 = errorEmptyList "head"
head (ConsPairDoubleWord64 x y _) = pair x y
tail EmptyPairDoubleWord64 = errorEmptyList "tail"
tail (ConsPairDoubleWord64 _ _ x) = x
instance AdaptList (Pair Double Double) where
data List (Pair Double Double)
= EmptyPairDoubleDouble
| ConsPairDoubleDouble !Double !Double (List (Pair Double Double))
empty = EmptyPairDoubleDouble
cons x z = ConsPairDoubleDouble (fst x) (snd x) z
null EmptyPairDoubleDouble = True
null _ = False
head EmptyPairDoubleDouble = errorEmptyList "head"
head (ConsPairDoubleDouble x y _) = pair x y
tail EmptyPairDoubleDouble = errorEmptyList "tail"
tail (ConsPairDoubleDouble _ _ x) = x
instance AdaptList (Pair Double Float) where
data List (Pair Double Float)
= EmptyPairDoubleFloat
| ConsPairDoubleFloat !Double !Float (List (Pair Double Float))
empty = EmptyPairDoubleFloat
cons x z = ConsPairDoubleFloat (fst x) (snd x) z
null EmptyPairDoubleFloat = True
null _ = False
head EmptyPairDoubleFloat = errorEmptyList "head"
head (ConsPairDoubleFloat x y _) = pair x y
tail EmptyPairDoubleFloat = errorEmptyList "tail"
tail (ConsPairDoubleFloat _ _ x) = x
instance AdaptList (Pair Double Char) where
data List (Pair Double Char)
= EmptyPairDoubleChar
| ConsPairDoubleChar !Double !Char (List (Pair Double Char))
empty = EmptyPairDoubleChar
cons x z = ConsPairDoubleChar (fst x) (snd x) z
null EmptyPairDoubleChar = True
null _ = False
head EmptyPairDoubleChar = errorEmptyList "head"
head (ConsPairDoubleChar x y _) = pair x y
tail EmptyPairDoubleChar = errorEmptyList "tail"
tail (ConsPairDoubleChar _ _ x) = x
instance AdaptList (Pair Float Int) where
data List (Pair Float Int)
= EmptyPairFloatInt
| ConsPairFloatInt !Float !Int (List (Pair Float Int))
empty = EmptyPairFloatInt
cons x z = ConsPairFloatInt (fst x) (snd x) z
null EmptyPairFloatInt = True
null _ = False
head EmptyPairFloatInt = errorEmptyList "head"
head (ConsPairFloatInt x y _) = pair x y
tail EmptyPairFloatInt = errorEmptyList "tail"
tail (ConsPairFloatInt _ _ x) = x
instance AdaptList (Pair Float Integer) where
data List (Pair Float Integer)
= EmptyPairFloatInteger
| ConsPairFloatInteger !Float !Integer (List (Pair Float Integer))
empty = EmptyPairFloatInteger
cons x z = ConsPairFloatInteger (fst x) (snd x) z
null EmptyPairFloatInteger = True
null _ = False
head EmptyPairFloatInteger = errorEmptyList "head"
head (ConsPairFloatInteger x y _) = pair x y
tail EmptyPairFloatInteger = errorEmptyList "tail"
tail (ConsPairFloatInteger _ _ x) = x
instance AdaptList (Pair Float Int8) where
data List (Pair Float Int8)
= EmptyPairFloatInt8
| ConsPairFloatInt8 !Float !Int8 (List (Pair Float Int8))
empty = EmptyPairFloatInt8
cons x z = ConsPairFloatInt8 (fst x) (snd x) z
null EmptyPairFloatInt8 = True
null _ = False
head EmptyPairFloatInt8 = errorEmptyList "head"
head (ConsPairFloatInt8 x y _) = pair x y
tail EmptyPairFloatInt8 = errorEmptyList "tail"
tail (ConsPairFloatInt8 _ _ x) = x
instance AdaptList (Pair Float Int16) where
data List (Pair Float Int16)
= EmptyPairFloatInt16
| ConsPairFloatInt16 !Float !Int16 (List (Pair Float Int16))
empty = EmptyPairFloatInt16
cons x z = ConsPairFloatInt16 (fst x) (snd x) z
null EmptyPairFloatInt16 = True
null _ = False
head EmptyPairFloatInt16 = errorEmptyList "head"
head (ConsPairFloatInt16 x y _) = pair x y
tail EmptyPairFloatInt16 = errorEmptyList "tail"
tail (ConsPairFloatInt16 _ _ x) = x
instance AdaptList (Pair Float Int32) where
data List (Pair Float Int32)
= EmptyPairFloatInt32
| ConsPairFloatInt32 !Float !Int32 (List (Pair Float Int32))
empty = EmptyPairFloatInt32
cons x z = ConsPairFloatInt32 (fst x) (snd x) z
null EmptyPairFloatInt32 = True
null _ = False
head EmptyPairFloatInt32 = errorEmptyList "head"
head (ConsPairFloatInt32 x y _) = pair x y
tail EmptyPairFloatInt32 = errorEmptyList "tail"
tail (ConsPairFloatInt32 _ _ x) = x
instance AdaptList (Pair Float Int64) where
data List (Pair Float Int64)
= EmptyPairFloatInt64
| ConsPairFloatInt64 !Float !Int64 (List (Pair Float Int64))
empty = EmptyPairFloatInt64
cons x z = ConsPairFloatInt64 (fst x) (snd x) z
null EmptyPairFloatInt64 = True
null _ = False
head EmptyPairFloatInt64 = errorEmptyList "head"
head (ConsPairFloatInt64 x y _) = pair x y
tail EmptyPairFloatInt64 = errorEmptyList "tail"
tail (ConsPairFloatInt64 _ _ x) = x
instance AdaptList (Pair Float Word) where
data List (Pair Float Word)
= EmptyPairFloatWord
| ConsPairFloatWord !Float !Word (List (Pair Float Word))
empty = EmptyPairFloatWord
cons x z = ConsPairFloatWord (fst x) (snd x) z
null EmptyPairFloatWord = True
null _ = False
head EmptyPairFloatWord = errorEmptyList "head"
head (ConsPairFloatWord x y _) = pair x y
tail EmptyPairFloatWord = errorEmptyList "tail"
tail (ConsPairFloatWord _ _ x) = x
instance AdaptList (Pair Float Word8) where
data List (Pair Float Word8)
= EmptyPairFloatWord8
| ConsPairFloatWord8 !Float !Word8 (List (Pair Float Word8))
empty = EmptyPairFloatWord8
cons x z = ConsPairFloatWord8 (fst x) (snd x) z
null EmptyPairFloatWord8 = True
null _ = False
head EmptyPairFloatWord8 = errorEmptyList "head"
head (ConsPairFloatWord8 x y _) = pair x y
tail EmptyPairFloatWord8 = errorEmptyList "tail"
tail (ConsPairFloatWord8 _ _ x) = x
instance AdaptList (Pair Float Word16) where
data List (Pair Float Word16)
= EmptyPairFloatWord16
| ConsPairFloatWord16 !Float !Word16 (List (Pair Float Word16))
empty = EmptyPairFloatWord16
cons x z = ConsPairFloatWord16 (fst x) (snd x) z
null EmptyPairFloatWord16 = True
null _ = False
head EmptyPairFloatWord16 = errorEmptyList "head"
head (ConsPairFloatWord16 x y _) = pair x y
tail EmptyPairFloatWord16 = errorEmptyList "tail"
tail (ConsPairFloatWord16 _ _ x) = x
instance AdaptList (Pair Float Word32) where
data List (Pair Float Word32)
= EmptyPairFloatWord32
| ConsPairFloatWord32 !Float !Word32 (List (Pair Float Word32))
empty = EmptyPairFloatWord32
cons x z = ConsPairFloatWord32 (fst x) (snd x) z
null EmptyPairFloatWord32 = True
null _ = False
head EmptyPairFloatWord32 = errorEmptyList "head"
head (ConsPairFloatWord32 x y _) = pair x y
tail EmptyPairFloatWord32 = errorEmptyList "tail"
tail (ConsPairFloatWord32 _ _ x) = x
instance AdaptList (Pair Float Word64) where
data List (Pair Float Word64)
= EmptyPairFloatWord64
| ConsPairFloatWord64 !Float !Word64 (List (Pair Float Word64))
empty = EmptyPairFloatWord64
cons x z = ConsPairFloatWord64 (fst x) (snd x) z
null EmptyPairFloatWord64 = True
null _ = False
head EmptyPairFloatWord64 = errorEmptyList "head"
head (ConsPairFloatWord64 x y _) = pair x y
tail EmptyPairFloatWord64 = errorEmptyList "tail"
tail (ConsPairFloatWord64 _ _ x) = x
instance AdaptList (Pair Float Double) where
data List (Pair Float Double)
= EmptyPairFloatDouble
| ConsPairFloatDouble !Float !Double (List (Pair Float Double))
empty = EmptyPairFloatDouble
cons x z = ConsPairFloatDouble (fst x) (snd x) z
null EmptyPairFloatDouble = True
null _ = False
head EmptyPairFloatDouble = errorEmptyList "head"
head (ConsPairFloatDouble x y _) = pair x y
tail EmptyPairFloatDouble = errorEmptyList "tail"
tail (ConsPairFloatDouble _ _ x) = x
instance AdaptList (Pair Float Float) where
data List (Pair Float Float)
= EmptyPairFloatFloat
| ConsPairFloatFloat !Float !Float (List (Pair Float Float))
empty = EmptyPairFloatFloat
cons x z = ConsPairFloatFloat (fst x) (snd x) z
null EmptyPairFloatFloat = True
null _ = False
head EmptyPairFloatFloat = errorEmptyList "head"
head (ConsPairFloatFloat x y _) = pair x y
tail EmptyPairFloatFloat = errorEmptyList "tail"
tail (ConsPairFloatFloat _ _ x) = x
instance AdaptList (Pair Float Char) where
data List (Pair Float Char)
= EmptyPairFloatChar
| ConsPairFloatChar !Float !Char (List (Pair Float Char))
empty = EmptyPairFloatChar
cons x z = ConsPairFloatChar (fst x) (snd x) z
null EmptyPairFloatChar = True
null _ = False
head EmptyPairFloatChar = errorEmptyList "head"
head (ConsPairFloatChar x y _) = pair x y
tail EmptyPairFloatChar = errorEmptyList "tail"
tail (ConsPairFloatChar _ _ x) = x
instance AdaptList (Pair Char Int) where
data List (Pair Char Int)
= EmptyPairCharInt
| ConsPairCharInt !Char !Int (List (Pair Char Int))
empty = EmptyPairCharInt
cons x z = ConsPairCharInt (fst x) (snd x) z
null EmptyPairCharInt = True
null _ = False
head EmptyPairCharInt = errorEmptyList "head"
head (ConsPairCharInt x y _) = pair x y
tail EmptyPairCharInt = errorEmptyList "tail"
tail (ConsPairCharInt _ _ x) = x
instance AdaptList (Pair Char Integer) where
data List (Pair Char Integer)
= EmptyPairCharInteger
| ConsPairCharInteger !Char !Integer (List (Pair Char Integer))
empty = EmptyPairCharInteger
cons x z = ConsPairCharInteger (fst x) (snd x) z
null EmptyPairCharInteger = True
null _ = False
head EmptyPairCharInteger = errorEmptyList "head"
head (ConsPairCharInteger x y _) = pair x y
tail EmptyPairCharInteger = errorEmptyList "tail"
tail (ConsPairCharInteger _ _ x) = x
instance AdaptList (Pair Char Int8) where
data List (Pair Char Int8)
= EmptyPairCharInt8
| ConsPairCharInt8 !Char !Int8 (List (Pair Char Int8))
empty = EmptyPairCharInt8
cons x z = ConsPairCharInt8 (fst x) (snd x) z
null EmptyPairCharInt8 = True
null _ = False
head EmptyPairCharInt8 = errorEmptyList "head"
head (ConsPairCharInt8 x y _) = pair x y
tail EmptyPairCharInt8 = errorEmptyList "tail"
tail (ConsPairCharInt8 _ _ x) = x
instance AdaptList (Pair Char Int16) where
data List (Pair Char Int16)
= EmptyPairCharInt16
| ConsPairCharInt16 !Char !Int16 (List (Pair Char Int16))
empty = EmptyPairCharInt16
cons x z = ConsPairCharInt16 (fst x) (snd x) z
null EmptyPairCharInt16 = True
null _ = False
head EmptyPairCharInt16 = errorEmptyList "head"
head (ConsPairCharInt16 x y _) = pair x y
tail EmptyPairCharInt16 = errorEmptyList "tail"
tail (ConsPairCharInt16 _ _ x) = x
instance AdaptList (Pair Char Int32) where
data List (Pair Char Int32)
= EmptyPairCharInt32
| ConsPairCharInt32 !Char !Int32 (List (Pair Char Int32))
empty = EmptyPairCharInt32
cons x z = ConsPairCharInt32 (fst x) (snd x) z
null EmptyPairCharInt32 = True
null _ = False
head EmptyPairCharInt32 = errorEmptyList "head"
head (ConsPairCharInt32 x y _) = pair x y
tail EmptyPairCharInt32 = errorEmptyList "tail"
tail (ConsPairCharInt32 _ _ x) = x
instance AdaptList (Pair Char Int64) where
data List (Pair Char Int64)
= EmptyPairCharInt64
| ConsPairCharInt64 !Char !Int64 (List (Pair Char Int64))
empty = EmptyPairCharInt64
cons x z = ConsPairCharInt64 (fst x) (snd x) z
null EmptyPairCharInt64 = True
null _ = False
head EmptyPairCharInt64 = errorEmptyList "head"
head (ConsPairCharInt64 x y _) = pair x y
tail EmptyPairCharInt64 = errorEmptyList "tail"
tail (ConsPairCharInt64 _ _ x) = x
instance AdaptList (Pair Char Word) where
data List (Pair Char Word)
= EmptyPairCharWord
| ConsPairCharWord !Char !Word (List (Pair Char Word))
empty = EmptyPairCharWord
cons x z = ConsPairCharWord (fst x) (snd x) z
null EmptyPairCharWord = True
null _ = False
head EmptyPairCharWord = errorEmptyList "head"
head (ConsPairCharWord x y _) = pair x y
tail EmptyPairCharWord = errorEmptyList "tail"
tail (ConsPairCharWord _ _ x) = x
instance AdaptList (Pair Char Word8) where
data List (Pair Char Word8)
= EmptyPairCharWord8
| ConsPairCharWord8 !Char !Word8 (List (Pair Char Word8))
empty = EmptyPairCharWord8
cons x z = ConsPairCharWord8 (fst x) (snd x) z
null EmptyPairCharWord8 = True
null _ = False
head EmptyPairCharWord8 = errorEmptyList "head"
head (ConsPairCharWord8 x y _) = pair x y
tail EmptyPairCharWord8 = errorEmptyList "tail"
tail (ConsPairCharWord8 _ _ x) = x
instance AdaptList (Pair Char Word16) where
data List (Pair Char Word16)
= EmptyPairCharWord16
| ConsPairCharWord16 !Char !Word16 (List (Pair Char Word16))
empty = EmptyPairCharWord16
cons x z = ConsPairCharWord16 (fst x) (snd x) z
null EmptyPairCharWord16 = True
null _ = False
head EmptyPairCharWord16 = errorEmptyList "head"
head (ConsPairCharWord16 x y _) = pair x y
tail EmptyPairCharWord16 = errorEmptyList "tail"
tail (ConsPairCharWord16 _ _ x) = x
instance AdaptList (Pair Char Word32) where
data List (Pair Char Word32)
= EmptyPairCharWord32
| ConsPairCharWord32 !Char !Word32 (List (Pair Char Word32))
empty = EmptyPairCharWord32
cons x z = ConsPairCharWord32 (fst x) (snd x) z
null EmptyPairCharWord32 = True
null _ = False
head EmptyPairCharWord32 = errorEmptyList "head"
head (ConsPairCharWord32 x y _) = pair x y
tail EmptyPairCharWord32 = errorEmptyList "tail"
tail (ConsPairCharWord32 _ _ x) = x
instance AdaptList (Pair Char Word64) where
data List (Pair Char Word64)
= EmptyPairCharWord64
| ConsPairCharWord64 !Char !Word64 (List (Pair Char Word64))
empty = EmptyPairCharWord64
cons x z = ConsPairCharWord64 (fst x) (snd x) z
null EmptyPairCharWord64 = True
null _ = False
head EmptyPairCharWord64 = errorEmptyList "head"
head (ConsPairCharWord64 x y _) = pair x y
tail EmptyPairCharWord64 = errorEmptyList "tail"
tail (ConsPairCharWord64 _ _ x) = x
instance AdaptList (Pair Char Double) where
data List (Pair Char Double)
= EmptyPairCharDouble
| ConsPairCharDouble !Char !Double (List (Pair Char Double))
empty = EmptyPairCharDouble
cons x z = ConsPairCharDouble (fst x) (snd x) z
null EmptyPairCharDouble = True
null _ = False
head EmptyPairCharDouble = errorEmptyList "head"
head (ConsPairCharDouble x y _) = pair x y
tail EmptyPairCharDouble = errorEmptyList "tail"
tail (ConsPairCharDouble _ _ x) = x
instance AdaptList (Pair Char Float) where
data List (Pair Char Float)
= EmptyPairCharFloat
| ConsPairCharFloat !Char !Float (List (Pair Char Float))
empty = EmptyPairCharFloat
cons x z = ConsPairCharFloat (fst x) (snd x) z
null EmptyPairCharFloat = True
null _ = False
head EmptyPairCharFloat = errorEmptyList "head"
head (ConsPairCharFloat x y _) = pair x y
tail EmptyPairCharFloat = errorEmptyList "tail"
tail (ConsPairCharFloat _ _ x) = x
instance AdaptList (Pair Char Char) where
data List (Pair Char Char)
= EmptyPairCharChar
| ConsPairCharChar !Char !Char (List (Pair Char Char))
empty = EmptyPairCharChar
cons x z = ConsPairCharChar (fst x) (snd x) z
null EmptyPairCharChar = True
null _ = False
head EmptyPairCharChar = errorEmptyList "head"
head (ConsPairCharChar x y _) = pair x y
tail EmptyPairCharChar = errorEmptyList "tail"
tail (ConsPairCharChar _ _ x) = x