{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ == 708
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
module Test.LeanCheck.Utils.Types
(
Int1 (..)
, Int2 (..)
, Int3 (..)
, Int4 (..)
, Word1 (..)
, Word2 (..)
, Word3 (..)
, Word4 (..)
, Nat (..)
, Nat1 (..)
, Nat2 (..)
, Nat3 (..)
, Nat4 (..)
, Nat5 (..)
, Nat6 (..)
, Nat7 (..)
, Natural (..)
, UInt1
, UInt2
, UInt3
, UInt4
, X (..)
, Xs (..)
, NoDup (..)
, Bag (..)
, Set (..)
, Map (..)
, Space (..)
, Lower (..)
, Upper (..)
, Alpha (..)
, Digit (..)
, AlphaNum (..)
, Letter (..)
, Spaces (..)
, Lowers (..)
, Uppers (..)
, Alphas (..)
, Digits (..)
, AlphaNums (..)
, Letters (..)
, A, B, C, D, E, F
)
where
import Test.LeanCheck (Listable(..), listIntegral)
import Test.LeanCheck.Core ((+|),cons1)
import Test.LeanCheck.Tiers (noDupListCons, setCons, bagCons, mapCons)
import Data.Ratio ((%))
import Data.Ix
#if __GLASGOW_HASKELL__ == 708
import Data.Typeable (Typeable)
#endif
narrowU :: Int -> Int -> Int
narrowU :: Int -> Int -> Int
narrowU Int
w Int
i = Int
i Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
2Int -> Int -> Int
forall a b. (Num a, Integral b) => a -> b -> a
^Int
w
narrowS :: Int -> Int -> Int
narrowS :: Int -> Int -> Int
narrowS Int
w Int
i = if Int
i' Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< Int
2Int -> Int -> Int
forall a b. (Num a, Integral b) => a -> b -> a
^(Int
wInt -> Int -> Int
forall a. Num a => a -> a -> a
-Int
1)
then Int
i'
else Int
i' Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
l
where
l :: Int
l = Int
2Int -> Int -> Int
forall a b. (Num a, Integral b) => a -> b -> a
^Int
w
i' :: Int
i' = Int
i Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
l
mapTuple :: (a -> b) -> (a,a) -> (b,b)
mapTuple :: (a -> b) -> (a, a) -> (b, b)
mapTuple a -> b
f (a
x,a
y) = (a -> b
f a
x, a -> b
f a
y)
mapFst :: (a -> b) -> (a,c) -> (b,c)
mapFst :: (a -> b) -> (a, c) -> (b, c)
mapFst a -> b
f (a
x,c
y) = (a -> b
f a
x, c
y)
oNewtype :: (a -> b) -> (b -> a) -> (a -> a -> a) -> (b -> b -> b)
oNewtype :: (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype a -> b
con b -> a
des a -> a -> a
o = \b
x b
y -> a -> b
con (a -> b) -> a -> b
forall a b. (a -> b) -> a -> b
$ b -> a
des b
x a -> a -> a
`o` b -> a
des b
y
fNewtype :: (a -> b) -> (b -> a) -> (a -> a) -> (b -> b)
fNewtype :: (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype a -> b
con b -> a
des a -> a
f = a -> b
con (a -> b) -> (b -> a) -> b -> b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> a
f (a -> a) -> (b -> a) -> b -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. b -> a
des
otNewtype :: (a -> b) -> (b -> a) -> (a -> a -> (a,a)) -> (b -> b -> (b,b))
otNewtype :: (a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype a -> b
con b -> a
des a -> a -> (a, a)
o = \b
x b
y -> (a -> b) -> (a, a) -> (b, b)
forall a b. (a -> b) -> (a, a) -> (b, b)
mapTuple a -> b
con ((a, a) -> (b, b)) -> (a, a) -> (b, b)
forall a b. (a -> b) -> a -> b
$ b -> a
des b
x a -> a -> (a, a)
`o` b -> a
des b
y
readsPrecNewtype :: Read a => (a -> b) -> Int -> String -> [(b,String)]
readsPrecNewtype :: (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype a -> b
con Int
n = ((a, String) -> (b, String)) -> [(a, String)] -> [(b, String)]
forall a b. (a -> b) -> [a] -> [b]
map ((a -> b) -> (a, String) -> (b, String)
forall a b c. (a -> b) -> (a, c) -> (b, c)
mapFst a -> b
con) ([(a, String)] -> [(b, String)])
-> (String -> [(a, String)]) -> String -> [(b, String)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> String -> [(a, String)]
forall a. Read a => Int -> ReadS a
readsPrec Int
n
boundedEnumFrom :: (Ord a,Bounded a,Enum a) => a -> [a]
boundedEnumFrom :: a -> [a]
boundedEnumFrom a
x = [a
x..a
forall a. Bounded a => a
maxBound]
boundedEnumFromThen :: (Ord a,Bounded a,Enum a) => a -> a -> [a]
boundedEnumFromThen :: a -> a -> [a]
boundedEnumFromThen a
x a
y | a
x a -> a -> Bool
forall a. Ord a => a -> a -> Bool
> a
y = [a
x,a
y..a
forall a. Bounded a => a
minBound]
| Bool
otherwise = [a
x,a
y..a
forall a. Bounded a => a
maxBound]
newtype Int1 = Int1 { Int1 -> Int
unInt1 :: Int } deriving (Int1 -> Int1 -> Bool
(Int1 -> Int1 -> Bool) -> (Int1 -> Int1 -> Bool) -> Eq Int1
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Int1 -> Int1 -> Bool
$c/= :: Int1 -> Int1 -> Bool
== :: Int1 -> Int1 -> Bool
$c== :: Int1 -> Int1 -> Bool
Eq, Eq Int1
Eq Int1
-> (Int1 -> Int1 -> Ordering)
-> (Int1 -> Int1 -> Bool)
-> (Int1 -> Int1 -> Bool)
-> (Int1 -> Int1 -> Bool)
-> (Int1 -> Int1 -> Bool)
-> (Int1 -> Int1 -> Int1)
-> (Int1 -> Int1 -> Int1)
-> Ord Int1
Int1 -> Int1 -> Bool
Int1 -> Int1 -> Ordering
Int1 -> Int1 -> Int1
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Int1 -> Int1 -> Int1
$cmin :: Int1 -> Int1 -> Int1
max :: Int1 -> Int1 -> Int1
$cmax :: Int1 -> Int1 -> Int1
>= :: Int1 -> Int1 -> Bool
$c>= :: Int1 -> Int1 -> Bool
> :: Int1 -> Int1 -> Bool
$c> :: Int1 -> Int1 -> Bool
<= :: Int1 -> Int1 -> Bool
$c<= :: Int1 -> Int1 -> Bool
< :: Int1 -> Int1 -> Bool
$c< :: Int1 -> Int1 -> Bool
compare :: Int1 -> Int1 -> Ordering
$ccompare :: Int1 -> Int1 -> Ordering
$cp1Ord :: Eq Int1
Ord)
newtype Int2 = Int2 { Int2 -> Int
unInt2 :: Int } deriving (Int2 -> Int2 -> Bool
(Int2 -> Int2 -> Bool) -> (Int2 -> Int2 -> Bool) -> Eq Int2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Int2 -> Int2 -> Bool
$c/= :: Int2 -> Int2 -> Bool
== :: Int2 -> Int2 -> Bool
$c== :: Int2 -> Int2 -> Bool
Eq, Eq Int2
Eq Int2
-> (Int2 -> Int2 -> Ordering)
-> (Int2 -> Int2 -> Bool)
-> (Int2 -> Int2 -> Bool)
-> (Int2 -> Int2 -> Bool)
-> (Int2 -> Int2 -> Bool)
-> (Int2 -> Int2 -> Int2)
-> (Int2 -> Int2 -> Int2)
-> Ord Int2
Int2 -> Int2 -> Bool
Int2 -> Int2 -> Ordering
Int2 -> Int2 -> Int2
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Int2 -> Int2 -> Int2
$cmin :: Int2 -> Int2 -> Int2
max :: Int2 -> Int2 -> Int2
$cmax :: Int2 -> Int2 -> Int2
>= :: Int2 -> Int2 -> Bool
$c>= :: Int2 -> Int2 -> Bool
> :: Int2 -> Int2 -> Bool
$c> :: Int2 -> Int2 -> Bool
<= :: Int2 -> Int2 -> Bool
$c<= :: Int2 -> Int2 -> Bool
< :: Int2 -> Int2 -> Bool
$c< :: Int2 -> Int2 -> Bool
compare :: Int2 -> Int2 -> Ordering
$ccompare :: Int2 -> Int2 -> Ordering
$cp1Ord :: Eq Int2
Ord)
newtype Int3 = Int3 { Int3 -> Int
unInt3 :: Int } deriving (Int3 -> Int3 -> Bool
(Int3 -> Int3 -> Bool) -> (Int3 -> Int3 -> Bool) -> Eq Int3
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Int3 -> Int3 -> Bool
$c/= :: Int3 -> Int3 -> Bool
== :: Int3 -> Int3 -> Bool
$c== :: Int3 -> Int3 -> Bool
Eq, Eq Int3
Eq Int3
-> (Int3 -> Int3 -> Ordering)
-> (Int3 -> Int3 -> Bool)
-> (Int3 -> Int3 -> Bool)
-> (Int3 -> Int3 -> Bool)
-> (Int3 -> Int3 -> Bool)
-> (Int3 -> Int3 -> Int3)
-> (Int3 -> Int3 -> Int3)
-> Ord Int3
Int3 -> Int3 -> Bool
Int3 -> Int3 -> Ordering
Int3 -> Int3 -> Int3
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Int3 -> Int3 -> Int3
$cmin :: Int3 -> Int3 -> Int3
max :: Int3 -> Int3 -> Int3
$cmax :: Int3 -> Int3 -> Int3
>= :: Int3 -> Int3 -> Bool
$c>= :: Int3 -> Int3 -> Bool
> :: Int3 -> Int3 -> Bool
$c> :: Int3 -> Int3 -> Bool
<= :: Int3 -> Int3 -> Bool
$c<= :: Int3 -> Int3 -> Bool
< :: Int3 -> Int3 -> Bool
$c< :: Int3 -> Int3 -> Bool
compare :: Int3 -> Int3 -> Ordering
$ccompare :: Int3 -> Int3 -> Ordering
$cp1Ord :: Eq Int3
Ord)
newtype Int4 = Int4 { Int4 -> Int
unInt4 :: Int } deriving (Int4 -> Int4 -> Bool
(Int4 -> Int4 -> Bool) -> (Int4 -> Int4 -> Bool) -> Eq Int4
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Int4 -> Int4 -> Bool
$c/= :: Int4 -> Int4 -> Bool
== :: Int4 -> Int4 -> Bool
$c== :: Int4 -> Int4 -> Bool
Eq, Eq Int4
Eq Int4
-> (Int4 -> Int4 -> Ordering)
-> (Int4 -> Int4 -> Bool)
-> (Int4 -> Int4 -> Bool)
-> (Int4 -> Int4 -> Bool)
-> (Int4 -> Int4 -> Bool)
-> (Int4 -> Int4 -> Int4)
-> (Int4 -> Int4 -> Int4)
-> Ord Int4
Int4 -> Int4 -> Bool
Int4 -> Int4 -> Ordering
Int4 -> Int4 -> Int4
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Int4 -> Int4 -> Int4
$cmin :: Int4 -> Int4 -> Int4
max :: Int4 -> Int4 -> Int4
$cmax :: Int4 -> Int4 -> Int4
>= :: Int4 -> Int4 -> Bool
$c>= :: Int4 -> Int4 -> Bool
> :: Int4 -> Int4 -> Bool
$c> :: Int4 -> Int4 -> Bool
<= :: Int4 -> Int4 -> Bool
$c<= :: Int4 -> Int4 -> Bool
< :: Int4 -> Int4 -> Bool
$c< :: Int4 -> Int4 -> Bool
compare :: Int4 -> Int4 -> Ordering
$ccompare :: Int4 -> Int4 -> Ordering
$cp1Ord :: Eq Int4
Ord)
newtype Word1 = Word1 { Word1 -> Int
unWord1 :: Int } deriving (Word1 -> Word1 -> Bool
(Word1 -> Word1 -> Bool) -> (Word1 -> Word1 -> Bool) -> Eq Word1
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Word1 -> Word1 -> Bool
$c/= :: Word1 -> Word1 -> Bool
== :: Word1 -> Word1 -> Bool
$c== :: Word1 -> Word1 -> Bool
Eq, Eq Word1
Eq Word1
-> (Word1 -> Word1 -> Ordering)
-> (Word1 -> Word1 -> Bool)
-> (Word1 -> Word1 -> Bool)
-> (Word1 -> Word1 -> Bool)
-> (Word1 -> Word1 -> Bool)
-> (Word1 -> Word1 -> Word1)
-> (Word1 -> Word1 -> Word1)
-> Ord Word1
Word1 -> Word1 -> Bool
Word1 -> Word1 -> Ordering
Word1 -> Word1 -> Word1
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Word1 -> Word1 -> Word1
$cmin :: Word1 -> Word1 -> Word1
max :: Word1 -> Word1 -> Word1
$cmax :: Word1 -> Word1 -> Word1
>= :: Word1 -> Word1 -> Bool
$c>= :: Word1 -> Word1 -> Bool
> :: Word1 -> Word1 -> Bool
$c> :: Word1 -> Word1 -> Bool
<= :: Word1 -> Word1 -> Bool
$c<= :: Word1 -> Word1 -> Bool
< :: Word1 -> Word1 -> Bool
$c< :: Word1 -> Word1 -> Bool
compare :: Word1 -> Word1 -> Ordering
$ccompare :: Word1 -> Word1 -> Ordering
$cp1Ord :: Eq Word1
Ord)
newtype Word2 = Word2 { Word2 -> Int
unWord2 :: Int } deriving (Word2 -> Word2 -> Bool
(Word2 -> Word2 -> Bool) -> (Word2 -> Word2 -> Bool) -> Eq Word2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Word2 -> Word2 -> Bool
$c/= :: Word2 -> Word2 -> Bool
== :: Word2 -> Word2 -> Bool
$c== :: Word2 -> Word2 -> Bool
Eq, Eq Word2
Eq Word2
-> (Word2 -> Word2 -> Ordering)
-> (Word2 -> Word2 -> Bool)
-> (Word2 -> Word2 -> Bool)
-> (Word2 -> Word2 -> Bool)
-> (Word2 -> Word2 -> Bool)
-> (Word2 -> Word2 -> Word2)
-> (Word2 -> Word2 -> Word2)
-> Ord Word2
Word2 -> Word2 -> Bool
Word2 -> Word2 -> Ordering
Word2 -> Word2 -> Word2
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Word2 -> Word2 -> Word2
$cmin :: Word2 -> Word2 -> Word2
max :: Word2 -> Word2 -> Word2
$cmax :: Word2 -> Word2 -> Word2
>= :: Word2 -> Word2 -> Bool
$c>= :: Word2 -> Word2 -> Bool
> :: Word2 -> Word2 -> Bool
$c> :: Word2 -> Word2 -> Bool
<= :: Word2 -> Word2 -> Bool
$c<= :: Word2 -> Word2 -> Bool
< :: Word2 -> Word2 -> Bool
$c< :: Word2 -> Word2 -> Bool
compare :: Word2 -> Word2 -> Ordering
$ccompare :: Word2 -> Word2 -> Ordering
$cp1Ord :: Eq Word2
Ord)
newtype Word3 = Word3 { Word3 -> Int
unWord3 :: Int } deriving (Word3 -> Word3 -> Bool
(Word3 -> Word3 -> Bool) -> (Word3 -> Word3 -> Bool) -> Eq Word3
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Word3 -> Word3 -> Bool
$c/= :: Word3 -> Word3 -> Bool
== :: Word3 -> Word3 -> Bool
$c== :: Word3 -> Word3 -> Bool
Eq, Eq Word3
Eq Word3
-> (Word3 -> Word3 -> Ordering)
-> (Word3 -> Word3 -> Bool)
-> (Word3 -> Word3 -> Bool)
-> (Word3 -> Word3 -> Bool)
-> (Word3 -> Word3 -> Bool)
-> (Word3 -> Word3 -> Word3)
-> (Word3 -> Word3 -> Word3)
-> Ord Word3
Word3 -> Word3 -> Bool
Word3 -> Word3 -> Ordering
Word3 -> Word3 -> Word3
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Word3 -> Word3 -> Word3
$cmin :: Word3 -> Word3 -> Word3
max :: Word3 -> Word3 -> Word3
$cmax :: Word3 -> Word3 -> Word3
>= :: Word3 -> Word3 -> Bool
$c>= :: Word3 -> Word3 -> Bool
> :: Word3 -> Word3 -> Bool
$c> :: Word3 -> Word3 -> Bool
<= :: Word3 -> Word3 -> Bool
$c<= :: Word3 -> Word3 -> Bool
< :: Word3 -> Word3 -> Bool
$c< :: Word3 -> Word3 -> Bool
compare :: Word3 -> Word3 -> Ordering
$ccompare :: Word3 -> Word3 -> Ordering
$cp1Ord :: Eq Word3
Ord)
newtype Word4 = Word4 { Word4 -> Int
unWord4 :: Int } deriving (Word4 -> Word4 -> Bool
(Word4 -> Word4 -> Bool) -> (Word4 -> Word4 -> Bool) -> Eq Word4
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Word4 -> Word4 -> Bool
$c/= :: Word4 -> Word4 -> Bool
== :: Word4 -> Word4 -> Bool
$c== :: Word4 -> Word4 -> Bool
Eq, Eq Word4
Eq Word4
-> (Word4 -> Word4 -> Ordering)
-> (Word4 -> Word4 -> Bool)
-> (Word4 -> Word4 -> Bool)
-> (Word4 -> Word4 -> Bool)
-> (Word4 -> Word4 -> Bool)
-> (Word4 -> Word4 -> Word4)
-> (Word4 -> Word4 -> Word4)
-> Ord Word4
Word4 -> Word4 -> Bool
Word4 -> Word4 -> Ordering
Word4 -> Word4 -> Word4
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Word4 -> Word4 -> Word4
$cmin :: Word4 -> Word4 -> Word4
max :: Word4 -> Word4 -> Word4
$cmax :: Word4 -> Word4 -> Word4
>= :: Word4 -> Word4 -> Bool
$c>= :: Word4 -> Word4 -> Bool
> :: Word4 -> Word4 -> Bool
$c> :: Word4 -> Word4 -> Bool
<= :: Word4 -> Word4 -> Bool
$c<= :: Word4 -> Word4 -> Bool
< :: Word4 -> Word4 -> Bool
$c< :: Word4 -> Word4 -> Bool
compare :: Word4 -> Word4 -> Ordering
$ccompare :: Word4 -> Word4 -> Ordering
$cp1Ord :: Eq Word4
Ord)
newtype Natural = Natural { Natural -> Integer
unNatural :: Integer } deriving (Natural -> Natural -> Bool
(Natural -> Natural -> Bool)
-> (Natural -> Natural -> Bool) -> Eq Natural
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Natural -> Natural -> Bool
$c/= :: Natural -> Natural -> Bool
== :: Natural -> Natural -> Bool
$c== :: Natural -> Natural -> Bool
Eq, Eq Natural
Eq Natural
-> (Natural -> Natural -> Ordering)
-> (Natural -> Natural -> Bool)
-> (Natural -> Natural -> Bool)
-> (Natural -> Natural -> Bool)
-> (Natural -> Natural -> Bool)
-> (Natural -> Natural -> Natural)
-> (Natural -> Natural -> Natural)
-> Ord Natural
Natural -> Natural -> Bool
Natural -> Natural -> Ordering
Natural -> Natural -> Natural
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Natural -> Natural -> Natural
$cmin :: Natural -> Natural -> Natural
max :: Natural -> Natural -> Natural
$cmax :: Natural -> Natural -> Natural
>= :: Natural -> Natural -> Bool
$c>= :: Natural -> Natural -> Bool
> :: Natural -> Natural -> Bool
$c> :: Natural -> Natural -> Bool
<= :: Natural -> Natural -> Bool
$c<= :: Natural -> Natural -> Bool
< :: Natural -> Natural -> Bool
$c< :: Natural -> Natural -> Bool
compare :: Natural -> Natural -> Ordering
$ccompare :: Natural -> Natural -> Ordering
$cp1Ord :: Eq Natural
Ord)
newtype Nat = Nat { Nat -> Int
unNat :: Int } deriving (Nat -> Nat -> Bool
(Nat -> Nat -> Bool) -> (Nat -> Nat -> Bool) -> Eq Nat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Nat -> Nat -> Bool
$c/= :: Nat -> Nat -> Bool
== :: Nat -> Nat -> Bool
$c== :: Nat -> Nat -> Bool
Eq, Eq Nat
Eq Nat
-> (Nat -> Nat -> Ordering)
-> (Nat -> Nat -> Bool)
-> (Nat -> Nat -> Bool)
-> (Nat -> Nat -> Bool)
-> (Nat -> Nat -> Bool)
-> (Nat -> Nat -> Nat)
-> (Nat -> Nat -> Nat)
-> Ord Nat
Nat -> Nat -> Bool
Nat -> Nat -> Ordering
Nat -> Nat -> Nat
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Nat -> Nat -> Nat
$cmin :: Nat -> Nat -> Nat
max :: Nat -> Nat -> Nat
$cmax :: Nat -> Nat -> Nat
>= :: Nat -> Nat -> Bool
$c>= :: Nat -> Nat -> Bool
> :: Nat -> Nat -> Bool
$c> :: Nat -> Nat -> Bool
<= :: Nat -> Nat -> Bool
$c<= :: Nat -> Nat -> Bool
< :: Nat -> Nat -> Bool
$c< :: Nat -> Nat -> Bool
compare :: Nat -> Nat -> Ordering
$ccompare :: Nat -> Nat -> Ordering
$cp1Ord :: Eq Nat
Ord)
newtype Nat1 = Nat1 { Nat1 -> Int
unNat1 :: Int } deriving (Nat1 -> Nat1 -> Bool
(Nat1 -> Nat1 -> Bool) -> (Nat1 -> Nat1 -> Bool) -> Eq Nat1
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Nat1 -> Nat1 -> Bool
$c/= :: Nat1 -> Nat1 -> Bool
== :: Nat1 -> Nat1 -> Bool
$c== :: Nat1 -> Nat1 -> Bool
Eq, Eq Nat1
Eq Nat1
-> (Nat1 -> Nat1 -> Ordering)
-> (Nat1 -> Nat1 -> Bool)
-> (Nat1 -> Nat1 -> Bool)
-> (Nat1 -> Nat1 -> Bool)
-> (Nat1 -> Nat1 -> Bool)
-> (Nat1 -> Nat1 -> Nat1)
-> (Nat1 -> Nat1 -> Nat1)
-> Ord Nat1
Nat1 -> Nat1 -> Bool
Nat1 -> Nat1 -> Ordering
Nat1 -> Nat1 -> Nat1
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Nat1 -> Nat1 -> Nat1
$cmin :: Nat1 -> Nat1 -> Nat1
max :: Nat1 -> Nat1 -> Nat1
$cmax :: Nat1 -> Nat1 -> Nat1
>= :: Nat1 -> Nat1 -> Bool
$c>= :: Nat1 -> Nat1 -> Bool
> :: Nat1 -> Nat1 -> Bool
$c> :: Nat1 -> Nat1 -> Bool
<= :: Nat1 -> Nat1 -> Bool
$c<= :: Nat1 -> Nat1 -> Bool
< :: Nat1 -> Nat1 -> Bool
$c< :: Nat1 -> Nat1 -> Bool
compare :: Nat1 -> Nat1 -> Ordering
$ccompare :: Nat1 -> Nat1 -> Ordering
$cp1Ord :: Eq Nat1
Ord)
newtype Nat2 = Nat2 { Nat2 -> Int
unNat2 :: Int } deriving (Nat2 -> Nat2 -> Bool
(Nat2 -> Nat2 -> Bool) -> (Nat2 -> Nat2 -> Bool) -> Eq Nat2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Nat2 -> Nat2 -> Bool
$c/= :: Nat2 -> Nat2 -> Bool
== :: Nat2 -> Nat2 -> Bool
$c== :: Nat2 -> Nat2 -> Bool
Eq, Eq Nat2
Eq Nat2
-> (Nat2 -> Nat2 -> Ordering)
-> (Nat2 -> Nat2 -> Bool)
-> (Nat2 -> Nat2 -> Bool)
-> (Nat2 -> Nat2 -> Bool)
-> (Nat2 -> Nat2 -> Bool)
-> (Nat2 -> Nat2 -> Nat2)
-> (Nat2 -> Nat2 -> Nat2)
-> Ord Nat2
Nat2 -> Nat2 -> Bool
Nat2 -> Nat2 -> Ordering
Nat2 -> Nat2 -> Nat2
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Nat2 -> Nat2 -> Nat2
$cmin :: Nat2 -> Nat2 -> Nat2
max :: Nat2 -> Nat2 -> Nat2
$cmax :: Nat2 -> Nat2 -> Nat2
>= :: Nat2 -> Nat2 -> Bool
$c>= :: Nat2 -> Nat2 -> Bool
> :: Nat2 -> Nat2 -> Bool
$c> :: Nat2 -> Nat2 -> Bool
<= :: Nat2 -> Nat2 -> Bool
$c<= :: Nat2 -> Nat2 -> Bool
< :: Nat2 -> Nat2 -> Bool
$c< :: Nat2 -> Nat2 -> Bool
compare :: Nat2 -> Nat2 -> Ordering
$ccompare :: Nat2 -> Nat2 -> Ordering
$cp1Ord :: Eq Nat2
Ord)
newtype Nat3 = Nat3 { Nat3 -> Int
unNat3 :: Int } deriving (Nat3 -> Nat3 -> Bool
(Nat3 -> Nat3 -> Bool) -> (Nat3 -> Nat3 -> Bool) -> Eq Nat3
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Nat3 -> Nat3 -> Bool
$c/= :: Nat3 -> Nat3 -> Bool
== :: Nat3 -> Nat3 -> Bool
$c== :: Nat3 -> Nat3 -> Bool
Eq, Eq Nat3
Eq Nat3
-> (Nat3 -> Nat3 -> Ordering)
-> (Nat3 -> Nat3 -> Bool)
-> (Nat3 -> Nat3 -> Bool)
-> (Nat3 -> Nat3 -> Bool)
-> (Nat3 -> Nat3 -> Bool)
-> (Nat3 -> Nat3 -> Nat3)
-> (Nat3 -> Nat3 -> Nat3)
-> Ord Nat3
Nat3 -> Nat3 -> Bool
Nat3 -> Nat3 -> Ordering
Nat3 -> Nat3 -> Nat3
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Nat3 -> Nat3 -> Nat3
$cmin :: Nat3 -> Nat3 -> Nat3
max :: Nat3 -> Nat3 -> Nat3
$cmax :: Nat3 -> Nat3 -> Nat3
>= :: Nat3 -> Nat3 -> Bool
$c>= :: Nat3 -> Nat3 -> Bool
> :: Nat3 -> Nat3 -> Bool
$c> :: Nat3 -> Nat3 -> Bool
<= :: Nat3 -> Nat3 -> Bool
$c<= :: Nat3 -> Nat3 -> Bool
< :: Nat3 -> Nat3 -> Bool
$c< :: Nat3 -> Nat3 -> Bool
compare :: Nat3 -> Nat3 -> Ordering
$ccompare :: Nat3 -> Nat3 -> Ordering
$cp1Ord :: Eq Nat3
Ord)
newtype Nat4 = Nat4 { Nat4 -> Int
unNat4 :: Int } deriving (Nat4 -> Nat4 -> Bool
(Nat4 -> Nat4 -> Bool) -> (Nat4 -> Nat4 -> Bool) -> Eq Nat4
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Nat4 -> Nat4 -> Bool
$c/= :: Nat4 -> Nat4 -> Bool
== :: Nat4 -> Nat4 -> Bool
$c== :: Nat4 -> Nat4 -> Bool
Eq, Eq Nat4
Eq Nat4
-> (Nat4 -> Nat4 -> Ordering)
-> (Nat4 -> Nat4 -> Bool)
-> (Nat4 -> Nat4 -> Bool)
-> (Nat4 -> Nat4 -> Bool)
-> (Nat4 -> Nat4 -> Bool)
-> (Nat4 -> Nat4 -> Nat4)
-> (Nat4 -> Nat4 -> Nat4)
-> Ord Nat4
Nat4 -> Nat4 -> Bool
Nat4 -> Nat4 -> Ordering
Nat4 -> Nat4 -> Nat4
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Nat4 -> Nat4 -> Nat4
$cmin :: Nat4 -> Nat4 -> Nat4
max :: Nat4 -> Nat4 -> Nat4
$cmax :: Nat4 -> Nat4 -> Nat4
>= :: Nat4 -> Nat4 -> Bool
$c>= :: Nat4 -> Nat4 -> Bool
> :: Nat4 -> Nat4 -> Bool
$c> :: Nat4 -> Nat4 -> Bool
<= :: Nat4 -> Nat4 -> Bool
$c<= :: Nat4 -> Nat4 -> Bool
< :: Nat4 -> Nat4 -> Bool
$c< :: Nat4 -> Nat4 -> Bool
compare :: Nat4 -> Nat4 -> Ordering
$ccompare :: Nat4 -> Nat4 -> Ordering
$cp1Ord :: Eq Nat4
Ord)
newtype Nat5 = Nat5 { Nat5 -> Int
unNat5 :: Int } deriving (Nat5 -> Nat5 -> Bool
(Nat5 -> Nat5 -> Bool) -> (Nat5 -> Nat5 -> Bool) -> Eq Nat5
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Nat5 -> Nat5 -> Bool
$c/= :: Nat5 -> Nat5 -> Bool
== :: Nat5 -> Nat5 -> Bool
$c== :: Nat5 -> Nat5 -> Bool
Eq, Eq Nat5
Eq Nat5
-> (Nat5 -> Nat5 -> Ordering)
-> (Nat5 -> Nat5 -> Bool)
-> (Nat5 -> Nat5 -> Bool)
-> (Nat5 -> Nat5 -> Bool)
-> (Nat5 -> Nat5 -> Bool)
-> (Nat5 -> Nat5 -> Nat5)
-> (Nat5 -> Nat5 -> Nat5)
-> Ord Nat5
Nat5 -> Nat5 -> Bool
Nat5 -> Nat5 -> Ordering
Nat5 -> Nat5 -> Nat5
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Nat5 -> Nat5 -> Nat5
$cmin :: Nat5 -> Nat5 -> Nat5
max :: Nat5 -> Nat5 -> Nat5
$cmax :: Nat5 -> Nat5 -> Nat5
>= :: Nat5 -> Nat5 -> Bool
$c>= :: Nat5 -> Nat5 -> Bool
> :: Nat5 -> Nat5 -> Bool
$c> :: Nat5 -> Nat5 -> Bool
<= :: Nat5 -> Nat5 -> Bool
$c<= :: Nat5 -> Nat5 -> Bool
< :: Nat5 -> Nat5 -> Bool
$c< :: Nat5 -> Nat5 -> Bool
compare :: Nat5 -> Nat5 -> Ordering
$ccompare :: Nat5 -> Nat5 -> Ordering
$cp1Ord :: Eq Nat5
Ord)
newtype Nat6 = Nat6 { Nat6 -> Int
unNat6 :: Int } deriving (Nat6 -> Nat6 -> Bool
(Nat6 -> Nat6 -> Bool) -> (Nat6 -> Nat6 -> Bool) -> Eq Nat6
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Nat6 -> Nat6 -> Bool
$c/= :: Nat6 -> Nat6 -> Bool
== :: Nat6 -> Nat6 -> Bool
$c== :: Nat6 -> Nat6 -> Bool
Eq, Eq Nat6
Eq Nat6
-> (Nat6 -> Nat6 -> Ordering)
-> (Nat6 -> Nat6 -> Bool)
-> (Nat6 -> Nat6 -> Bool)
-> (Nat6 -> Nat6 -> Bool)
-> (Nat6 -> Nat6 -> Bool)
-> (Nat6 -> Nat6 -> Nat6)
-> (Nat6 -> Nat6 -> Nat6)
-> Ord Nat6
Nat6 -> Nat6 -> Bool
Nat6 -> Nat6 -> Ordering
Nat6 -> Nat6 -> Nat6
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Nat6 -> Nat6 -> Nat6
$cmin :: Nat6 -> Nat6 -> Nat6
max :: Nat6 -> Nat6 -> Nat6
$cmax :: Nat6 -> Nat6 -> Nat6
>= :: Nat6 -> Nat6 -> Bool
$c>= :: Nat6 -> Nat6 -> Bool
> :: Nat6 -> Nat6 -> Bool
$c> :: Nat6 -> Nat6 -> Bool
<= :: Nat6 -> Nat6 -> Bool
$c<= :: Nat6 -> Nat6 -> Bool
< :: Nat6 -> Nat6 -> Bool
$c< :: Nat6 -> Nat6 -> Bool
compare :: Nat6 -> Nat6 -> Ordering
$ccompare :: Nat6 -> Nat6 -> Ordering
$cp1Ord :: Eq Nat6
Ord)
newtype Nat7 = Nat7 { Nat7 -> Int
unNat7 :: Int } deriving (Nat7 -> Nat7 -> Bool
(Nat7 -> Nat7 -> Bool) -> (Nat7 -> Nat7 -> Bool) -> Eq Nat7
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Nat7 -> Nat7 -> Bool
$c/= :: Nat7 -> Nat7 -> Bool
== :: Nat7 -> Nat7 -> Bool
$c== :: Nat7 -> Nat7 -> Bool
Eq, Eq Nat7
Eq Nat7
-> (Nat7 -> Nat7 -> Ordering)
-> (Nat7 -> Nat7 -> Bool)
-> (Nat7 -> Nat7 -> Bool)
-> (Nat7 -> Nat7 -> Bool)
-> (Nat7 -> Nat7 -> Bool)
-> (Nat7 -> Nat7 -> Nat7)
-> (Nat7 -> Nat7 -> Nat7)
-> Ord Nat7
Nat7 -> Nat7 -> Bool
Nat7 -> Nat7 -> Ordering
Nat7 -> Nat7 -> Nat7
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Nat7 -> Nat7 -> Nat7
$cmin :: Nat7 -> Nat7 -> Nat7
max :: Nat7 -> Nat7 -> Nat7
$cmax :: Nat7 -> Nat7 -> Nat7
>= :: Nat7 -> Nat7 -> Bool
$c>= :: Nat7 -> Nat7 -> Bool
> :: Nat7 -> Nat7 -> Bool
$c> :: Nat7 -> Nat7 -> Bool
<= :: Nat7 -> Nat7 -> Bool
$c<= :: Nat7 -> Nat7 -> Bool
< :: Nat7 -> Nat7 -> Bool
$c< :: Nat7 -> Nat7 -> Bool
compare :: Nat7 -> Nat7 -> Ordering
$ccompare :: Nat7 -> Nat7 -> Ordering
$cp1Ord :: Eq Nat7
Ord)
newtype A = A Int deriving (A -> A -> Bool
(A -> A -> Bool) -> (A -> A -> Bool) -> Eq A
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: A -> A -> Bool
$c/= :: A -> A -> Bool
== :: A -> A -> Bool
$c== :: A -> A -> Bool
Eq, Eq A
Eq A
-> (A -> A -> Ordering)
-> (A -> A -> Bool)
-> (A -> A -> Bool)
-> (A -> A -> Bool)
-> (A -> A -> Bool)
-> (A -> A -> A)
-> (A -> A -> A)
-> Ord A
A -> A -> Bool
A -> A -> Ordering
A -> A -> A
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: A -> A -> A
$cmin :: A -> A -> A
max :: A -> A -> A
$cmax :: A -> A -> A
>= :: A -> A -> Bool
$c>= :: A -> A -> Bool
> :: A -> A -> Bool
$c> :: A -> A -> Bool
<= :: A -> A -> Bool
$c<= :: A -> A -> Bool
< :: A -> A -> Bool
$c< :: A -> A -> Bool
compare :: A -> A -> Ordering
$ccompare :: A -> A -> Ordering
$cp1Ord :: Eq A
Ord)
newtype B = B Int deriving (B -> B -> Bool
(B -> B -> Bool) -> (B -> B -> Bool) -> Eq B
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: B -> B -> Bool
$c/= :: B -> B -> Bool
== :: B -> B -> Bool
$c== :: B -> B -> Bool
Eq, Eq B
Eq B
-> (B -> B -> Ordering)
-> (B -> B -> Bool)
-> (B -> B -> Bool)
-> (B -> B -> Bool)
-> (B -> B -> Bool)
-> (B -> B -> B)
-> (B -> B -> B)
-> Ord B
B -> B -> Bool
B -> B -> Ordering
B -> B -> B
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: B -> B -> B
$cmin :: B -> B -> B
max :: B -> B -> B
$cmax :: B -> B -> B
>= :: B -> B -> Bool
$c>= :: B -> B -> Bool
> :: B -> B -> Bool
$c> :: B -> B -> Bool
<= :: B -> B -> Bool
$c<= :: B -> B -> Bool
< :: B -> B -> Bool
$c< :: B -> B -> Bool
compare :: B -> B -> Ordering
$ccompare :: B -> B -> Ordering
$cp1Ord :: Eq B
Ord)
newtype C = C Int deriving (C -> C -> Bool
(C -> C -> Bool) -> (C -> C -> Bool) -> Eq C
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: C -> C -> Bool
$c/= :: C -> C -> Bool
== :: C -> C -> Bool
$c== :: C -> C -> Bool
Eq, Eq C
Eq C
-> (C -> C -> Ordering)
-> (C -> C -> Bool)
-> (C -> C -> Bool)
-> (C -> C -> Bool)
-> (C -> C -> Bool)
-> (C -> C -> C)
-> (C -> C -> C)
-> Ord C
C -> C -> Bool
C -> C -> Ordering
C -> C -> C
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: C -> C -> C
$cmin :: C -> C -> C
max :: C -> C -> C
$cmax :: C -> C -> C
>= :: C -> C -> Bool
$c>= :: C -> C -> Bool
> :: C -> C -> Bool
$c> :: C -> C -> Bool
<= :: C -> C -> Bool
$c<= :: C -> C -> Bool
< :: C -> C -> Bool
$c< :: C -> C -> Bool
compare :: C -> C -> Ordering
$ccompare :: C -> C -> Ordering
$cp1Ord :: Eq C
Ord)
newtype D = D Int deriving (D -> D -> Bool
(D -> D -> Bool) -> (D -> D -> Bool) -> Eq D
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: D -> D -> Bool
$c/= :: D -> D -> Bool
== :: D -> D -> Bool
$c== :: D -> D -> Bool
Eq, Eq D
Eq D
-> (D -> D -> Ordering)
-> (D -> D -> Bool)
-> (D -> D -> Bool)
-> (D -> D -> Bool)
-> (D -> D -> Bool)
-> (D -> D -> D)
-> (D -> D -> D)
-> Ord D
D -> D -> Bool
D -> D -> Ordering
D -> D -> D
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: D -> D -> D
$cmin :: D -> D -> D
max :: D -> D -> D
$cmax :: D -> D -> D
>= :: D -> D -> Bool
$c>= :: D -> D -> Bool
> :: D -> D -> Bool
$c> :: D -> D -> Bool
<= :: D -> D -> Bool
$c<= :: D -> D -> Bool
< :: D -> D -> Bool
$c< :: D -> D -> Bool
compare :: D -> D -> Ordering
$ccompare :: D -> D -> Ordering
$cp1Ord :: Eq D
Ord)
newtype E = E Int deriving (E -> E -> Bool
(E -> E -> Bool) -> (E -> E -> Bool) -> Eq E
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: E -> E -> Bool
$c/= :: E -> E -> Bool
== :: E -> E -> Bool
$c== :: E -> E -> Bool
Eq, Eq E
Eq E
-> (E -> E -> Ordering)
-> (E -> E -> Bool)
-> (E -> E -> Bool)
-> (E -> E -> Bool)
-> (E -> E -> Bool)
-> (E -> E -> E)
-> (E -> E -> E)
-> Ord E
E -> E -> Bool
E -> E -> Ordering
E -> E -> E
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: E -> E -> E
$cmin :: E -> E -> E
max :: E -> E -> E
$cmax :: E -> E -> E
>= :: E -> E -> Bool
$c>= :: E -> E -> Bool
> :: E -> E -> Bool
$c> :: E -> E -> Bool
<= :: E -> E -> Bool
$c<= :: E -> E -> Bool
< :: E -> E -> Bool
$c< :: E -> E -> Bool
compare :: E -> E -> Ordering
$ccompare :: E -> E -> Ordering
$cp1Ord :: Eq E
Ord)
newtype F = F Int deriving (F -> F -> Bool
(F -> F -> Bool) -> (F -> F -> Bool) -> Eq F
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: F -> F -> Bool
$c/= :: F -> F -> Bool
== :: F -> F -> Bool
$c== :: F -> F -> Bool
Eq, Eq F
Eq F
-> (F -> F -> Ordering)
-> (F -> F -> Bool)
-> (F -> F -> Bool)
-> (F -> F -> Bool)
-> (F -> F -> Bool)
-> (F -> F -> F)
-> (F -> F -> F)
-> Ord F
F -> F -> Bool
F -> F -> Ordering
F -> F -> F
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: F -> F -> F
$cmin :: F -> F -> F
max :: F -> F -> F
$cmax :: F -> F -> F
>= :: F -> F -> Bool
$c>= :: F -> F -> Bool
> :: F -> F -> Bool
$c> :: F -> F -> Bool
<= :: F -> F -> Bool
$c<= :: F -> F -> Bool
< :: F -> F -> Bool
$c< :: F -> F -> Bool
compare :: F -> F -> Ordering
$ccompare :: F -> F -> Ordering
$cp1Ord :: Eq F
Ord)
unA :: A -> Int; unA :: A -> Int
unA (A Int
n) = Int
n
unB :: B -> Int; unB :: B -> Int
unB (B Int
n) = Int
n
unC :: C -> Int; unC :: C -> Int
unC (C Int
n) = Int
n
unD :: D -> Int; unD :: D -> Int
unD (D Int
n) = Int
n
unE :: E -> Int; unE :: E -> Int
unE (E Int
n) = Int
n
unF :: F -> Int; unF :: F -> Int
unF (F Int
n) = Int
n
negativeToZero :: (Ord a, Num a) => a -> a
negativeToZero :: a -> a
negativeToZero a
x | a
x a -> a -> Bool
forall a. Ord a => a -> a -> Bool
< a
0 = a
0
| Bool
otherwise = a
x
int1 :: Int -> Int1; int1 :: Int -> Int1
int1 = Int -> Int1
Int1 (Int -> Int1) -> (Int -> Int) -> Int -> Int1
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Int
narrowS Int
1
int2 :: Int -> Int2; int2 :: Int -> Int2
int2 = Int -> Int2
Int2 (Int -> Int2) -> (Int -> Int) -> Int -> Int2
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Int
narrowS Int
2
int3 :: Int -> Int3; int3 :: Int -> Int3
int3 = Int -> Int3
Int3 (Int -> Int3) -> (Int -> Int) -> Int -> Int3
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Int
narrowS Int
3
int4 :: Int -> Int4; int4 :: Int -> Int4
int4 = Int -> Int4
Int4 (Int -> Int4) -> (Int -> Int) -> Int -> Int4
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Int
narrowS Int
4
word1 :: Int -> Word1; word1 :: Int -> Word1
word1 = Int -> Word1
Word1 (Int -> Word1) -> (Int -> Int) -> Int -> Word1
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Int
narrowU Int
1
word2 :: Int -> Word2; word2 :: Int -> Word2
word2 = Int -> Word2
Word2 (Int -> Word2) -> (Int -> Int) -> Int -> Word2
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Int
narrowU Int
2
word3 :: Int -> Word3; word3 :: Int -> Word3
word3 = Int -> Word3
Word3 (Int -> Word3) -> (Int -> Int) -> Int -> Word3
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Int
narrowU Int
3
word4 :: Int -> Word4; word4 :: Int -> Word4
word4 = Int -> Word4
Word4 (Int -> Word4) -> (Int -> Int) -> Int -> Word4
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Int
narrowU Int
4
nat1 :: Int -> Nat1; nat1 :: Int -> Nat1
nat1 = Int -> Nat1
Nat1 (Int -> Nat1) -> (Int -> Int) -> Int -> Nat1
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
1)
nat2 :: Int -> Nat2; nat2 :: Int -> Nat2
nat2 = Int -> Nat2
Nat2 (Int -> Nat2) -> (Int -> Int) -> Int -> Nat2
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
2)
nat3 :: Int -> Nat3; nat3 :: Int -> Nat3
nat3 = Int -> Nat3
Nat3 (Int -> Nat3) -> (Int -> Int) -> Int -> Nat3
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
3)
nat4 :: Int -> Nat4; nat4 :: Int -> Nat4
nat4 = Int -> Nat4
Nat4 (Int -> Nat4) -> (Int -> Int) -> Int -> Nat4
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
4)
nat5 :: Int -> Nat5; nat5 :: Int -> Nat5
nat5 = Int -> Nat5
Nat5 (Int -> Nat5) -> (Int -> Int) -> Int -> Nat5
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
5)
nat6 :: Int -> Nat6; nat6 :: Int -> Nat6
nat6 = Int -> Nat6
Nat6 (Int -> Nat6) -> (Int -> Int) -> Int -> Nat6
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
6)
nat7 :: Int -> Nat7; nat7 :: Int -> Nat7
nat7 = Int -> Nat7
Nat7 (Int -> Nat7) -> (Int -> Int) -> Int -> Nat7
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
7)
nat :: Int -> Nat; nat :: Int -> Nat
nat = Int -> Nat
Nat (Int -> Nat) -> (Int -> Int) -> Int -> Nat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int
forall a. (Ord a, Num a) => a -> a
negativeToZero
natural :: Integer -> Natural; natural :: Integer -> Natural
natural = Integer -> Natural
Natural (Integer -> Natural) -> (Integer -> Integer) -> Integer -> Natural
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Integer
forall a. (Ord a, Num a) => a -> a
negativeToZero
mkA :: Int -> A; mkA :: Int -> A
mkA = Int -> A
A (Int -> A) -> (Int -> Int) -> Int -> A
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
6)
mkB :: Int -> B; mkB :: Int -> B
mkB = Int -> B
B (Int -> B) -> (Int -> Int) -> Int -> B
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
6)
mkC :: Int -> C; mkC :: Int -> C
mkC = Int -> C
C (Int -> C) -> (Int -> Int) -> Int -> C
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
6)
mkD :: Int -> D; mkD :: Int -> D
mkD = Int -> D
D (Int -> D) -> (Int -> Int) -> Int -> D
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
6)
mkE :: Int -> E; mkE :: Int -> E
mkE = Int -> E
E (Int -> E) -> (Int -> Int) -> Int -> E
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
6)
mkF :: Int -> F; mkF :: Int -> F
mkF = Int -> F
F (Int -> F) -> (Int -> Int) -> Int -> F
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Int -> Int -> Int
forall a. Integral a => a -> a -> a
`mod` Int
6)
type ONewtype a = (Int -> Int -> Int) -> (a -> a -> a)
oInt1 :: ONewtype Int1; oInt1 :: ONewtype Int1
oInt1 = (Int -> Int1) -> (Int1 -> Int) -> ONewtype Int1
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Int1
int1 Int1 -> Int
unInt1
oInt2 :: ONewtype Int2; oInt2 :: ONewtype Int2
oInt2 = (Int -> Int2) -> (Int2 -> Int) -> ONewtype Int2
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Int2
int2 Int2 -> Int
unInt2
oInt3 :: ONewtype Int3; oInt3 :: ONewtype Int3
oInt3 = (Int -> Int3) -> (Int3 -> Int) -> ONewtype Int3
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Int3
int3 Int3 -> Int
unInt3
oInt4 :: ONewtype Int4; oInt4 :: ONewtype Int4
oInt4 = (Int -> Int4) -> (Int4 -> Int) -> ONewtype Int4
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Int4
int4 Int4 -> Int
unInt4
oWord1 :: ONewtype Word1; oWord1 :: ONewtype Word1
oWord1 = (Int -> Word1) -> (Word1 -> Int) -> ONewtype Word1
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Word1
word1 Word1 -> Int
unWord1
oWord2 :: ONewtype Word2; oWord2 :: ONewtype Word2
oWord2 = (Int -> Word2) -> (Word2 -> Int) -> ONewtype Word2
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Word2
word2 Word2 -> Int
unWord2
oWord3 :: ONewtype Word3; oWord3 :: ONewtype Word3
oWord3 = (Int -> Word3) -> (Word3 -> Int) -> ONewtype Word3
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Word3
word3 Word3 -> Int
unWord3
oWord4 :: ONewtype Word4; oWord4 :: ONewtype Word4
oWord4 = (Int -> Word4) -> (Word4 -> Int) -> ONewtype Word4
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Word4
word4 Word4 -> Int
unWord4
oNat :: ONewtype Nat; oNat :: ONewtype Nat
oNat = (Int -> Nat) -> (Nat -> Int) -> ONewtype Nat
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Nat
nat Nat -> Int
unNat
oNat1 :: ONewtype Nat1; oNat1 :: ONewtype Nat1
oNat1 = (Int -> Nat1) -> (Nat1 -> Int) -> ONewtype Nat1
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Nat1
nat1 Nat1 -> Int
unNat1
oNat2 :: ONewtype Nat2; oNat2 :: ONewtype Nat2
oNat2 = (Int -> Nat2) -> (Nat2 -> Int) -> ONewtype Nat2
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Nat2
nat2 Nat2 -> Int
unNat2
oNat3 :: ONewtype Nat3; oNat3 :: ONewtype Nat3
oNat3 = (Int -> Nat3) -> (Nat3 -> Int) -> ONewtype Nat3
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Nat3
nat3 Nat3 -> Int
unNat3
oNat4 :: ONewtype Nat4; oNat4 :: ONewtype Nat4
oNat4 = (Int -> Nat4) -> (Nat4 -> Int) -> ONewtype Nat4
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Nat4
nat4 Nat4 -> Int
unNat4
oNat5 :: ONewtype Nat5; oNat5 :: ONewtype Nat5
oNat5 = (Int -> Nat5) -> (Nat5 -> Int) -> ONewtype Nat5
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Nat5
nat5 Nat5 -> Int
unNat5
oNat6 :: ONewtype Nat6; oNat6 :: ONewtype Nat6
oNat6 = (Int -> Nat6) -> (Nat6 -> Int) -> ONewtype Nat6
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Nat6
nat6 Nat6 -> Int
unNat6
oNat7 :: ONewtype Nat7; oNat7 :: ONewtype Nat7
oNat7 = (Int -> Nat7) -> (Nat7 -> Int) -> ONewtype Nat7
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> Nat7
nat7 Nat7 -> Int
unNat7
oNatural :: (Integer -> Integer -> Integer) -> (Natural -> Natural -> Natural)
oNatural :: (Integer -> Integer -> Integer) -> Natural -> Natural -> Natural
oNatural = (Integer -> Natural)
-> (Natural -> Integer)
-> (Integer -> Integer -> Integer)
-> Natural
-> Natural
-> Natural
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Integer -> Natural
natural Natural -> Integer
unNatural
oA :: ONewtype A; oA :: ONewtype A
oA = (Int -> A) -> (A -> Int) -> ONewtype A
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> A
mkA A -> Int
unA
oB :: ONewtype B; oB :: ONewtype B
oB = (Int -> B) -> (B -> Int) -> ONewtype B
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> B
mkB B -> Int
unB
oC :: ONewtype C; oC :: ONewtype C
oC = (Int -> C) -> (C -> Int) -> ONewtype C
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> C
mkC C -> Int
unC
oD :: ONewtype D; oD :: ONewtype D
oD = (Int -> D) -> (D -> Int) -> ONewtype D
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> D
mkD D -> Int
unD
oE :: ONewtype E; oE :: ONewtype E
oE = (Int -> E) -> (E -> Int) -> ONewtype E
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> E
mkE E -> Int
unE
oF :: ONewtype F; oF :: ONewtype F
oF = (Int -> F) -> (F -> Int) -> ONewtype F
forall a b. (a -> b) -> (b -> a) -> (a -> a -> a) -> b -> b -> b
oNewtype Int -> F
mkF F -> Int
unF
fInt1 :: (Int->Int) -> (Int1->Int1) ; fInt1 :: (Int -> Int) -> Int1 -> Int1
fInt1 = (Int -> Int1) -> (Int1 -> Int) -> (Int -> Int) -> Int1 -> Int1
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Int1
int1 Int1 -> Int
unInt1
fInt2 :: (Int->Int) -> (Int2->Int2) ; fInt2 :: (Int -> Int) -> Int2 -> Int2
fInt2 = (Int -> Int2) -> (Int2 -> Int) -> (Int -> Int) -> Int2 -> Int2
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Int2
int2 Int2 -> Int
unInt2
fInt3 :: (Int->Int) -> (Int3->Int3) ; fInt3 :: (Int -> Int) -> Int3 -> Int3
fInt3 = (Int -> Int3) -> (Int3 -> Int) -> (Int -> Int) -> Int3 -> Int3
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Int3
int3 Int3 -> Int
unInt3
fInt4 :: (Int->Int) -> (Int4->Int4) ; fInt4 :: (Int -> Int) -> Int4 -> Int4
fInt4 = (Int -> Int4) -> (Int4 -> Int) -> (Int -> Int) -> Int4 -> Int4
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Int4
int4 Int4 -> Int
unInt4
fWord1 :: (Int->Int) -> (Word1->Word1); fWord1 :: (Int -> Int) -> Word1 -> Word1
fWord1 = (Int -> Word1) -> (Word1 -> Int) -> (Int -> Int) -> Word1 -> Word1
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Word1
word1 Word1 -> Int
unWord1
fWord2 :: (Int->Int) -> (Word2->Word2); fWord2 :: (Int -> Int) -> Word2 -> Word2
fWord2 = (Int -> Word2) -> (Word2 -> Int) -> (Int -> Int) -> Word2 -> Word2
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Word2
word2 Word2 -> Int
unWord2
fWord3 :: (Int->Int) -> (Word3->Word3); fWord3 :: (Int -> Int) -> Word3 -> Word3
fWord3 = (Int -> Word3) -> (Word3 -> Int) -> (Int -> Int) -> Word3 -> Word3
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Word3
word3 Word3 -> Int
unWord3
fWord4 :: (Int->Int) -> (Word4->Word4); fWord4 :: (Int -> Int) -> Word4 -> Word4
fWord4 = (Int -> Word4) -> (Word4 -> Int) -> (Int -> Int) -> Word4 -> Word4
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Word4
word4 Word4 -> Int
unWord4
fNat :: (Int->Int) -> (Nat->Nat) ; fNat :: (Int -> Int) -> Nat -> Nat
fNat = (Int -> Nat) -> (Nat -> Int) -> (Int -> Int) -> Nat -> Nat
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Nat
Nat Nat -> Int
unNat
fNat1 :: (Int->Int) -> (Nat1->Nat1) ; fNat1 :: (Int -> Int) -> Nat1 -> Nat1
fNat1 = (Int -> Nat1) -> (Nat1 -> Int) -> (Int -> Int) -> Nat1 -> Nat1
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Nat1
nat1 Nat1 -> Int
unNat1
fNat2 :: (Int->Int) -> (Nat2->Nat2) ; fNat2 :: (Int -> Int) -> Nat2 -> Nat2
fNat2 = (Int -> Nat2) -> (Nat2 -> Int) -> (Int -> Int) -> Nat2 -> Nat2
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Nat2
nat2 Nat2 -> Int
unNat2
fNat3 :: (Int->Int) -> (Nat3->Nat3) ; fNat3 :: (Int -> Int) -> Nat3 -> Nat3
fNat3 = (Int -> Nat3) -> (Nat3 -> Int) -> (Int -> Int) -> Nat3 -> Nat3
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Nat3
nat3 Nat3 -> Int
unNat3
fNat4 :: (Int->Int) -> (Nat4->Nat4) ; fNat4 :: (Int -> Int) -> Nat4 -> Nat4
fNat4 = (Int -> Nat4) -> (Nat4 -> Int) -> (Int -> Int) -> Nat4 -> Nat4
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Nat4
nat4 Nat4 -> Int
unNat4
fNat5 :: (Int->Int) -> (Nat5->Nat5) ; fNat5 :: (Int -> Int) -> Nat5 -> Nat5
fNat5 = (Int -> Nat5) -> (Nat5 -> Int) -> (Int -> Int) -> Nat5 -> Nat5
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Nat5
nat5 Nat5 -> Int
unNat5
fNat6 :: (Int->Int) -> (Nat6->Nat6) ; fNat6 :: (Int -> Int) -> Nat6 -> Nat6
fNat6 = (Int -> Nat6) -> (Nat6 -> Int) -> (Int -> Int) -> Nat6 -> Nat6
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Nat6
nat6 Nat6 -> Int
unNat6
fNat7 :: (Int->Int) -> (Nat7->Nat7) ; fNat7 :: (Int -> Int) -> Nat7 -> Nat7
fNat7 = (Int -> Nat7) -> (Nat7 -> Int) -> (Int -> Int) -> Nat7 -> Nat7
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> Nat7
nat7 Nat7 -> Int
unNat7
fNatural :: (Integer->Integer) -> (Natural->Natural)
fNatural :: (Integer -> Integer) -> Natural -> Natural
fNatural = (Integer -> Natural)
-> (Natural -> Integer)
-> (Integer -> Integer)
-> Natural
-> Natural
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Integer -> Natural
Natural Natural -> Integer
unNatural
fA :: (Int -> Int) -> (A -> A); fA :: (Int -> Int) -> A -> A
fA = (Int -> A) -> (A -> Int) -> (Int -> Int) -> A -> A
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> A
mkA A -> Int
unA
fB :: (Int -> Int) -> (B -> B); fB :: (Int -> Int) -> B -> B
fB = (Int -> B) -> (B -> Int) -> (Int -> Int) -> B -> B
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> B
mkB B -> Int
unB
fC :: (Int -> Int) -> (C -> C); fC :: (Int -> Int) -> C -> C
fC = (Int -> C) -> (C -> Int) -> (Int -> Int) -> C -> C
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> C
mkC C -> Int
unC
fD :: (Int -> Int) -> (D -> D); fD :: (Int -> Int) -> D -> D
fD = (Int -> D) -> (D -> Int) -> (Int -> Int) -> D -> D
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> D
mkD D -> Int
unD
fE :: (Int -> Int) -> (E -> E); fE :: (Int -> Int) -> E -> E
fE = (Int -> E) -> (E -> Int) -> (Int -> Int) -> E -> E
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> E
mkE E -> Int
unE
fF :: (Int -> Int) -> (F -> F); fF :: (Int -> Int) -> F -> F
fF = (Int -> F) -> (F -> Int) -> (Int -> Int) -> F -> F
forall a b. (a -> b) -> (b -> a) -> (a -> a) -> b -> b
fNewtype Int -> F
mkF F -> Int
unF
instance Show Int1 where show :: Int1 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Int1 -> Int) -> Int1 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int1 -> Int
unInt1
instance Show Int2 where show :: Int2 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Int2 -> Int) -> Int2 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int2 -> Int
unInt2
instance Show Int3 where show :: Int3 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Int3 -> Int) -> Int3 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int3 -> Int
unInt3
instance Show Int4 where show :: Int4 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Int4 -> Int) -> Int4 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int4 -> Int
unInt4
instance Show Word1 where show :: Word1 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Word1 -> Int) -> Word1 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word1 -> Int
unWord1
instance Show Word2 where show :: Word2 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Word2 -> Int) -> Word2 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word2 -> Int
unWord2
instance Show Word3 where show :: Word3 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Word3 -> Int) -> Word3 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word3 -> Int
unWord3
instance Show Word4 where show :: Word4 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Word4 -> Int) -> Word4 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word4 -> Int
unWord4
instance Show Nat where show :: Nat -> String
show (Nat Int
x) = Int -> String
forall a. Show a => a -> String
show Int
x
instance Show Nat1 where show :: Nat1 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Nat1 -> Int) -> Nat1 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat1 -> Int
unNat1
instance Show Nat2 where show :: Nat2 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Nat2 -> Int) -> Nat2 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat2 -> Int
unNat2
instance Show Nat3 where show :: Nat3 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Nat3 -> Int) -> Nat3 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat3 -> Int
unNat3
instance Show Nat4 where show :: Nat4 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Nat4 -> Int) -> Nat4 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat4 -> Int
unNat4
instance Show Nat5 where show :: Nat5 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Nat5 -> Int) -> Nat5 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat5 -> Int
unNat5
instance Show Nat6 where show :: Nat6 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Nat6 -> Int) -> Nat6 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat6 -> Int
unNat6
instance Show Nat7 where show :: Nat7 -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (Nat7 -> Int) -> Nat7 -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat7 -> Int
unNat7
instance Show Natural where show :: Natural -> String
show (Natural Integer
x) = Integer -> String
forall a. Show a => a -> String
show Integer
x
instance Show A where show :: A -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (A -> Int) -> A -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. A -> Int
unA
instance Show B where show :: B -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (B -> Int) -> B -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. B -> Int
unB
instance Show C where show :: C -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (C -> Int) -> C -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. C -> Int
unC
instance Show D where show :: D -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (D -> Int) -> D -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. D -> Int
unD
instance Show E where show :: E -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (E -> Int) -> E -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. E -> Int
unE
instance Show F where show :: F -> String
show = Int -> String
forall a. Show a => a -> String
show (Int -> String) -> (F -> Int) -> F -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. F -> Int
unF
instance Read Int1 where readsPrec :: Int -> ReadS Int1
readsPrec = (Int -> Int1) -> Int -> ReadS Int1
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Int1
int1
instance Read Int2 where readsPrec :: Int -> ReadS Int2
readsPrec = (Int -> Int2) -> Int -> ReadS Int2
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Int2
int2
instance Read Int3 where readsPrec :: Int -> ReadS Int3
readsPrec = (Int -> Int3) -> Int -> ReadS Int3
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Int3
int3
instance Read Int4 where readsPrec :: Int -> ReadS Int4
readsPrec = (Int -> Int4) -> Int -> ReadS Int4
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Int4
int4
instance Read Word1 where readsPrec :: Int -> ReadS Word1
readsPrec = (Int -> Word1) -> Int -> ReadS Word1
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Word1
word1
instance Read Word2 where readsPrec :: Int -> ReadS Word2
readsPrec = (Int -> Word2) -> Int -> ReadS Word2
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Word2
word2
instance Read Word3 where readsPrec :: Int -> ReadS Word3
readsPrec = (Int -> Word3) -> Int -> ReadS Word3
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Word3
word3
instance Read Word4 where readsPrec :: Int -> ReadS Word4
readsPrec = (Int -> Word4) -> Int -> ReadS Word4
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Word4
word4
instance Read Nat where readsPrec :: Int -> ReadS Nat
readsPrec = (Int -> Nat) -> Int -> ReadS Nat
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Nat
nat
instance Read Nat1 where readsPrec :: Int -> ReadS Nat1
readsPrec = (Int -> Nat1) -> Int -> ReadS Nat1
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Nat1
nat1
instance Read Nat2 where readsPrec :: Int -> ReadS Nat2
readsPrec = (Int -> Nat2) -> Int -> ReadS Nat2
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Nat2
nat2
instance Read Nat3 where readsPrec :: Int -> ReadS Nat3
readsPrec = (Int -> Nat3) -> Int -> ReadS Nat3
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Nat3
nat3
instance Read Nat4 where readsPrec :: Int -> ReadS Nat4
readsPrec = (Int -> Nat4) -> Int -> ReadS Nat4
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Nat4
nat4
instance Read Nat5 where readsPrec :: Int -> ReadS Nat5
readsPrec = (Int -> Nat5) -> Int -> ReadS Nat5
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Nat5
nat5
instance Read Nat6 where readsPrec :: Int -> ReadS Nat6
readsPrec = (Int -> Nat6) -> Int -> ReadS Nat6
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Nat6
nat6
instance Read Nat7 where readsPrec :: Int -> ReadS Nat7
readsPrec = (Int -> Nat7) -> Int -> ReadS Nat7
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> Nat7
nat7
instance Read Natural where readsPrec :: Int -> ReadS Natural
readsPrec = (Integer -> Natural) -> Int -> ReadS Natural
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Integer -> Natural
natural
instance Read A where readsPrec :: Int -> ReadS A
readsPrec = (Int -> A) -> Int -> ReadS A
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> A
mkA
instance Read B where readsPrec :: Int -> ReadS B
readsPrec = (Int -> B) -> Int -> ReadS B
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> B
mkB
instance Read C where readsPrec :: Int -> ReadS C
readsPrec = (Int -> C) -> Int -> ReadS C
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> C
mkC
instance Read D where readsPrec :: Int -> ReadS D
readsPrec = (Int -> D) -> Int -> ReadS D
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> D
mkD
instance Read E where readsPrec :: Int -> ReadS E
readsPrec = (Int -> E) -> Int -> ReadS E
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> E
mkE
instance Read F where readsPrec :: Int -> ReadS F
readsPrec = (Int -> F) -> Int -> ReadS F
forall a b. Read a => (a -> b) -> Int -> String -> [(b, String)]
readsPrecNewtype Int -> F
mkF
instance Num Int1 where
+ :: Int1 -> Int1 -> Int1
(+) = ONewtype Int1
oInt1 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Int1 -> Int1
abs = (Int -> Int) -> Int1 -> Int1
fInt1 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Int1
oInt1 (-); signum :: Int1 -> Int1
signum = (Int -> Int) -> Int1 -> Int1
fInt1 Int -> Int
forall a. Num a => a -> a
signum
* :: Int1 -> Int1 -> Int1
(*) = ONewtype Int1
oInt1 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Int1
fromInteger = Int -> Int1
int1 (Int -> Int1) -> (Integer -> Int) -> Integer -> Int1
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Int2 where
+ :: Int2 -> Int2 -> Int2
(+) = ONewtype Int2
oInt2 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Int2 -> Int2
abs = (Int -> Int) -> Int2 -> Int2
fInt2 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Int2
oInt2 (-); signum :: Int2 -> Int2
signum = (Int -> Int) -> Int2 -> Int2
fInt2 Int -> Int
forall a. Num a => a -> a
signum
* :: Int2 -> Int2 -> Int2
(*) = ONewtype Int2
oInt2 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Int2
fromInteger = Int -> Int2
int2 (Int -> Int2) -> (Integer -> Int) -> Integer -> Int2
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Int3 where
+ :: Int3 -> Int3 -> Int3
(+) = ONewtype Int3
oInt3 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Int3 -> Int3
abs = (Int -> Int) -> Int3 -> Int3
fInt3 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Int3
oInt3 (-); signum :: Int3 -> Int3
signum = (Int -> Int) -> Int3 -> Int3
fInt3 Int -> Int
forall a. Num a => a -> a
signum
* :: Int3 -> Int3 -> Int3
(*) = ONewtype Int3
oInt3 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Int3
fromInteger = Int -> Int3
int3 (Int -> Int3) -> (Integer -> Int) -> Integer -> Int3
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Int4 where
+ :: Int4 -> Int4 -> Int4
(+) = ONewtype Int4
oInt4 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Int4 -> Int4
abs = (Int -> Int) -> Int4 -> Int4
fInt4 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Int4
oInt4 (-); signum :: Int4 -> Int4
signum = (Int -> Int) -> Int4 -> Int4
fInt4 Int -> Int
forall a. Num a => a -> a
signum
* :: Int4 -> Int4 -> Int4
(*) = ONewtype Int4
oInt4 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Int4
fromInteger = Int -> Int4
int4 (Int -> Int4) -> (Integer -> Int) -> Integer -> Int4
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Word1 where
+ :: Word1 -> Word1 -> Word1
(+) = ONewtype Word1
oWord1 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Word1 -> Word1
abs = (Int -> Int) -> Word1 -> Word1
fWord1 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Word1
oWord1 (-); signum :: Word1 -> Word1
signum = (Int -> Int) -> Word1 -> Word1
fWord1 Int -> Int
forall a. Num a => a -> a
signum
* :: Word1 -> Word1 -> Word1
(*) = ONewtype Word1
oWord1 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Word1
fromInteger = Int -> Word1
word1 (Int -> Word1) -> (Integer -> Int) -> Integer -> Word1
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Word2 where
+ :: Word2 -> Word2 -> Word2
(+) = ONewtype Word2
oWord2 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Word2 -> Word2
abs = (Int -> Int) -> Word2 -> Word2
fWord2 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Word2
oWord2 (-); signum :: Word2 -> Word2
signum = (Int -> Int) -> Word2 -> Word2
fWord2 Int -> Int
forall a. Num a => a -> a
signum
* :: Word2 -> Word2 -> Word2
(*) = ONewtype Word2
oWord2 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Word2
fromInteger = Int -> Word2
word2 (Int -> Word2) -> (Integer -> Int) -> Integer -> Word2
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Word3 where
+ :: Word3 -> Word3 -> Word3
(+) = ONewtype Word3
oWord3 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Word3 -> Word3
abs = (Int -> Int) -> Word3 -> Word3
fWord3 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Word3
oWord3 (-); signum :: Word3 -> Word3
signum = (Int -> Int) -> Word3 -> Word3
fWord3 Int -> Int
forall a. Num a => a -> a
signum
* :: Word3 -> Word3 -> Word3
(*) = ONewtype Word3
oWord3 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Word3
fromInteger = Int -> Word3
word3 (Int -> Word3) -> (Integer -> Int) -> Integer -> Word3
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Word4 where
+ :: Word4 -> Word4 -> Word4
(+) = ONewtype Word4
oWord4 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Word4 -> Word4
abs = (Int -> Int) -> Word4 -> Word4
fWord4 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Word4
oWord4 (-); signum :: Word4 -> Word4
signum = (Int -> Int) -> Word4 -> Word4
fWord4 Int -> Int
forall a. Num a => a -> a
signum
* :: Word4 -> Word4 -> Word4
(*) = ONewtype Word4
oWord4 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Word4
fromInteger = Int -> Word4
word4 (Int -> Word4) -> (Integer -> Int) -> Integer -> Word4
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Nat where
+ :: Nat -> Nat -> Nat
(+) = ONewtype Nat
oNat Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Nat -> Nat
abs = (Int -> Int) -> Nat -> Nat
fNat Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Nat
oNat (-); signum :: Nat -> Nat
signum = (Int -> Int) -> Nat -> Nat
fNat Int -> Int
forall a. Num a => a -> a
signum
* :: Nat -> Nat -> Nat
(*) = ONewtype Nat
oNat Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Nat
fromInteger = Int -> Nat
nat (Int -> Nat) -> (Integer -> Int) -> Integer -> Nat
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Nat1 where
+ :: Nat1 -> Nat1 -> Nat1
(+) = ONewtype Nat1
oNat1 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Nat1 -> Nat1
abs = (Int -> Int) -> Nat1 -> Nat1
fNat1 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Nat1
oNat1 (-); signum :: Nat1 -> Nat1
signum = (Int -> Int) -> Nat1 -> Nat1
fNat1 Int -> Int
forall a. Num a => a -> a
signum
* :: Nat1 -> Nat1 -> Nat1
(*) = ONewtype Nat1
oNat1 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Nat1
fromInteger = Int -> Nat1
nat1 (Int -> Nat1) -> (Integer -> Int) -> Integer -> Nat1
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Nat2 where
+ :: Nat2 -> Nat2 -> Nat2
(+) = ONewtype Nat2
oNat2 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Nat2 -> Nat2
abs = (Int -> Int) -> Nat2 -> Nat2
fNat2 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Nat2
oNat2 (-); signum :: Nat2 -> Nat2
signum = (Int -> Int) -> Nat2 -> Nat2
fNat2 Int -> Int
forall a. Num a => a -> a
signum
* :: Nat2 -> Nat2 -> Nat2
(*) = ONewtype Nat2
oNat2 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Nat2
fromInteger = Int -> Nat2
nat2 (Int -> Nat2) -> (Integer -> Int) -> Integer -> Nat2
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Nat3 where
+ :: Nat3 -> Nat3 -> Nat3
(+) = ONewtype Nat3
oNat3 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Nat3 -> Nat3
abs = (Int -> Int) -> Nat3 -> Nat3
fNat3 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Nat3
oNat3 (-); signum :: Nat3 -> Nat3
signum = (Int -> Int) -> Nat3 -> Nat3
fNat3 Int -> Int
forall a. Num a => a -> a
signum
* :: Nat3 -> Nat3 -> Nat3
(*) = ONewtype Nat3
oNat3 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Nat3
fromInteger = Int -> Nat3
nat3 (Int -> Nat3) -> (Integer -> Int) -> Integer -> Nat3
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Nat4 where
+ :: Nat4 -> Nat4 -> Nat4
(+) = ONewtype Nat4
oNat4 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Nat4 -> Nat4
abs = (Int -> Int) -> Nat4 -> Nat4
fNat4 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Nat4
oNat4 (-); signum :: Nat4 -> Nat4
signum = (Int -> Int) -> Nat4 -> Nat4
fNat4 Int -> Int
forall a. Num a => a -> a
signum
* :: Nat4 -> Nat4 -> Nat4
(*) = ONewtype Nat4
oNat4 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Nat4
fromInteger = Int -> Nat4
nat4 (Int -> Nat4) -> (Integer -> Int) -> Integer -> Nat4
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Nat5 where
+ :: Nat5 -> Nat5 -> Nat5
(+) = ONewtype Nat5
oNat5 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Nat5 -> Nat5
abs = (Int -> Int) -> Nat5 -> Nat5
fNat5 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Nat5
oNat5 (-); signum :: Nat5 -> Nat5
signum = (Int -> Int) -> Nat5 -> Nat5
fNat5 Int -> Int
forall a. Num a => a -> a
signum
* :: Nat5 -> Nat5 -> Nat5
(*) = ONewtype Nat5
oNat5 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Nat5
fromInteger = Int -> Nat5
nat5 (Int -> Nat5) -> (Integer -> Int) -> Integer -> Nat5
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Nat6 where
+ :: Nat6 -> Nat6 -> Nat6
(+) = ONewtype Nat6
oNat6 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Nat6 -> Nat6
abs = (Int -> Int) -> Nat6 -> Nat6
fNat6 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Nat6
oNat6 (-); signum :: Nat6 -> Nat6
signum = (Int -> Int) -> Nat6 -> Nat6
fNat6 Int -> Int
forall a. Num a => a -> a
signum
* :: Nat6 -> Nat6 -> Nat6
(*) = ONewtype Nat6
oNat6 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Nat6
fromInteger = Int -> Nat6
nat6 (Int -> Nat6) -> (Integer -> Int) -> Integer -> Nat6
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Nat7 where
+ :: Nat7 -> Nat7 -> Nat7
(+) = ONewtype Nat7
oNat7 Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: Nat7 -> Nat7
abs = (Int -> Int) -> Nat7 -> Nat7
fNat7 Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype Nat7
oNat7 (-); signum :: Nat7 -> Nat7
signum = (Int -> Int) -> Nat7 -> Nat7
fNat7 Int -> Int
forall a. Num a => a -> a
signum
* :: Nat7 -> Nat7 -> Nat7
(*) = ONewtype Nat7
oNat7 Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Nat7
fromInteger = Int -> Nat7
nat7 (Int -> Nat7) -> (Integer -> Int) -> Integer -> Nat7
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num Natural where
+ :: Natural -> Natural -> Natural
(+) = (Integer -> Integer -> Integer) -> Natural -> Natural -> Natural
oNatural Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
(+); abs :: Natural -> Natural
abs = (Integer -> Integer) -> Natural -> Natural
fNatural Integer -> Integer
forall a. Num a => a -> a
abs
(-) = (Integer -> Integer -> Integer) -> Natural -> Natural -> Natural
oNatural (-); signum :: Natural -> Natural
signum = (Integer -> Integer) -> Natural -> Natural
fNatural Integer -> Integer
forall a. Num a => a -> a
signum
* :: Natural -> Natural -> Natural
(*) = (Integer -> Integer -> Integer) -> Natural -> Natural -> Natural
oNatural Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> Natural
fromInteger = Integer -> Natural
natural (Integer -> Natural) -> (Integer -> Integer) -> Integer -> Natural
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Integer
forall a. Num a => Integer -> a
fromInteger
instance Num A where
+ :: A -> A -> A
(+) = ONewtype A
oA Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: A -> A
abs = (Int -> Int) -> A -> A
fA Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype A
oA (-); signum :: A -> A
signum = (Int -> Int) -> A -> A
fA Int -> Int
forall a. Num a => a -> a
signum
* :: A -> A -> A
(*) = ONewtype A
oA Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> A
fromInteger = Int -> A
mkA (Int -> A) -> (Integer -> Int) -> Integer -> A
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num B where
+ :: B -> B -> B
(+) = ONewtype B
oB Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: B -> B
abs = (Int -> Int) -> B -> B
fB Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype B
oB (-); signum :: B -> B
signum = (Int -> Int) -> B -> B
fB Int -> Int
forall a. Num a => a -> a
signum
* :: B -> B -> B
(*) = ONewtype B
oB Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> B
fromInteger = Int -> B
mkB (Int -> B) -> (Integer -> Int) -> Integer -> B
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num C where
+ :: C -> C -> C
(+) = ONewtype C
oC Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: C -> C
abs = (Int -> Int) -> C -> C
fC Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype C
oC (-); signum :: C -> C
signum = (Int -> Int) -> C -> C
fC Int -> Int
forall a. Num a => a -> a
signum
* :: C -> C -> C
(*) = ONewtype C
oC Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> C
fromInteger = Int -> C
mkC (Int -> C) -> (Integer -> Int) -> Integer -> C
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num D where
+ :: D -> D -> D
(+) = ONewtype D
oD Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: D -> D
abs = (Int -> Int) -> D -> D
fD Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype D
oD (-); signum :: D -> D
signum = (Int -> Int) -> D -> D
fD Int -> Int
forall a. Num a => a -> a
signum
* :: D -> D -> D
(*) = ONewtype D
oD Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> D
fromInteger = Int -> D
mkD (Int -> D) -> (Integer -> Int) -> Integer -> D
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num E where
+ :: E -> E -> E
(+) = ONewtype E
oE Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: E -> E
abs = (Int -> Int) -> E -> E
fE Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype E
oE (-); signum :: E -> E
signum = (Int -> Int) -> E -> E
fE Int -> Int
forall a. Num a => a -> a
signum
* :: E -> E -> E
(*) = ONewtype E
oE Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> E
fromInteger = Int -> E
mkE (Int -> E) -> (Integer -> Int) -> Integer -> E
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Num F where
+ :: F -> F -> F
(+) = ONewtype F
oF Int -> Int -> Int
forall a. Num a => a -> a -> a
(+); abs :: F -> F
abs = (Int -> Int) -> F -> F
fF Int -> Int
forall a. Num a => a -> a
abs
(-) = ONewtype F
oF (-); signum :: F -> F
signum = (Int -> Int) -> F -> F
fF Int -> Int
forall a. Num a => a -> a
signum
* :: F -> F -> F
(*) = ONewtype F
oF Int -> Int -> Int
forall a. Num a => a -> a -> a
(*); fromInteger :: Integer -> F
fromInteger = Int -> F
mkF (Int -> F) -> (Integer -> Int) -> Integer -> F
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Int
forall a. Num a => Integer -> a
fromInteger
instance Real Int1 where toRational :: Int1 -> Rational
toRational (Int1 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Int2 where toRational :: Int2 -> Rational
toRational (Int2 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Int3 where toRational :: Int3 -> Rational
toRational (Int3 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Int4 where toRational :: Int4 -> Rational
toRational (Int4 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Word1 where toRational :: Word1 -> Rational
toRational (Word1 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Word2 where toRational :: Word2 -> Rational
toRational (Word2 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Word3 where toRational :: Word3 -> Rational
toRational (Word3 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Word4 where toRational :: Word4 -> Rational
toRational (Word4 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Nat where toRational :: Nat -> Rational
toRational (Nat Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Nat1 where toRational :: Nat1 -> Rational
toRational (Nat1 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Nat2 where toRational :: Nat2 -> Rational
toRational (Nat2 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Nat3 where toRational :: Nat3 -> Rational
toRational (Nat3 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Nat4 where toRational :: Nat4 -> Rational
toRational (Nat4 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Nat5 where toRational :: Nat5 -> Rational
toRational (Nat5 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Nat6 where toRational :: Nat6 -> Rational
toRational (Nat6 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Nat7 where toRational :: Nat7 -> Rational
toRational (Nat7 Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real Natural where toRational :: Natural -> Rational
toRational (Natural Integer
x) = Integer -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real A where toRational :: A -> Rational
toRational (A Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real B where toRational :: B -> Rational
toRational (B Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real C where toRational :: C -> Rational
toRational (C Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real D where toRational :: D -> Rational
toRational (D Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real E where toRational :: E -> Rational
toRational (E Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Real F where toRational :: F -> Rational
toRational (F Int
x) = Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1
instance Integral Int1 where quotRem :: Int1 -> Int1 -> (Int1, Int1)
quotRem = (Int -> Int1)
-> (Int1 -> Int)
-> (Int -> Int -> (Int, Int))
-> Int1
-> Int1
-> (Int1, Int1)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Int1
int1 Int1 -> Int
unInt1 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Int1 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Int1 -> Int) -> Int1 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int1 -> Int
unInt1
instance Integral Int2 where quotRem :: Int2 -> Int2 -> (Int2, Int2)
quotRem = (Int -> Int2)
-> (Int2 -> Int)
-> (Int -> Int -> (Int, Int))
-> Int2
-> Int2
-> (Int2, Int2)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Int2
int2 Int2 -> Int
unInt2 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Int2 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Int2 -> Int) -> Int2 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int2 -> Int
unInt2
instance Integral Int3 where quotRem :: Int3 -> Int3 -> (Int3, Int3)
quotRem = (Int -> Int3)
-> (Int3 -> Int)
-> (Int -> Int -> (Int, Int))
-> Int3
-> Int3
-> (Int3, Int3)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Int3
int3 Int3 -> Int
unInt3 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Int3 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Int3 -> Int) -> Int3 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int3 -> Int
unInt3
instance Integral Int4 where quotRem :: Int4 -> Int4 -> (Int4, Int4)
quotRem = (Int -> Int4)
-> (Int4 -> Int)
-> (Int -> Int -> (Int, Int))
-> Int4
-> Int4
-> (Int4, Int4)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Int4
int4 Int4 -> Int
unInt4 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Int4 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Int4 -> Int) -> Int4 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int4 -> Int
unInt4
instance Integral Word1 where quotRem :: Word1 -> Word1 -> (Word1, Word1)
quotRem = (Int -> Word1)
-> (Word1 -> Int)
-> (Int -> Int -> (Int, Int))
-> Word1
-> Word1
-> (Word1, Word1)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Word1
word1 Word1 -> Int
unWord1 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Word1 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Word1 -> Int) -> Word1 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word1 -> Int
unWord1
instance Integral Word2 where quotRem :: Word2 -> Word2 -> (Word2, Word2)
quotRem = (Int -> Word2)
-> (Word2 -> Int)
-> (Int -> Int -> (Int, Int))
-> Word2
-> Word2
-> (Word2, Word2)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Word2
word2 Word2 -> Int
unWord2 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Word2 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Word2 -> Int) -> Word2 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word2 -> Int
unWord2
instance Integral Word3 where quotRem :: Word3 -> Word3 -> (Word3, Word3)
quotRem = (Int -> Word3)
-> (Word3 -> Int)
-> (Int -> Int -> (Int, Int))
-> Word3
-> Word3
-> (Word3, Word3)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Word3
word3 Word3 -> Int
unWord3 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Word3 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Word3 -> Int) -> Word3 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word3 -> Int
unWord3
instance Integral Word4 where quotRem :: Word4 -> Word4 -> (Word4, Word4)
quotRem = (Int -> Word4)
-> (Word4 -> Int)
-> (Int -> Int -> (Int, Int))
-> Word4
-> Word4
-> (Word4, Word4)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Word4
word4 Word4 -> Int
unWord4 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Word4 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Word4 -> Int) -> Word4 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Word4 -> Int
unWord4
instance Integral Nat where quotRem :: Nat -> Nat -> (Nat, Nat)
quotRem = (Int -> Nat)
-> (Nat -> Int)
-> (Int -> Int -> (Int, Int))
-> Nat
-> Nat
-> (Nat, Nat)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Nat
Nat Nat -> Int
unNat Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Nat -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Nat -> Int) -> Nat -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat -> Int
unNat
instance Integral Nat1 where quotRem :: Nat1 -> Nat1 -> (Nat1, Nat1)
quotRem = (Int -> Nat1)
-> (Nat1 -> Int)
-> (Int -> Int -> (Int, Int))
-> Nat1
-> Nat1
-> (Nat1, Nat1)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Nat1
nat1 Nat1 -> Int
unNat1 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Nat1 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Nat1 -> Int) -> Nat1 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat1 -> Int
unNat1
instance Integral Nat2 where quotRem :: Nat2 -> Nat2 -> (Nat2, Nat2)
quotRem = (Int -> Nat2)
-> (Nat2 -> Int)
-> (Int -> Int -> (Int, Int))
-> Nat2
-> Nat2
-> (Nat2, Nat2)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Nat2
nat2 Nat2 -> Int
unNat2 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Nat2 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Nat2 -> Int) -> Nat2 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat2 -> Int
unNat2
instance Integral Nat3 where quotRem :: Nat3 -> Nat3 -> (Nat3, Nat3)
quotRem = (Int -> Nat3)
-> (Nat3 -> Int)
-> (Int -> Int -> (Int, Int))
-> Nat3
-> Nat3
-> (Nat3, Nat3)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Nat3
nat3 Nat3 -> Int
unNat3 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Nat3 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Nat3 -> Int) -> Nat3 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat3 -> Int
unNat3
instance Integral Nat4 where quotRem :: Nat4 -> Nat4 -> (Nat4, Nat4)
quotRem = (Int -> Nat4)
-> (Nat4 -> Int)
-> (Int -> Int -> (Int, Int))
-> Nat4
-> Nat4
-> (Nat4, Nat4)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Nat4
nat4 Nat4 -> Int
unNat4 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Nat4 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Nat4 -> Int) -> Nat4 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat4 -> Int
unNat4
instance Integral Nat5 where quotRem :: Nat5 -> Nat5 -> (Nat5, Nat5)
quotRem = (Int -> Nat5)
-> (Nat5 -> Int)
-> (Int -> Int -> (Int, Int))
-> Nat5
-> Nat5
-> (Nat5, Nat5)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Nat5
nat5 Nat5 -> Int
unNat5 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Nat5 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Nat5 -> Int) -> Nat5 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat5 -> Int
unNat5
instance Integral Nat6 where quotRem :: Nat6 -> Nat6 -> (Nat6, Nat6)
quotRem = (Int -> Nat6)
-> (Nat6 -> Int)
-> (Int -> Int -> (Int, Int))
-> Nat6
-> Nat6
-> (Nat6, Nat6)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Nat6
nat6 Nat6 -> Int
unNat6 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Nat6 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Nat6 -> Int) -> Nat6 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat6 -> Int
unNat6
instance Integral Nat7 where quotRem :: Nat7 -> Nat7 -> (Nat7, Nat7)
quotRem = (Int -> Nat7)
-> (Nat7 -> Int)
-> (Int -> Int -> (Int, Int))
-> Nat7
-> Nat7
-> (Nat7, Nat7)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> Nat7
nat7 Nat7 -> Int
unNat7 Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Nat7 -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (Nat7 -> Int) -> Nat7 -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Nat7 -> Int
unNat7
instance Integral Natural where quotRem :: Natural -> Natural -> (Natural, Natural)
quotRem = (Integer -> Natural)
-> (Natural -> Integer)
-> (Integer -> Integer -> (Integer, Integer))
-> Natural
-> Natural
-> (Natural, Natural)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Integer -> Natural
natural Natural -> Integer
unNatural Integer -> Integer -> (Integer, Integer)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: Natural -> Integer
toInteger = Integer -> Integer
forall a. Integral a => a -> Integer
toInteger (Integer -> Integer) -> (Natural -> Integer) -> Natural -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Natural -> Integer
unNatural
instance Integral A where quotRem :: A -> A -> (A, A)
quotRem = (Int -> A)
-> (A -> Int) -> (Int -> Int -> (Int, Int)) -> A -> A -> (A, A)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> A
mkA A -> Int
unA Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: A -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (A -> Int) -> A -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. A -> Int
unA
instance Integral B where quotRem :: B -> B -> (B, B)
quotRem = (Int -> B)
-> (B -> Int) -> (Int -> Int -> (Int, Int)) -> B -> B -> (B, B)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> B
mkB B -> Int
unB Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: B -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (B -> Int) -> B -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. B -> Int
unB
instance Integral C where quotRem :: C -> C -> (C, C)
quotRem = (Int -> C)
-> (C -> Int) -> (Int -> Int -> (Int, Int)) -> C -> C -> (C, C)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> C
mkC C -> Int
unC Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: C -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (C -> Int) -> C -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. C -> Int
unC
instance Integral D where quotRem :: D -> D -> (D, D)
quotRem = (Int -> D)
-> (D -> Int) -> (Int -> Int -> (Int, Int)) -> D -> D -> (D, D)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> D
mkD D -> Int
unD Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: D -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (D -> Int) -> D -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. D -> Int
unD
instance Integral E where quotRem :: E -> E -> (E, E)
quotRem = (Int -> E)
-> (E -> Int) -> (Int -> Int -> (Int, Int)) -> E -> E -> (E, E)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> E
mkE E -> Int
unE Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: E -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (E -> Int) -> E -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. E -> Int
unE
instance Integral F where quotRem :: F -> F -> (F, F)
quotRem = (Int -> F)
-> (F -> Int) -> (Int -> Int -> (Int, Int)) -> F -> F -> (F, F)
forall a b.
(a -> b) -> (b -> a) -> (a -> a -> (a, a)) -> b -> b -> (b, b)
otNewtype Int -> F
mkF F -> Int
unF Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
quotRem
toInteger :: F -> Integer
toInteger = Int -> Integer
forall a. Integral a => a -> Integer
toInteger (Int -> Integer) -> (F -> Int) -> F -> Integer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. F -> Int
unF
instance Bounded Int1 where maxBound :: Int1
maxBound = Int -> Int1
Int1 Int
0; minBound :: Int1
minBound = Int -> Int1
Int1 (-Int
1)
instance Bounded Int2 where maxBound :: Int2
maxBound = Int -> Int2
Int2 Int
1; minBound :: Int2
minBound = Int -> Int2
Int2 (-Int
2)
instance Bounded Int3 where maxBound :: Int3
maxBound = Int -> Int3
Int3 Int
3; minBound :: Int3
minBound = Int -> Int3
Int3 (-Int
4)
instance Bounded Int4 where maxBound :: Int4
maxBound = Int -> Int4
Int4 Int
7; minBound :: Int4
minBound = Int -> Int4
Int4 (-Int
8)
instance Bounded Word1 where maxBound :: Word1
maxBound = Int -> Word1
Word1 Int
1; minBound :: Word1
minBound = Int -> Word1
Word1 Int
0
instance Bounded Word2 where maxBound :: Word2
maxBound = Int -> Word2
Word2 Int
3; minBound :: Word2
minBound = Int -> Word2
Word2 Int
0
instance Bounded Word3 where maxBound :: Word3
maxBound = Int -> Word3
Word3 Int
7; minBound :: Word3
minBound = Int -> Word3
Word3 Int
0
instance Bounded Word4 where maxBound :: Word4
maxBound = Int -> Word4
Word4 Int
15; minBound :: Word4
minBound = Int -> Word4
Word4 Int
0
instance Bounded Nat where maxBound :: Nat
maxBound = Int -> Nat
Nat Int
forall a. Bounded a => a
maxBound; minBound :: Nat
minBound = Int -> Nat
Nat Int
0
instance Bounded Nat1 where maxBound :: Nat1
maxBound = Int -> Nat1
Nat1 Int
0; minBound :: Nat1
minBound = Int -> Nat1
Nat1 Int
0
instance Bounded Nat2 where maxBound :: Nat2
maxBound = Int -> Nat2
Nat2 Int
1; minBound :: Nat2
minBound = Int -> Nat2
Nat2 Int
0
instance Bounded Nat3 where maxBound :: Nat3
maxBound = Int -> Nat3
Nat3 Int
2; minBound :: Nat3
minBound = Int -> Nat3
Nat3 Int
0
instance Bounded Nat4 where maxBound :: Nat4
maxBound = Int -> Nat4
Nat4 Int
3; minBound :: Nat4
minBound = Int -> Nat4
Nat4 Int
0
instance Bounded Nat5 where maxBound :: Nat5
maxBound = Int -> Nat5
Nat5 Int
4; minBound :: Nat5
minBound = Int -> Nat5
Nat5 Int
0
instance Bounded Nat6 where maxBound :: Nat6
maxBound = Int -> Nat6
Nat6 Int
5; minBound :: Nat6
minBound = Int -> Nat6
Nat6 Int
0
instance Bounded Nat7 where maxBound :: Nat7
maxBound = Int -> Nat7
Nat7 Int
6; minBound :: Nat7
minBound = Int -> Nat7
Nat7 Int
0
instance Bounded A where maxBound :: A
maxBound = Int -> A
A Int
5; minBound :: A
minBound = Int -> A
A Int
0
instance Bounded B where maxBound :: B
maxBound = Int -> B
B Int
5; minBound :: B
minBound = Int -> B
B Int
0
instance Bounded C where maxBound :: C
maxBound = Int -> C
C Int
5; minBound :: C
minBound = Int -> C
C Int
0
instance Bounded D where maxBound :: D
maxBound = Int -> D
D Int
5; minBound :: D
minBound = Int -> D
D Int
0
instance Bounded E where maxBound :: E
maxBound = Int -> E
E Int
5; minBound :: E
minBound = Int -> E
E Int
0
instance Bounded F where maxBound :: F
maxBound = Int -> F
F Int
5; minBound :: F
minBound = Int -> F
F Int
0
instance Enum Int1 where
toEnum :: Int -> Int1
toEnum = Int -> Int1
int1; enumFrom :: Int1 -> [Int1]
enumFrom = Int1 -> [Int1]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Int1 -> Int
fromEnum = Int1 -> Int
unInt1; enumFromThen :: Int1 -> Int1 -> [Int1]
enumFromThen = Int1 -> Int1 -> [Int1]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Int2 where
toEnum :: Int -> Int2
toEnum = Int -> Int2
int2; enumFrom :: Int2 -> [Int2]
enumFrom = Int2 -> [Int2]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Int2 -> Int
fromEnum = Int2 -> Int
unInt2; enumFromThen :: Int2 -> Int2 -> [Int2]
enumFromThen = Int2 -> Int2 -> [Int2]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Int3 where
toEnum :: Int -> Int3
toEnum = Int -> Int3
int3; enumFrom :: Int3 -> [Int3]
enumFrom = Int3 -> [Int3]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Int3 -> Int
fromEnum = Int3 -> Int
unInt3; enumFromThen :: Int3 -> Int3 -> [Int3]
enumFromThen = Int3 -> Int3 -> [Int3]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Int4 where
toEnum :: Int -> Int4
toEnum = Int -> Int4
int4; enumFrom :: Int4 -> [Int4]
enumFrom = Int4 -> [Int4]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Int4 -> Int
fromEnum = Int4 -> Int
unInt4; enumFromThen :: Int4 -> Int4 -> [Int4]
enumFromThen = Int4 -> Int4 -> [Int4]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Word1 where
toEnum :: Int -> Word1
toEnum = Int -> Word1
word1; enumFrom :: Word1 -> [Word1]
enumFrom = Word1 -> [Word1]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Word1 -> Int
fromEnum = Word1 -> Int
unWord1; enumFromThen :: Word1 -> Word1 -> [Word1]
enumFromThen = Word1 -> Word1 -> [Word1]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Word2 where
toEnum :: Int -> Word2
toEnum = Int -> Word2
word2; enumFrom :: Word2 -> [Word2]
enumFrom = Word2 -> [Word2]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Word2 -> Int
fromEnum = Word2 -> Int
unWord2; enumFromThen :: Word2 -> Word2 -> [Word2]
enumFromThen = Word2 -> Word2 -> [Word2]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Word3 where
toEnum :: Int -> Word3
toEnum = Int -> Word3
word3; enumFrom :: Word3 -> [Word3]
enumFrom = Word3 -> [Word3]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Word3 -> Int
fromEnum = Word3 -> Int
unWord3; enumFromThen :: Word3 -> Word3 -> [Word3]
enumFromThen = Word3 -> Word3 -> [Word3]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Word4 where
toEnum :: Int -> Word4
toEnum = Int -> Word4
word4; enumFrom :: Word4 -> [Word4]
enumFrom = Word4 -> [Word4]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Word4 -> Int
fromEnum = Word4 -> Int
unWord4; enumFromThen :: Word4 -> Word4 -> [Word4]
enumFromThen = Word4 -> Word4 -> [Word4]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Nat where
toEnum :: Int -> Nat
toEnum = Int -> Nat
nat; enumFrom :: Nat -> [Nat]
enumFrom = Nat -> [Nat]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Nat -> Int
fromEnum = Nat -> Int
unNat; enumFromThen :: Nat -> Nat -> [Nat]
enumFromThen = Nat -> Nat -> [Nat]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Nat1 where
toEnum :: Int -> Nat1
toEnum = Int -> Nat1
nat1; enumFrom :: Nat1 -> [Nat1]
enumFrom = Nat1 -> [Nat1]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Nat1 -> Int
fromEnum = Nat1 -> Int
unNat1; enumFromThen :: Nat1 -> Nat1 -> [Nat1]
enumFromThen = Nat1 -> Nat1 -> [Nat1]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Nat2 where
toEnum :: Int -> Nat2
toEnum = Int -> Nat2
nat2; enumFrom :: Nat2 -> [Nat2]
enumFrom = Nat2 -> [Nat2]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Nat2 -> Int
fromEnum = Nat2 -> Int
unNat2; enumFromThen :: Nat2 -> Nat2 -> [Nat2]
enumFromThen = Nat2 -> Nat2 -> [Nat2]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Nat3 where
toEnum :: Int -> Nat3
toEnum = Int -> Nat3
nat3; enumFrom :: Nat3 -> [Nat3]
enumFrom = Nat3 -> [Nat3]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Nat3 -> Int
fromEnum = Nat3 -> Int
unNat3; enumFromThen :: Nat3 -> Nat3 -> [Nat3]
enumFromThen = Nat3 -> Nat3 -> [Nat3]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Nat4 where
toEnum :: Int -> Nat4
toEnum = Int -> Nat4
nat4; enumFrom :: Nat4 -> [Nat4]
enumFrom = Nat4 -> [Nat4]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Nat4 -> Int
fromEnum = Nat4 -> Int
unNat4; enumFromThen :: Nat4 -> Nat4 -> [Nat4]
enumFromThen = Nat4 -> Nat4 -> [Nat4]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Nat5 where
toEnum :: Int -> Nat5
toEnum = Int -> Nat5
nat5; enumFrom :: Nat5 -> [Nat5]
enumFrom = Nat5 -> [Nat5]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Nat5 -> Int
fromEnum = Nat5 -> Int
unNat5; enumFromThen :: Nat5 -> Nat5 -> [Nat5]
enumFromThen = Nat5 -> Nat5 -> [Nat5]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Nat6 where
toEnum :: Int -> Nat6
toEnum = Int -> Nat6
nat6; enumFrom :: Nat6 -> [Nat6]
enumFrom = Nat6 -> [Nat6]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Nat6 -> Int
fromEnum = Nat6 -> Int
unNat6; enumFromThen :: Nat6 -> Nat6 -> [Nat6]
enumFromThen = Nat6 -> Nat6 -> [Nat6]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Nat7 where
toEnum :: Int -> Nat7
toEnum = Int -> Nat7
nat7; enumFrom :: Nat7 -> [Nat7]
enumFrom = Nat7 -> [Nat7]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: Nat7 -> Int
fromEnum = Nat7 -> Int
unNat7; enumFromThen :: Nat7 -> Nat7 -> [Nat7]
enumFromThen = Nat7 -> Nat7 -> [Nat7]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum Natural where
toEnum :: Int -> Natural
toEnum = Integer -> Natural
natural (Integer -> Natural) -> (Int -> Integer) -> Int -> Natural
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral
fromEnum :: Natural -> Int
fromEnum = Integer -> Int
forall a. Num a => Integer -> a
fromInteger (Integer -> Int) -> (Natural -> Integer) -> Natural -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Natural -> Integer
unNatural
enumFrom :: Natural -> [Natural]
enumFrom (Natural Integer
x) = (Integer -> Natural) -> [Integer] -> [Natural]
forall a b. (a -> b) -> [a] -> [b]
map Integer -> Natural
Natural [Integer
x..]
enumFromThen :: Natural -> Natural -> [Natural]
enumFromThen (Natural Integer
x) (Natural Integer
s) = (Integer -> Natural) -> [Integer] -> [Natural]
forall a b. (a -> b) -> [a] -> [b]
map Integer -> Natural
Natural [Integer
x,Integer
s..]
instance Enum A where
toEnum :: Int -> A
toEnum = Int -> A
mkA; enumFrom :: A -> [A]
enumFrom = A -> [A]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: A -> Int
fromEnum = A -> Int
unA; enumFromThen :: A -> A -> [A]
enumFromThen = A -> A -> [A]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum B where
toEnum :: Int -> B
toEnum = Int -> B
mkB; enumFrom :: B -> [B]
enumFrom = B -> [B]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: B -> Int
fromEnum = B -> Int
unB; enumFromThen :: B -> B -> [B]
enumFromThen = B -> B -> [B]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum C where
toEnum :: Int -> C
toEnum = Int -> C
mkC; enumFrom :: C -> [C]
enumFrom = C -> [C]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: C -> Int
fromEnum = C -> Int
unC; enumFromThen :: C -> C -> [C]
enumFromThen = C -> C -> [C]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum D where
toEnum :: Int -> D
toEnum = Int -> D
mkD; enumFrom :: D -> [D]
enumFrom = D -> [D]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: D -> Int
fromEnum = D -> Int
unD; enumFromThen :: D -> D -> [D]
enumFromThen = D -> D -> [D]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum E where
toEnum :: Int -> E
toEnum = Int -> E
mkE; enumFrom :: E -> [E]
enumFrom = E -> [E]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: E -> Int
fromEnum = E -> Int
unE; enumFromThen :: E -> E -> [E]
enumFromThen = E -> E -> [E]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
instance Enum F where toEnum :: Int -> F
toEnum = Int -> F
mkF; enumFrom :: F -> [F]
enumFrom = F -> [F]
forall a. (Ord a, Bounded a, Enum a) => a -> [a]
boundedEnumFrom
fromEnum :: F -> Int
fromEnum = F -> Int
unF; enumFromThen :: F -> F -> [F]
enumFromThen = F -> F -> [F]
forall a. (Ord a, Bounded a, Enum a) => a -> a -> [a]
boundedEnumFromThen
rng :: Enum a => (a,a) -> [a]
rng :: (a, a) -> [a]
rng (a
m,a
n) = [a
m..a
n]
idx :: Integral a => (a,a) -> a -> Int
idx :: (a, a) -> a -> Int
idx b :: (a, a)
b@(a
m,a
_) a
i | (a, a) -> a -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng (a, a)
b a
i = a -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (a
i a -> a -> a
forall a. Num a => a -> a -> a
- a
m)
| Bool
otherwise = String -> Int
forall a. HasCallStack => String -> a
error String
"Index out of range."
irng :: Ord a => (a,a) -> a -> Bool
irng :: (a, a) -> a -> Bool
irng (a
m,a
n) a
i = a
m a -> a -> Bool
forall a. Ord a => a -> a -> Bool
<= a
i Bool -> Bool -> Bool
&& a
i a -> a -> Bool
forall a. Ord a => a -> a -> Bool
<= a
m
instance Ix Int1 where range :: (Int1, Int1) -> [Int1]
range = (Int1, Int1) -> [Int1]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Int1, Int1) -> Int1 -> Int
index = (Int1, Int1) -> Int1 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Int1, Int1) -> Int1 -> Bool
inRange = (Int1, Int1) -> Int1 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Int2 where range :: (Int2, Int2) -> [Int2]
range = (Int2, Int2) -> [Int2]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Int2, Int2) -> Int2 -> Int
index = (Int2, Int2) -> Int2 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Int2, Int2) -> Int2 -> Bool
inRange = (Int2, Int2) -> Int2 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Int3 where range :: (Int3, Int3) -> [Int3]
range = (Int3, Int3) -> [Int3]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Int3, Int3) -> Int3 -> Int
index = (Int3, Int3) -> Int3 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Int3, Int3) -> Int3 -> Bool
inRange = (Int3, Int3) -> Int3 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Int4 where range :: (Int4, Int4) -> [Int4]
range = (Int4, Int4) -> [Int4]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Int4, Int4) -> Int4 -> Int
index = (Int4, Int4) -> Int4 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Int4, Int4) -> Int4 -> Bool
inRange = (Int4, Int4) -> Int4 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Word1 where range :: (Word1, Word1) -> [Word1]
range = (Word1, Word1) -> [Word1]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Word1, Word1) -> Word1 -> Int
index = (Word1, Word1) -> Word1 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Word1, Word1) -> Word1 -> Bool
inRange = (Word1, Word1) -> Word1 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Word2 where range :: (Word2, Word2) -> [Word2]
range = (Word2, Word2) -> [Word2]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Word2, Word2) -> Word2 -> Int
index = (Word2, Word2) -> Word2 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Word2, Word2) -> Word2 -> Bool
inRange = (Word2, Word2) -> Word2 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Word3 where range :: (Word3, Word3) -> [Word3]
range = (Word3, Word3) -> [Word3]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Word3, Word3) -> Word3 -> Int
index = (Word3, Word3) -> Word3 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Word3, Word3) -> Word3 -> Bool
inRange = (Word3, Word3) -> Word3 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Word4 where range :: (Word4, Word4) -> [Word4]
range = (Word4, Word4) -> [Word4]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Word4, Word4) -> Word4 -> Int
index = (Word4, Word4) -> Word4 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Word4, Word4) -> Word4 -> Bool
inRange = (Word4, Word4) -> Word4 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Nat where range :: (Nat, Nat) -> [Nat]
range = (Nat, Nat) -> [Nat]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Nat, Nat) -> Nat -> Int
index = (Nat, Nat) -> Nat -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Nat, Nat) -> Nat -> Bool
inRange = (Nat, Nat) -> Nat -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Nat1 where range :: (Nat1, Nat1) -> [Nat1]
range = (Nat1, Nat1) -> [Nat1]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Nat1, Nat1) -> Nat1 -> Int
index = (Nat1, Nat1) -> Nat1 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Nat1, Nat1) -> Nat1 -> Bool
inRange = (Nat1, Nat1) -> Nat1 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Nat2 where range :: (Nat2, Nat2) -> [Nat2]
range = (Nat2, Nat2) -> [Nat2]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Nat2, Nat2) -> Nat2 -> Int
index = (Nat2, Nat2) -> Nat2 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Nat2, Nat2) -> Nat2 -> Bool
inRange = (Nat2, Nat2) -> Nat2 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Nat3 where range :: (Nat3, Nat3) -> [Nat3]
range = (Nat3, Nat3) -> [Nat3]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Nat3, Nat3) -> Nat3 -> Int
index = (Nat3, Nat3) -> Nat3 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Nat3, Nat3) -> Nat3 -> Bool
inRange = (Nat3, Nat3) -> Nat3 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Nat4 where range :: (Nat4, Nat4) -> [Nat4]
range = (Nat4, Nat4) -> [Nat4]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Nat4, Nat4) -> Nat4 -> Int
index = (Nat4, Nat4) -> Nat4 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Nat4, Nat4) -> Nat4 -> Bool
inRange = (Nat4, Nat4) -> Nat4 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Nat5 where range :: (Nat5, Nat5) -> [Nat5]
range = (Nat5, Nat5) -> [Nat5]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Nat5, Nat5) -> Nat5 -> Int
index = (Nat5, Nat5) -> Nat5 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Nat5, Nat5) -> Nat5 -> Bool
inRange = (Nat5, Nat5) -> Nat5 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Nat6 where range :: (Nat6, Nat6) -> [Nat6]
range = (Nat6, Nat6) -> [Nat6]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Nat6, Nat6) -> Nat6 -> Int
index = (Nat6, Nat6) -> Nat6 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Nat6, Nat6) -> Nat6 -> Bool
inRange = (Nat6, Nat6) -> Nat6 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Nat7 where range :: (Nat7, Nat7) -> [Nat7]
range = (Nat7, Nat7) -> [Nat7]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Nat7, Nat7) -> Nat7 -> Int
index = (Nat7, Nat7) -> Nat7 -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Nat7, Nat7) -> Nat7 -> Bool
inRange = (Nat7, Nat7) -> Nat7 -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix Natural where range :: (Natural, Natural) -> [Natural]
range = (Natural, Natural) -> [Natural]
forall a. Enum a => (a, a) -> [a]
rng; index :: (Natural, Natural) -> Natural -> Int
index = (Natural, Natural) -> Natural -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (Natural, Natural) -> Natural -> Bool
inRange = (Natural, Natural) -> Natural -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix A where range :: (A, A) -> [A]
range = (A, A) -> [A]
forall a. Enum a => (a, a) -> [a]
rng; index :: (A, A) -> A -> Int
index = (A, A) -> A -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (A, A) -> A -> Bool
inRange = (A, A) -> A -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix B where range :: (B, B) -> [B]
range = (B, B) -> [B]
forall a. Enum a => (a, a) -> [a]
rng; index :: (B, B) -> B -> Int
index = (B, B) -> B -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (B, B) -> B -> Bool
inRange = (B, B) -> B -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix C where range :: (C, C) -> [C]
range = (C, C) -> [C]
forall a. Enum a => (a, a) -> [a]
rng; index :: (C, C) -> C -> Int
index = (C, C) -> C -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (C, C) -> C -> Bool
inRange = (C, C) -> C -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix D where range :: (D, D) -> [D]
range = (D, D) -> [D]
forall a. Enum a => (a, a) -> [a]
rng; index :: (D, D) -> D -> Int
index = (D, D) -> D -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (D, D) -> D -> Bool
inRange = (D, D) -> D -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix E where range :: (E, E) -> [E]
range = (E, E) -> [E]
forall a. Enum a => (a, a) -> [a]
rng; index :: (E, E) -> E -> Int
index = (E, E) -> E -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (E, E) -> E -> Bool
inRange = (E, E) -> E -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Ix F where range :: (F, F) -> [F]
range = (F, F) -> [F]
forall a. Enum a => (a, a) -> [a]
rng; index :: (F, F) -> F -> Int
index = (F, F) -> F -> Int
forall a. Integral a => (a, a) -> a -> Int
idx; inRange :: (F, F) -> F -> Bool
inRange = (F, F) -> F -> Bool
forall a. Ord a => (a, a) -> a -> Bool
irng
instance Listable Int1 where list :: [Int1]
list = [Int1
0,Int1
forall a. Bounded a => a
minBound]
instance Listable Int2 where list :: [Int2]
list = [Int2]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Int3 where list :: [Int3]
list = [Int3]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Int4 where list :: [Int4]
list = [Int4]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Word1 where list :: [Word1]
list = [Word1]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Word2 where list :: [Word2]
list = [Word2]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Word3 where list :: [Word3]
list = [Word3]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Word4 where list :: [Word4]
list = [Word4]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Nat where list :: [Nat]
list = [Nat]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Nat1 where list :: [Nat1]
list = [Nat1]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Nat2 where list :: [Nat2]
list = [Nat2]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Nat3 where list :: [Nat3]
list = [Nat3]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Nat4 where list :: [Nat4]
list = [Nat4]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Nat5 where list :: [Nat5]
list = [Nat5]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Nat6 where list :: [Nat6]
list = [Nat6]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Nat7 where list :: [Nat7]
list = [Nat7]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable Natural where list :: [Natural]
list = [Natural]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable A where list :: [A]
list = [A]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable B where list :: [B]
list = [B]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable C where list :: [C]
list = [C]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable D where list :: [D]
list = [D]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable E where list :: [E]
list = [E]
forall a. (Ord a, Num a) => [a]
listIntegral
instance Listable F where list :: [F]
list = [F]
forall a. (Ord a, Num a) => [a]
listIntegral
type UInt1 = Word1
type UInt2 = Word2
type UInt3 = Word3
type UInt4 = Word4
newtype NoDup a = NoDup [a] deriving (Int -> NoDup a -> ShowS
[NoDup a] -> ShowS
NoDup a -> String
(Int -> NoDup a -> ShowS)
-> (NoDup a -> String) -> ([NoDup a] -> ShowS) -> Show (NoDup a)
forall a. Show a => Int -> NoDup a -> ShowS
forall a. Show a => [NoDup a] -> ShowS
forall a. Show a => NoDup a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NoDup a] -> ShowS
$cshowList :: forall a. Show a => [NoDup a] -> ShowS
show :: NoDup a -> String
$cshow :: forall a. Show a => NoDup a -> String
showsPrec :: Int -> NoDup a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> NoDup a -> ShowS
Show, ReadPrec [NoDup a]
ReadPrec (NoDup a)
Int -> ReadS (NoDup a)
ReadS [NoDup a]
(Int -> ReadS (NoDup a))
-> ReadS [NoDup a]
-> ReadPrec (NoDup a)
-> ReadPrec [NoDup a]
-> Read (NoDup a)
forall a. Read a => ReadPrec [NoDup a]
forall a. Read a => ReadPrec (NoDup a)
forall a. Read a => Int -> ReadS (NoDup a)
forall a. Read a => ReadS [NoDup a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NoDup a]
$creadListPrec :: forall a. Read a => ReadPrec [NoDup a]
readPrec :: ReadPrec (NoDup a)
$creadPrec :: forall a. Read a => ReadPrec (NoDup a)
readList :: ReadS [NoDup a]
$creadList :: forall a. Read a => ReadS [NoDup a]
readsPrec :: Int -> ReadS (NoDup a)
$creadsPrec :: forall a. Read a => Int -> ReadS (NoDup a)
Read, NoDup a -> NoDup a -> Bool
(NoDup a -> NoDup a -> Bool)
-> (NoDup a -> NoDup a -> Bool) -> Eq (NoDup a)
forall a. Eq a => NoDup a -> NoDup a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NoDup a -> NoDup a -> Bool
$c/= :: forall a. Eq a => NoDup a -> NoDup a -> Bool
== :: NoDup a -> NoDup a -> Bool
$c== :: forall a. Eq a => NoDup a -> NoDup a -> Bool
Eq, Eq (NoDup a)
Eq (NoDup a)
-> (NoDup a -> NoDup a -> Ordering)
-> (NoDup a -> NoDup a -> Bool)
-> (NoDup a -> NoDup a -> Bool)
-> (NoDup a -> NoDup a -> Bool)
-> (NoDup a -> NoDup a -> Bool)
-> (NoDup a -> NoDup a -> NoDup a)
-> (NoDup a -> NoDup a -> NoDup a)
-> Ord (NoDup a)
NoDup a -> NoDup a -> Bool
NoDup a -> NoDup a -> Ordering
NoDup a -> NoDup a -> NoDup a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (NoDup a)
forall a. Ord a => NoDup a -> NoDup a -> Bool
forall a. Ord a => NoDup a -> NoDup a -> Ordering
forall a. Ord a => NoDup a -> NoDup a -> NoDup a
min :: NoDup a -> NoDup a -> NoDup a
$cmin :: forall a. Ord a => NoDup a -> NoDup a -> NoDup a
max :: NoDup a -> NoDup a -> NoDup a
$cmax :: forall a. Ord a => NoDup a -> NoDup a -> NoDup a
>= :: NoDup a -> NoDup a -> Bool
$c>= :: forall a. Ord a => NoDup a -> NoDup a -> Bool
> :: NoDup a -> NoDup a -> Bool
$c> :: forall a. Ord a => NoDup a -> NoDup a -> Bool
<= :: NoDup a -> NoDup a -> Bool
$c<= :: forall a. Ord a => NoDup a -> NoDup a -> Bool
< :: NoDup a -> NoDup a -> Bool
$c< :: forall a. Ord a => NoDup a -> NoDup a -> Bool
compare :: NoDup a -> NoDup a -> Ordering
$ccompare :: forall a. Ord a => NoDup a -> NoDup a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (NoDup a)
Ord)
newtype Bag a = Bag [a] deriving (Int -> Bag a -> ShowS
[Bag a] -> ShowS
Bag a -> String
(Int -> Bag a -> ShowS)
-> (Bag a -> String) -> ([Bag a] -> ShowS) -> Show (Bag a)
forall a. Show a => Int -> Bag a -> ShowS
forall a. Show a => [Bag a] -> ShowS
forall a. Show a => Bag a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Bag a] -> ShowS
$cshowList :: forall a. Show a => [Bag a] -> ShowS
show :: Bag a -> String
$cshow :: forall a. Show a => Bag a -> String
showsPrec :: Int -> Bag a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Bag a -> ShowS
Show, ReadPrec [Bag a]
ReadPrec (Bag a)
Int -> ReadS (Bag a)
ReadS [Bag a]
(Int -> ReadS (Bag a))
-> ReadS [Bag a]
-> ReadPrec (Bag a)
-> ReadPrec [Bag a]
-> Read (Bag a)
forall a. Read a => ReadPrec [Bag a]
forall a. Read a => ReadPrec (Bag a)
forall a. Read a => Int -> ReadS (Bag a)
forall a. Read a => ReadS [Bag a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Bag a]
$creadListPrec :: forall a. Read a => ReadPrec [Bag a]
readPrec :: ReadPrec (Bag a)
$creadPrec :: forall a. Read a => ReadPrec (Bag a)
readList :: ReadS [Bag a]
$creadList :: forall a. Read a => ReadS [Bag a]
readsPrec :: Int -> ReadS (Bag a)
$creadsPrec :: forall a. Read a => Int -> ReadS (Bag a)
Read, Bag a -> Bag a -> Bool
(Bag a -> Bag a -> Bool) -> (Bag a -> Bag a -> Bool) -> Eq (Bag a)
forall a. Eq a => Bag a -> Bag a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Bag a -> Bag a -> Bool
$c/= :: forall a. Eq a => Bag a -> Bag a -> Bool
== :: Bag a -> Bag a -> Bool
$c== :: forall a. Eq a => Bag a -> Bag a -> Bool
Eq, Eq (Bag a)
Eq (Bag a)
-> (Bag a -> Bag a -> Ordering)
-> (Bag a -> Bag a -> Bool)
-> (Bag a -> Bag a -> Bool)
-> (Bag a -> Bag a -> Bool)
-> (Bag a -> Bag a -> Bool)
-> (Bag a -> Bag a -> Bag a)
-> (Bag a -> Bag a -> Bag a)
-> Ord (Bag a)
Bag a -> Bag a -> Bool
Bag a -> Bag a -> Ordering
Bag a -> Bag a -> Bag a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Bag a)
forall a. Ord a => Bag a -> Bag a -> Bool
forall a. Ord a => Bag a -> Bag a -> Ordering
forall a. Ord a => Bag a -> Bag a -> Bag a
min :: Bag a -> Bag a -> Bag a
$cmin :: forall a. Ord a => Bag a -> Bag a -> Bag a
max :: Bag a -> Bag a -> Bag a
$cmax :: forall a. Ord a => Bag a -> Bag a -> Bag a
>= :: Bag a -> Bag a -> Bool
$c>= :: forall a. Ord a => Bag a -> Bag a -> Bool
> :: Bag a -> Bag a -> Bool
$c> :: forall a. Ord a => Bag a -> Bag a -> Bool
<= :: Bag a -> Bag a -> Bool
$c<= :: forall a. Ord a => Bag a -> Bag a -> Bool
< :: Bag a -> Bag a -> Bool
$c< :: forall a. Ord a => Bag a -> Bag a -> Bool
compare :: Bag a -> Bag a -> Ordering
$ccompare :: forall a. Ord a => Bag a -> Bag a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (Bag a)
Ord)
newtype Set a = Set [a] deriving (Int -> Set a -> ShowS
[Set a] -> ShowS
Set a -> String
(Int -> Set a -> ShowS)
-> (Set a -> String) -> ([Set a] -> ShowS) -> Show (Set a)
forall a. Show a => Int -> Set a -> ShowS
forall a. Show a => [Set a] -> ShowS
forall a. Show a => Set a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Set a] -> ShowS
$cshowList :: forall a. Show a => [Set a] -> ShowS
show :: Set a -> String
$cshow :: forall a. Show a => Set a -> String
showsPrec :: Int -> Set a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Set a -> ShowS
Show, ReadPrec [Set a]
ReadPrec (Set a)
Int -> ReadS (Set a)
ReadS [Set a]
(Int -> ReadS (Set a))
-> ReadS [Set a]
-> ReadPrec (Set a)
-> ReadPrec [Set a]
-> Read (Set a)
forall a. Read a => ReadPrec [Set a]
forall a. Read a => ReadPrec (Set a)
forall a. Read a => Int -> ReadS (Set a)
forall a. Read a => ReadS [Set a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Set a]
$creadListPrec :: forall a. Read a => ReadPrec [Set a]
readPrec :: ReadPrec (Set a)
$creadPrec :: forall a. Read a => ReadPrec (Set a)
readList :: ReadS [Set a]
$creadList :: forall a. Read a => ReadS [Set a]
readsPrec :: Int -> ReadS (Set a)
$creadsPrec :: forall a. Read a => Int -> ReadS (Set a)
Read, Set a -> Set a -> Bool
(Set a -> Set a -> Bool) -> (Set a -> Set a -> Bool) -> Eq (Set a)
forall a. Eq a => Set a -> Set a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Set a -> Set a -> Bool
$c/= :: forall a. Eq a => Set a -> Set a -> Bool
== :: Set a -> Set a -> Bool
$c== :: forall a. Eq a => Set a -> Set a -> Bool
Eq, Eq (Set a)
Eq (Set a)
-> (Set a -> Set a -> Ordering)
-> (Set a -> Set a -> Bool)
-> (Set a -> Set a -> Bool)
-> (Set a -> Set a -> Bool)
-> (Set a -> Set a -> Bool)
-> (Set a -> Set a -> Set a)
-> (Set a -> Set a -> Set a)
-> Ord (Set a)
Set a -> Set a -> Bool
Set a -> Set a -> Ordering
Set a -> Set a -> Set a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Set a)
forall a. Ord a => Set a -> Set a -> Bool
forall a. Ord a => Set a -> Set a -> Ordering
forall a. Ord a => Set a -> Set a -> Set a
min :: Set a -> Set a -> Set a
$cmin :: forall a. Ord a => Set a -> Set a -> Set a
max :: Set a -> Set a -> Set a
$cmax :: forall a. Ord a => Set a -> Set a -> Set a
>= :: Set a -> Set a -> Bool
$c>= :: forall a. Ord a => Set a -> Set a -> Bool
> :: Set a -> Set a -> Bool
$c> :: forall a. Ord a => Set a -> Set a -> Bool
<= :: Set a -> Set a -> Bool
$c<= :: forall a. Ord a => Set a -> Set a -> Bool
< :: Set a -> Set a -> Bool
$c< :: forall a. Ord a => Set a -> Set a -> Bool
compare :: Set a -> Set a -> Ordering
$ccompare :: forall a. Ord a => Set a -> Set a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (Set a)
Ord)
newtype Map a b = Map [(a,b)] deriving (Int -> Map a b -> ShowS
[Map a b] -> ShowS
Map a b -> String
(Int -> Map a b -> ShowS)
-> (Map a b -> String) -> ([Map a b] -> ShowS) -> Show (Map a b)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall a b. (Show a, Show b) => Int -> Map a b -> ShowS
forall a b. (Show a, Show b) => [Map a b] -> ShowS
forall a b. (Show a, Show b) => Map a b -> String
showList :: [Map a b] -> ShowS
$cshowList :: forall a b. (Show a, Show b) => [Map a b] -> ShowS
show :: Map a b -> String
$cshow :: forall a b. (Show a, Show b) => Map a b -> String
showsPrec :: Int -> Map a b -> ShowS
$cshowsPrec :: forall a b. (Show a, Show b) => Int -> Map a b -> ShowS
Show, ReadPrec [Map a b]
ReadPrec (Map a b)
Int -> ReadS (Map a b)
ReadS [Map a b]
(Int -> ReadS (Map a b))
-> ReadS [Map a b]
-> ReadPrec (Map a b)
-> ReadPrec [Map a b]
-> Read (Map a b)
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
forall a b. (Read a, Read b) => ReadPrec [Map a b]
forall a b. (Read a, Read b) => ReadPrec (Map a b)
forall a b. (Read a, Read b) => Int -> ReadS (Map a b)
forall a b. (Read a, Read b) => ReadS [Map a b]
readListPrec :: ReadPrec [Map a b]
$creadListPrec :: forall a b. (Read a, Read b) => ReadPrec [Map a b]
readPrec :: ReadPrec (Map a b)
$creadPrec :: forall a b. (Read a, Read b) => ReadPrec (Map a b)
readList :: ReadS [Map a b]
$creadList :: forall a b. (Read a, Read b) => ReadS [Map a b]
readsPrec :: Int -> ReadS (Map a b)
$creadsPrec :: forall a b. (Read a, Read b) => Int -> ReadS (Map a b)
Read, Map a b -> Map a b -> Bool
(Map a b -> Map a b -> Bool)
-> (Map a b -> Map a b -> Bool) -> Eq (Map a b)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall a b. (Eq a, Eq b) => Map a b -> Map a b -> Bool
/= :: Map a b -> Map a b -> Bool
$c/= :: forall a b. (Eq a, Eq b) => Map a b -> Map a b -> Bool
== :: Map a b -> Map a b -> Bool
$c== :: forall a b. (Eq a, Eq b) => Map a b -> Map a b -> Bool
Eq, Eq (Map a b)
Eq (Map a b)
-> (Map a b -> Map a b -> Ordering)
-> (Map a b -> Map a b -> Bool)
-> (Map a b -> Map a b -> Bool)
-> (Map a b -> Map a b -> Bool)
-> (Map a b -> Map a b -> Bool)
-> (Map a b -> Map a b -> Map a b)
-> (Map a b -> Map a b -> Map a b)
-> Ord (Map a b)
Map a b -> Map a b -> Bool
Map a b -> Map a b -> Ordering
Map a b -> Map a b -> Map a b
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a b. (Ord a, Ord b) => Eq (Map a b)
forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Bool
forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Ordering
forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Map a b
min :: Map a b -> Map a b -> Map a b
$cmin :: forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Map a b
max :: Map a b -> Map a b -> Map a b
$cmax :: forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Map a b
>= :: Map a b -> Map a b -> Bool
$c>= :: forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Bool
> :: Map a b -> Map a b -> Bool
$c> :: forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Bool
<= :: Map a b -> Map a b -> Bool
$c<= :: forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Bool
< :: Map a b -> Map a b -> Bool
$c< :: forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Bool
compare :: Map a b -> Map a b -> Ordering
$ccompare :: forall a b. (Ord a, Ord b) => Map a b -> Map a b -> Ordering
$cp1Ord :: forall a b. (Ord a, Ord b) => Eq (Map a b)
Ord)
instance Listable a => Listable (NoDup a) where tiers :: [[NoDup a]]
tiers = ([a] -> NoDup a) -> [[NoDup a]]
forall a b. Listable a => ([a] -> b) -> [[b]]
noDupListCons [a] -> NoDup a
forall a. [a] -> NoDup a
NoDup
instance Listable a => Listable (Bag a) where tiers :: [[Bag a]]
tiers = ([a] -> Bag a) -> [[Bag a]]
forall a b. Listable a => ([a] -> b) -> [[b]]
bagCons [a] -> Bag a
forall a. [a] -> Bag a
Bag
instance Listable a => Listable (Set a) where tiers :: [[Set a]]
tiers = ([a] -> Set a) -> [[Set a]]
forall a b. Listable a => ([a] -> b) -> [[b]]
setCons [a] -> Set a
forall a. [a] -> Set a
Set
instance (Listable a, Listable b)
=> Listable (Map a b) where tiers :: [[Map a b]]
tiers = ([(a, b)] -> Map a b) -> [[Map a b]]
forall a b c. (Listable a, Listable b) => ([(a, b)] -> c) -> [[c]]
mapCons [(a, b)] -> Map a b
forall a b. [(a, b)] -> Map a b
Map
newtype X a = X {X a -> a
unX :: a} deriving (X a -> X a -> Bool
(X a -> X a -> Bool) -> (X a -> X a -> Bool) -> Eq (X a)
forall a. Eq a => X a -> X a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: X a -> X a -> Bool
$c/= :: forall a. Eq a => X a -> X a -> Bool
== :: X a -> X a -> Bool
$c== :: forall a. Eq a => X a -> X a -> Bool
Eq, Eq (X a)
Eq (X a)
-> (X a -> X a -> Ordering)
-> (X a -> X a -> Bool)
-> (X a -> X a -> Bool)
-> (X a -> X a -> Bool)
-> (X a -> X a -> Bool)
-> (X a -> X a -> X a)
-> (X a -> X a -> X a)
-> Ord (X a)
X a -> X a -> Bool
X a -> X a -> Ordering
X a -> X a -> X a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (X a)
forall a. Ord a => X a -> X a -> Bool
forall a. Ord a => X a -> X a -> Ordering
forall a. Ord a => X a -> X a -> X a
min :: X a -> X a -> X a
$cmin :: forall a. Ord a => X a -> X a -> X a
max :: X a -> X a -> X a
$cmax :: forall a. Ord a => X a -> X a -> X a
>= :: X a -> X a -> Bool
$c>= :: forall a. Ord a => X a -> X a -> Bool
> :: X a -> X a -> Bool
$c> :: forall a. Ord a => X a -> X a -> Bool
<= :: X a -> X a -> Bool
$c<= :: forall a. Ord a => X a -> X a -> Bool
< :: X a -> X a -> Bool
$c< :: forall a. Ord a => X a -> X a -> Bool
compare :: X a -> X a -> Ordering
$ccompare :: forall a. Ord a => X a -> X a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (X a)
Ord)
instance Show a => Show (X a) where show :: X a -> String
show (X a
x) = a -> String
forall a. Show a => a -> String
show a
x
instance (Integral a, Bounded a) => Listable (X a) where
list :: [X a]
list = (a -> X a) -> [a] -> [X a]
forall a b. (a -> b) -> [a] -> [b]
map a -> X a
forall a. a -> X a
X [a]
forall a. (Bounded a, Integral a) => [a]
listXIntegral
listXIntegral :: (Bounded a, Integral a) => [a]
listXIntegral :: [a]
listXIntegral = a -> [a]
forall a. (Bounded a, Integral a) => a -> [a]
l a
forall a. HasCallStack => a
undefined
where
l :: (Bounded a, Integral a) => a -> [a]
l :: a -> [a]
l a
a | a -> Integer
forall a. (Bounded a, Integral a) => a -> Integer
count a
a Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
<= Integer
4 = [a]
forall a. (Ord a, Num a) => [a]
listIntegral
| a
min a -> a -> Bool
forall a. Ord a => a -> a -> Bool
< a
0 = [a]
forall a. (Bounded a, Integral a) => [a]
listXIntegralN
| Bool
otherwise = [a]
forall a. (Bounded a, Integral a) => [a]
listXIntegralP
where
min :: a
min = a
forall a. Bounded a => a
minBound a -> a -> a
forall a. a -> a -> a
`asTypeOf` a
a
listXIntegralN :: (Bounded a, Integral a) => [a]
listXIntegralN :: [a]
listXIntegralN = a
0 a -> [a] -> [a]
forall a. a -> [a] -> [a]
: (a -> a -> [a]
forall a. Integral a => a -> a -> [a]
extremes a
1 a
forall a. Bounded a => a
maxBound) [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
+| (a -> a -> [a]
forall a. Integral a => a -> a -> [a]
extremes (-a
1) a
forall a. Bounded a => a
minBound)
listXIntegralP :: (Bounded a, Integral a) => [a]
listXIntegralP :: [a]
listXIntegralP = a
0 a -> [a] -> [a]
forall a. a -> [a] -> [a]
: [a
1..a
midBound] [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
++| [a
forall a. Bounded a => a
maxBound,(a
forall a. Bounded a => a
maxBounda -> a -> a
forall a. Num a => a -> a -> a
-a
1)..(a
midBounda -> a -> a
forall a. Num a => a -> a -> a
+a
1)]
where
midBound :: a
midBound = a
forall a. Bounded a => a
maxBound a -> a -> a
forall a. Integral a => a -> a -> a
`div` a
3 a -> a -> a
forall a. Num a => a -> a -> a
* a
2
count :: (Bounded a, Integral a) => a -> Integer
count :: a -> Integer
count a
a = Integer
1 Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
+ Integer
max Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
+ Integer -> Integer
forall a. Num a => a -> a
abs Integer
min
where
min :: Integer
min = a -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (a -> Integer) -> a -> Integer
forall a b. (a -> b) -> a -> b
$ a
forall a. Bounded a => a
minBound a -> a -> a
forall a. a -> a -> a
`asTypeOf` a
a
max :: Integer
max = a -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral (a -> Integer) -> a -> Integer
forall a b. (a -> b) -> a -> b
$ a
forall a. Bounded a => a
maxBound a -> a -> a
forall a. a -> a -> a
`asTypeOf` a
a
extremes :: (Integral a) => a -> a -> [a]
extremes :: a -> a -> [a]
extremes a
x a
y
| a
x a -> a -> Bool
forall a. Ord a => a -> a -> Bool
> a
y = [a
x,a
xa -> a -> a
forall a. Num a => a -> a -> a
-a
1..a
m] [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
+| [a
y..a
ma -> a -> a
forall a. Num a => a -> a -> a
-a
1]
| Bool
otherwise = [a
x..a
m] [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
+| [a
y,a
ya -> a -> a
forall a. Num a => a -> a -> a
-a
1..a
ma -> a -> a
forall a. Num a => a -> a -> a
+a
1]
where m :: a
m = a -> a -> a
forall a. Integral a => a -> a -> a
mid a
x a
y
mid :: Integral a => a -> a -> a
mid :: a -> a -> a
mid a
x a
y = a
x a -> a -> a
forall a. Integral a => a -> a -> a
`div` a
2
a -> a -> a
forall a. Num a => a -> a -> a
+ a
y a -> a -> a
forall a. Integral a => a -> a -> a
`div` a
2
a -> a -> a
forall a. Num a => a -> a -> a
+ if a -> Bool
forall a. Integral a => a -> Bool
odd a
x Bool -> Bool -> Bool
&& a -> Bool
forall a. Integral a => a -> Bool
odd a
y then a
1 else a
0
(++|) :: [a] -> [a] -> [a]
[] ++| :: [a] -> [a] -> [a]
++| [a]
ys = [a]
ys
[a]
xs ++| [] = [a]
xs
[a
x] ++| [a]
ys = a
xa -> [a] -> [a]
forall a. a -> [a] -> [a]
:[a]
ys
(a
x:a
x':[a]
xs) ++| (a
y:[a]
ys) = a
xa -> [a] -> [a]
forall a. a -> [a] -> [a]
:a
x'a -> [a] -> [a]
forall a. a -> [a] -> [a]
:a
ya -> [a] -> [a]
forall a. a -> [a] -> [a]
:([a]
xs [a] -> [a] -> [a]
forall a. [a] -> [a] -> [a]
++| [a]
ys)
infixr 5 ++|
newtype Xs a = Xs [a] deriving (Xs a -> Xs a -> Bool
(Xs a -> Xs a -> Bool) -> (Xs a -> Xs a -> Bool) -> Eq (Xs a)
forall a. Eq a => Xs a -> Xs a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Xs a -> Xs a -> Bool
$c/= :: forall a. Eq a => Xs a -> Xs a -> Bool
== :: Xs a -> Xs a -> Bool
$c== :: forall a. Eq a => Xs a -> Xs a -> Bool
Eq, Eq (Xs a)
Eq (Xs a)
-> (Xs a -> Xs a -> Ordering)
-> (Xs a -> Xs a -> Bool)
-> (Xs a -> Xs a -> Bool)
-> (Xs a -> Xs a -> Bool)
-> (Xs a -> Xs a -> Bool)
-> (Xs a -> Xs a -> Xs a)
-> (Xs a -> Xs a -> Xs a)
-> Ord (Xs a)
Xs a -> Xs a -> Bool
Xs a -> Xs a -> Ordering
Xs a -> Xs a -> Xs a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Xs a)
forall a. Ord a => Xs a -> Xs a -> Bool
forall a. Ord a => Xs a -> Xs a -> Ordering
forall a. Ord a => Xs a -> Xs a -> Xs a
min :: Xs a -> Xs a -> Xs a
$cmin :: forall a. Ord a => Xs a -> Xs a -> Xs a
max :: Xs a -> Xs a -> Xs a
$cmax :: forall a. Ord a => Xs a -> Xs a -> Xs a
>= :: Xs a -> Xs a -> Bool
$c>= :: forall a. Ord a => Xs a -> Xs a -> Bool
> :: Xs a -> Xs a -> Bool
$c> :: forall a. Ord a => Xs a -> Xs a -> Bool
<= :: Xs a -> Xs a -> Bool
$c<= :: forall a. Ord a => Xs a -> Xs a -> Bool
< :: Xs a -> Xs a -> Bool
$c< :: forall a. Ord a => Xs a -> Xs a -> Bool
compare :: Xs a -> Xs a -> Ordering
$ccompare :: forall a. Ord a => Xs a -> Xs a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (Xs a)
Ord, Int -> Xs a -> ShowS
[Xs a] -> ShowS
Xs a -> String
(Int -> Xs a -> ShowS)
-> (Xs a -> String) -> ([Xs a] -> ShowS) -> Show (Xs a)
forall a. Show a => Int -> Xs a -> ShowS
forall a. Show a => [Xs a] -> ShowS
forall a. Show a => Xs a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Xs a] -> ShowS
$cshowList :: forall a. Show a => [Xs a] -> ShowS
show :: Xs a -> String
$cshow :: forall a. Show a => Xs a -> String
showsPrec :: Int -> Xs a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Xs a -> ShowS
Show, ReadPrec [Xs a]
ReadPrec (Xs a)
Int -> ReadS (Xs a)
ReadS [Xs a]
(Int -> ReadS (Xs a))
-> ReadS [Xs a]
-> ReadPrec (Xs a)
-> ReadPrec [Xs a]
-> Read (Xs a)
forall a. Read a => ReadPrec [Xs a]
forall a. Read a => ReadPrec (Xs a)
forall a. Read a => Int -> ReadS (Xs a)
forall a. Read a => ReadS [Xs a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Xs a]
$creadListPrec :: forall a. Read a => ReadPrec [Xs a]
readPrec :: ReadPrec (Xs a)
$creadPrec :: forall a. Read a => ReadPrec (Xs a)
readList :: ReadS [Xs a]
$creadList :: forall a. Read a => ReadS [Xs a]
readsPrec :: Int -> ReadS (Xs a)
$creadsPrec :: forall a. Read a => Int -> ReadS (Xs a)
Read)
instance (Integral a, Bounded a) => Listable (Xs a) where
tiers :: [[Xs a]]
tiers = ([X a] -> Xs a) -> [[Xs a]]
forall a b. Listable a => (a -> b) -> [[b]]
cons1 ([a] -> Xs a
forall a. [a] -> Xs a
Xs ([a] -> Xs a) -> ([X a] -> [a]) -> [X a] -> Xs a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (X a -> a) -> [X a] -> [a]
forall a b. (a -> b) -> [a] -> [b]
map X a -> a
forall a. X a -> a
unX)
data Space = Space {Space -> Char
unSpace :: Char}
data Lower = Lower {Lower -> Char
unLower :: Char}
data Upper = Upper {Upper -> Char
unUpper :: Char}
data Alpha = Alpha {Alpha -> Char
unAlpha :: Char}
data Digit = Digit {Digit -> Char
unDigit :: Char}
data AlphaNum = AlphaNum {AlphaNum -> Char
unAlphaNum :: Char}
data Letter = Letter {Letter -> Char
unLetter :: Char}
instance Show Space where show :: Space -> String
show = Char -> String
forall a. Show a => a -> String
show (Char -> String) -> (Space -> Char) -> Space -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Space -> Char
unSpace
instance Show Lower where show :: Lower -> String
show = Char -> String
forall a. Show a => a -> String
show (Char -> String) -> (Lower -> Char) -> Lower -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Lower -> Char
unLower
instance Show Upper where show :: Upper -> String
show = Char -> String
forall a. Show a => a -> String
show (Char -> String) -> (Upper -> Char) -> Upper -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Upper -> Char
unUpper
instance Show Alpha where show :: Alpha -> String
show = Char -> String
forall a. Show a => a -> String
show (Char -> String) -> (Alpha -> Char) -> Alpha -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Alpha -> Char
unAlpha
instance Show Digit where show :: Digit -> String
show = Char -> String
forall a. Show a => a -> String
show (Char -> String) -> (Digit -> Char) -> Digit -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Digit -> Char
unDigit
instance Show AlphaNum where show :: AlphaNum -> String
show = Char -> String
forall a. Show a => a -> String
show (Char -> String) -> (AlphaNum -> Char) -> AlphaNum -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AlphaNum -> Char
unAlphaNum
instance Show Letter where show :: Letter -> String
show = Char -> String
forall a. Show a => a -> String
show (Char -> String) -> (Letter -> Char) -> Letter -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Letter -> Char
unLetter
instance Listable Space where
list :: [Space]
list = (Char -> Space) -> String -> [Space]
forall a b. (a -> b) -> [a] -> [b]
map Char -> Space
Space [Char
' ', Char
'\t', Char
'\n', Char
'\r', Char
'\f', Char
'\v']
instance Listable Lower where
list :: [Lower]
list = (Char -> Lower) -> String -> [Lower]
forall a b. (a -> b) -> [a] -> [b]
map Char -> Lower
Lower [Char
'a'..Char
'z']
instance Listable Upper where
list :: [Upper]
list = (Char -> Upper) -> String -> [Upper]
forall a b. (a -> b) -> [a] -> [b]
map Char -> Upper
Upper [Char
'A'..Char
'Z']
instance Listable Alpha where
list :: [Alpha]
list = (Char -> Alpha) -> String -> [Alpha]
forall a b. (a -> b) -> [a] -> [b]
map Char -> Alpha
Alpha (String -> [Alpha]) -> String -> [Alpha]
forall a b. (a -> b) -> a -> b
$ [Char
'a'..Char
'z'] String -> ShowS
forall a. [a] -> [a] -> [a]
+| [Char
'A'..Char
'Z']
instance Listable Digit where
list :: [Digit]
list = (Char -> Digit) -> String -> [Digit]
forall a b. (a -> b) -> [a] -> [b]
map Char -> Digit
Digit [Char
'0'..Char
'9']
instance Listable AlphaNum where
list :: [AlphaNum]
list = (Char -> AlphaNum) -> String -> [AlphaNum]
forall a b. (a -> b) -> [a] -> [b]
map Char -> AlphaNum
AlphaNum (String -> [AlphaNum]) -> String -> [AlphaNum]
forall a b. (a -> b) -> a -> b
$ [Char
'0'..Char
'9'] String -> ShowS
forall a. [a] -> [a] -> [a]
+| [Char
'a'..Char
'z'] String -> ShowS
forall a. [a] -> [a] -> [a]
+| [Char
'A'..Char
'Z']
instance Listable Letter where
list :: [Letter]
list = (Char -> Letter) -> String -> [Letter]
forall a b. (a -> b) -> [a] -> [b]
map Char -> Letter
Letter (String -> [Letter]) -> String -> [Letter]
forall a b. (a -> b) -> a -> b
$ [Char
'a'..Char
'z'] String -> ShowS
forall a. [a] -> [a] -> [a]
+| [Char
'A'..Char
'Z']
data Spaces = Spaces {Spaces -> String
unSpaces :: String}
data Lowers = Lowers {Lowers -> String
unLowers :: String}
data Uppers = Uppers {Uppers -> String
unUppers :: String}
data Alphas = Alphas {Alphas -> String
unAlphas :: String}
data Digits = Digits {Digits -> String
unDigits :: String}
data AlphaNums = AlphaNums {AlphaNums -> String
unAlphaNums :: String}
data Letters = Letters {Letters -> String
unLetters :: String}
instance Show Spaces where show :: Spaces -> String
show = ShowS
forall a. Show a => a -> String
show ShowS -> (Spaces -> String) -> Spaces -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Spaces -> String
unSpaces
instance Show Lowers where show :: Lowers -> String
show = ShowS
forall a. Show a => a -> String
show ShowS -> (Lowers -> String) -> Lowers -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Lowers -> String
unLowers
instance Show Uppers where show :: Uppers -> String
show = ShowS
forall a. Show a => a -> String
show ShowS -> (Uppers -> String) -> Uppers -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Uppers -> String
unUppers
instance Show Alphas where show :: Alphas -> String
show = ShowS
forall a. Show a => a -> String
show ShowS -> (Alphas -> String) -> Alphas -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Alphas -> String
unAlphas
instance Show Digits where show :: Digits -> String
show = ShowS
forall a. Show a => a -> String
show ShowS -> (Digits -> String) -> Digits -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Digits -> String
unDigits
instance Show AlphaNums where show :: AlphaNums -> String
show = ShowS
forall a. Show a => a -> String
show ShowS -> (AlphaNums -> String) -> AlphaNums -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AlphaNums -> String
unAlphaNums
instance Show Letters where show :: Letters -> String
show = ShowS
forall a. Show a => a -> String
show ShowS -> (Letters -> String) -> Letters -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Letters -> String
unLetters
instance Listable Spaces where tiers :: [[Spaces]]
tiers = ([Space] -> Spaces) -> [[Spaces]]
forall a b. Listable a => (a -> b) -> [[b]]
cons1 (String -> Spaces
Spaces (String -> Spaces) -> ([Space] -> String) -> [Space] -> Spaces
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Space -> Char) -> [Space] -> String
forall a b. (a -> b) -> [a] -> [b]
map Space -> Char
unSpace)
instance Listable Lowers where tiers :: [[Lowers]]
tiers = ([Lower] -> Lowers) -> [[Lowers]]
forall a b. Listable a => (a -> b) -> [[b]]
cons1 (String -> Lowers
Lowers (String -> Lowers) -> ([Lower] -> String) -> [Lower] -> Lowers
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Lower -> Char) -> [Lower] -> String
forall a b. (a -> b) -> [a] -> [b]
map Lower -> Char
unLower)
instance Listable Uppers where tiers :: [[Uppers]]
tiers = ([Upper] -> Uppers) -> [[Uppers]]
forall a b. Listable a => (a -> b) -> [[b]]
cons1 (String -> Uppers
Uppers (String -> Uppers) -> ([Upper] -> String) -> [Upper] -> Uppers
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Upper -> Char) -> [Upper] -> String
forall a b. (a -> b) -> [a] -> [b]
map Upper -> Char
unUpper)
instance Listable Alphas where tiers :: [[Alphas]]
tiers = ([Alpha] -> Alphas) -> [[Alphas]]
forall a b. Listable a => (a -> b) -> [[b]]
cons1 (String -> Alphas
Alphas (String -> Alphas) -> ([Alpha] -> String) -> [Alpha] -> Alphas
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Alpha -> Char) -> [Alpha] -> String
forall a b. (a -> b) -> [a] -> [b]
map Alpha -> Char
unAlpha)
instance Listable Digits where tiers :: [[Digits]]
tiers = ([Digit] -> Digits) -> [[Digits]]
forall a b. Listable a => (a -> b) -> [[b]]
cons1 (String -> Digits
Digits (String -> Digits) -> ([Digit] -> String) -> [Digit] -> Digits
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Digit -> Char) -> [Digit] -> String
forall a b. (a -> b) -> [a] -> [b]
map Digit -> Char
unDigit)
instance Listable AlphaNums where tiers :: [[AlphaNums]]
tiers = ([AlphaNum] -> AlphaNums) -> [[AlphaNums]]
forall a b. Listable a => (a -> b) -> [[b]]
cons1 (String -> AlphaNums
AlphaNums (String -> AlphaNums)
-> ([AlphaNum] -> String) -> [AlphaNum] -> AlphaNums
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (AlphaNum -> Char) -> [AlphaNum] -> String
forall a b. (a -> b) -> [a] -> [b]
map AlphaNum -> Char
unAlphaNum)
instance Listable Letters where tiers :: [[Letters]]
tiers = ([Letter] -> Letters) -> [[Letters]]
forall a b. Listable a => (a -> b) -> [[b]]
cons1 (String -> Letters
Letters (String -> Letters) -> ([Letter] -> String) -> [Letter] -> Letters
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Letter -> Char) -> [Letter] -> String
forall a b. (a -> b) -> [a] -> [b]
map Letter -> Char
unLetter)
#if __GLASGOW_HASKELL__ == 708
deriving instance Typeable Int1
deriving instance Typeable Int2
deriving instance Typeable Int3
deriving instance Typeable Int4
deriving instance Typeable Word1
deriving instance Typeable Word2
deriving instance Typeable Word3
deriving instance Typeable Word4
deriving instance Typeable Nat
deriving instance Typeable Nat1
deriving instance Typeable Nat2
deriving instance Typeable Nat3
deriving instance Typeable Nat4
deriving instance Typeable Nat5
deriving instance Typeable Nat6
deriving instance Typeable Nat7
deriving instance Typeable Natural
deriving instance Typeable X
deriving instance Typeable Xs
deriving instance Typeable NoDup
deriving instance Typeable Bag
deriving instance Typeable Set
deriving instance Typeable Map
deriving instance Typeable Space
deriving instance Typeable Lower
deriving instance Typeable Upper
deriving instance Typeable Alpha
deriving instance Typeable Digit
deriving instance Typeable AlphaNum
deriving instance Typeable Letter
deriving instance Typeable Spaces
deriving instance Typeable Lowers
deriving instance Typeable Uppers
deriving instance Typeable Alphas
deriving instance Typeable Digits
deriving instance Typeable AlphaNums
deriving instance Typeable Letters
deriving instance Typeable A
deriving instance Typeable B
deriving instance Typeable C
deriving instance Typeable D
deriving instance Typeable E
deriving instance Typeable F
#endif