module Data.Express.Fixtures
(
module Data.Express
, b_, pp, qq, rr, pp'
, false
, true
, notE
, orE
, andE
, implies
, not'
, (-||-)
, (-&&-)
, (-==>-)
, (-==-)
, (-/=-)
, (-<=-)
, (-<-)
, compare'
, if'
, caseBool
, caseOrdering
, i_, xx, yy, zz, xx'
, ii, jj, kk, ii'
, ll, mm, nn
, zero, one, two, three, four, five, six
, seven, eight, nine, ten, eleven, twelve
, minusOne, minusTwo
, idE, negateE, absE, signumE
, idInt
, idBool
, idChar
, idInts
, idBools
, idString
, id', const', negate', abs', signum'
, plus, times, minus
, (-+-), (-*-)
, divE, modE, quotE, remE
, div', mod', quot', rem'
, ff, ffE
, gg, ggE
, hh, hhE
, oo, ooE
, ff2, ff3, ff4
, question
, (-?-)
, (-$-)
, odd'
, even'
, c_, cs_
, cc, dd, ccs
, ae, bee, cee, dee, zed, zee
, space, lineBreak
, ord'
, ordE
, is_
, xxs
, yys
, zzs
, nil
, emptyString
, nilInt
, nilBool
, nilChar
, cons
, consInt
, consBool
, consChar
, (-:-)
, unit
, (-++-)
, head'
, tail'
, null'
, length'
, init'
, elem'
, sort'
, insert'
, drop'
, take'
, bs_, pps, qqs
, and', or'
, sum', product'
, appendInt
, nothing
, nothingInt
, nothingBool
, just
, justInt
, justBool
, comma
, pair
, (-|-)
, triple
, quadruple
, quintuple
, sixtuple
, (-%-)
, compose
, mapE
, (-.-)
, map'
, foldr'
, filter'
, enumFrom', (-..)
, enumFromTo', (-..-)
, enumFromThen', (--..)
, enumFromThenTo', (--..-)
)
where
import Data.Express
import Data.Maybe
import Data.Typeable (Typeable, typeOf)
import Data.Char
import Data.List
import Data.Ratio
int :: Int
int :: Int
int = Int
forall a. HasCallStack => a
undefined
bool :: Bool
bool :: Bool
bool = Bool
forall a. HasCallStack => a
undefined
char :: Char
char :: Char
char = Char
forall a. HasCallStack => a
undefined
string :: String
string :: [Char]
string = [Char]
forall a. HasCallStack => a
undefined
b_ :: Expr
b_ :: Expr
b_ = Bool -> Expr
forall a. Typeable a => a -> Expr
hole Bool
bool
pp :: Expr
pp :: Expr
pp = [Char] -> Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"p" Bool
bool
qq :: Expr
qq :: Expr
qq = [Char] -> Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"q" Bool
bool
rr :: Expr
rr :: Expr
rr = [Char] -> Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"r" Bool
bool
pp' :: Expr
pp' :: Expr
pp' = [Char] -> Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"p'" Bool
bool
false :: Expr
false :: Expr
false = Bool -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Bool
False
true :: Expr
true :: Expr
true = Bool -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Bool
True
notE :: Expr
notE :: Expr
notE = [Char] -> Id Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"not" Id Bool
not
andE :: Expr
andE :: Expr
andE = [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"&&" Comparison Bool
(&&)
orE :: Expr
orE :: Expr
orE = [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"||" Comparison Bool
(||)
(-==>-) :: Expr -> Expr -> Expr
Expr
e1 -==>- :: Expr -> Expr -> Expr
-==>- Expr
e2 = Expr
implies Expr -> Expr -> Expr
:$ Expr
e1 Expr -> Expr -> Expr
:$ Expr
e2
infixr 0 -==>-
implies :: Expr
implies :: Expr
implies = [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==>" Comparison Bool
(==>)
where
Bool
False ==> :: Comparison Bool
==> Bool
_ = Bool
True
Bool
True ==> Bool
p = Bool
p
not' :: Expr -> Expr
not' :: Expr -> Expr
not' Expr
pp = Expr
notE Expr -> Expr -> Expr
:$ Expr
pp
(-&&-) :: Expr -> Expr -> Expr
Expr
pp -&&- :: Expr -> Expr -> Expr
-&&- Expr
qq = Expr
andE Expr -> Expr -> Expr
:$ Expr
pp Expr -> Expr -> Expr
:$ Expr
qq
infixr 3 -&&-
(-||-) :: Expr -> Expr -> Expr
Expr
pp -||- :: Expr -> Expr -> Expr
-||- Expr
qq = Expr
orE Expr -> Expr -> Expr
:$ Expr
pp Expr -> Expr -> Expr
:$ Expr
qq
infixr 2 -||-
i_ :: Expr
i_ :: Expr
i_ = Int -> Expr
forall a. Typeable a => a -> Expr
hole Int
int
xx :: Expr
xx :: Expr
xx = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"x" Int
int
yy :: Expr
yy :: Expr
yy = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"y" Int
int
zz :: Expr
zz :: Expr
zz = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"z" Int
int
xx' :: Expr
xx' :: Expr
xx' = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"x'" Int
int
ii :: Expr
ii :: Expr
ii = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"i" Int
int
jj :: Expr
jj :: Expr
jj = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"j" Int
int
kk :: Expr
kk :: Expr
kk = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"k" Int
int
ii' :: Expr
ii' :: Expr
ii' = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"i'" Int
int
ll :: Expr
ll :: Expr
ll = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"l" Int
int
mm :: Expr
mm :: Expr
mm = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"m" Int
int
nn :: Expr
nn :: Expr
nn = [Char] -> Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"n" Int
int
zero :: Expr
zero :: Expr
zero = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
0 :: Int)
one :: Expr
one :: Expr
one = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
1 :: Int)
two :: Expr
two :: Expr
two = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
2 :: Int)
three :: Expr
three :: Expr
three = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
3 :: Int)
four :: Expr
four :: Expr
four = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
4 :: Int)
five :: Expr
five :: Expr
five = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
5 :: Int)
six :: Expr
six :: Expr
six = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
6 :: Int)
seven :: Expr
seven :: Expr
seven = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
7 :: Int)
eight :: Expr
eight :: Expr
eight = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
8 :: Int)
nine :: Expr
nine :: Expr
nine = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
9 :: Int)
ten :: Expr
ten :: Expr
ten = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
10 :: Int)
eleven :: Expr
eleven :: Expr
eleven = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
11 :: Int)
twelve :: Expr
twelve :: Expr
twelve = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Int
12 :: Int)
minusOne :: Expr
minusOne :: Expr
minusOne = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (-Int
1 :: Int)
minusTwo :: Expr
minusTwo :: Expr
minusTwo = Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (-Int
2 :: Int)
ff :: Expr -> Expr
ff :: Expr -> Expr
ff = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"ff"
[ [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Int -> Int
forall a. HasCallStack => a
undefined :: F Int)
, [Char] -> Id Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Id Bool
forall a. HasCallStack => a
undefined :: F Bool)
, [Char] -> (Char -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Char -> Char
forall a. HasCallStack => a
undefined :: F Char)
, [Char] -> Sort Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Sort Int
forall a. HasCallStack => a
undefined :: F [Int])
, [Char] -> Sort Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Sort Bool
forall a. HasCallStack => a
undefined :: F [Bool])
, [Char] -> Sort Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Sort Char
forall a. HasCallStack => a
undefined :: F String)
]
type F a = a -> a
ffE :: Expr
ffE :: Expr
ffE = [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Int -> Int
forall a. HasCallStack => a
undefined :: Int -> Int)
gg :: Expr -> Expr
gg :: Expr -> Expr
gg = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"gg"
[ [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"g" (Int -> Int
forall a. HasCallStack => a
undefined :: F Int)
, [Char] -> Id Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"g" (Id Bool
forall a. HasCallStack => a
undefined :: F Bool)
, [Char] -> (Char -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"g" (Char -> Char
forall a. HasCallStack => a
undefined :: F Char)
, [Char] -> Sort Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"g" (Sort Int
forall a. HasCallStack => a
undefined :: F [Int])
, [Char] -> Sort Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"g" (Sort Bool
forall a. HasCallStack => a
undefined :: F [Bool])
, [Char] -> Sort Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"g" (Sort Char
forall a. HasCallStack => a
undefined :: F String)
]
ggE :: Expr
ggE :: Expr
ggE = [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"g" (Int -> Int
forall a. HasCallStack => a
undefined :: Int -> Int)
hh :: Expr -> Expr
hh :: Expr -> Expr
hh = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"hh"
[ [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"h" (Int -> Int
forall a. HasCallStack => a
undefined :: F Int)
, [Char] -> Id Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"h" (Id Bool
forall a. HasCallStack => a
undefined :: F Bool)
, [Char] -> (Char -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"h" (Char -> Char
forall a. HasCallStack => a
undefined :: F Char)
, [Char] -> Sort Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"h" (Sort Int
forall a. HasCallStack => a
undefined :: F [Int])
, [Char] -> Sort Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"h" (Sort Bool
forall a. HasCallStack => a
undefined :: F [Bool])
, [Char] -> Sort Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"h" (Sort Char
forall a. HasCallStack => a
undefined :: F String)
]
hhE :: Expr
hhE :: Expr
hhE = [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"h" (Int -> Int
forall a. HasCallStack => a
undefined :: Int -> Int)
ff2 :: Expr -> Expr -> Expr
ff2 :: Expr -> Expr -> Expr
ff2 = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"ff2"
[ [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Int -> Int -> Int
forall a. HasCallStack => a
undefined :: F21 Int)
, [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Comparison Bool
forall a. HasCallStack => a
undefined :: F21 Bool)
, [Char] -> (Char -> Char -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Char -> Char -> Char
forall a. HasCallStack => a
undefined :: F21 Char)
, [Char] -> Append Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Append Int
forall a. HasCallStack => a
undefined :: F21 [Int])
, [Char] -> Append Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Append Bool
forall a. HasCallStack => a
undefined :: F21 [Bool])
, [Char] -> Append Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Append Char
forall a. HasCallStack => a
undefined :: F21 String)
, [Char] -> Take Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Take Int
forall a. HasCallStack => a
undefined :: F2 Int [Int])
, [Char] -> Insert Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Insert Bool
forall a. HasCallStack => a
undefined :: F2 Bool [Bool])
, [Char] -> Insert Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (Insert Char
forall a. HasCallStack => a
undefined :: F2 Char [Char])
, [Char] -> F2 [Int] Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F2 [Int] Int
forall a. HasCallStack => a
undefined :: F2 [Int] Int)
, [Char] -> F2 [Bool] Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F2 [Bool] Bool
forall a. HasCallStack => a
undefined :: F2 [Bool] Bool)
, [Char] -> F2 [Char] Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F2 [Char] Char
forall a. HasCallStack => a
undefined :: F2 [Char] Char)
, [Char] -> F2 Int Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F2 Int Bool
forall a. HasCallStack => a
undefined :: F2 Int Bool)
, [Char] -> F2 Bool Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F2 Bool Int
forall a. HasCallStack => a
undefined :: F2 Bool Int)
]
type F2 a b = a -> b -> b
type F21 a = F2 a a
ff3 :: Expr -> Expr -> Expr -> Expr
ff3 :: Expr -> Expr -> Expr -> Expr
ff3 = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
"ff3"
[ [Char] -> F31 Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F31 Int
forall a. HasCallStack => a
undefined :: F31 Int)
, [Char] -> CaseB Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (CaseB Bool
forall a. HasCallStack => a
undefined :: F31 Bool)
, [Char] -> F31 Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F31 Char
forall a. HasCallStack => a
undefined :: F31 Char)
, [Char] -> F31 [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F31 [Int]
forall a. HasCallStack => a
undefined :: F31 [Int])
, [Char] -> F31 [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F31 [Bool]
forall a. HasCallStack => a
undefined :: F31 [Bool])
, [Char] -> F31 [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F31 [Char]
forall a. HasCallStack => a
undefined :: F31 String)
, [Char] -> F3 Int Int [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F3 Int Int [Int]
forall a. HasCallStack => a
undefined :: F3 Int Int [Int])
, [Char] -> F3 Int [Int] Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F3 Int [Int] Int
forall a. HasCallStack => a
undefined :: F3 Int [Int] Int)
, [Char] -> F3 [Int] Int Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F3 [Int] Int Int
forall a. HasCallStack => a
undefined :: F3 [Int] Int Int)
, [Char] -> F3 Int [Int] [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F3 Int [Int] [Int]
forall a. HasCallStack => a
undefined :: F3 Int [Int] [Int])
, [Char] -> F3 [Int] Int [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F3 [Int] Int [Int]
forall a. HasCallStack => a
undefined :: F3 [Int] Int [Int])
, [Char] -> F3 [Int] [Int] Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F3 [Int] [Int] Int
forall a. HasCallStack => a
undefined :: F3 [Int] [Int] Int)
]
type F3 a b c = a -> b -> c -> c
type F31 a = F3 a a a
ff4 :: Expr -> Expr -> Expr -> Expr -> Expr
ff4 :: Expr -> Expr -> Expr -> Expr -> Expr
ff4 = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr
mk4 [Char]
"ff4"
[ [Char] -> F41 Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F41 Int
forall a. HasCallStack => a
undefined :: F41 Int)
, [Char] -> F41 Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F41 Bool
forall a. HasCallStack => a
undefined :: F41 Bool)
, [Char] -> F41 Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F41 Char
forall a. HasCallStack => a
undefined :: F41 Char)
, [Char] -> F41 [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F41 [Int]
forall a. HasCallStack => a
undefined :: F41 [Int])
, [Char] -> F41 [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F41 [Bool]
forall a. HasCallStack => a
undefined :: F41 [Bool])
, [Char] -> F41 [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F41 [Char]
forall a. HasCallStack => a
undefined :: F41 String)
, [Char] -> F4 Int Int Int [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 Int Int Int [Int]
forall a. HasCallStack => a
undefined :: F4 Int Int Int [Int])
, [Char] -> F4 Int Int [Int] Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 Int Int [Int] Int
forall a. HasCallStack => a
undefined :: F4 Int Int [Int] Int)
, [Char] -> F4 Int [Int] Int Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 Int [Int] Int Int
forall a. HasCallStack => a
undefined :: F4 Int [Int] Int Int)
, [Char] -> F4 [Int] Int Int Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 [Int] Int Int Int
forall a. HasCallStack => a
undefined :: F4 [Int] Int Int Int)
, [Char] -> F4 Int [Int] [Int] [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 Int [Int] [Int] [Int]
forall a. HasCallStack => a
undefined :: F4 Int [Int] [Int] [Int])
, [Char] -> F4 [Int] Int [Int] [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 [Int] Int [Int] [Int]
forall a. HasCallStack => a
undefined :: F4 [Int] Int [Int] [Int])
, [Char] -> F4 [Int] [Int] Int [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 [Int] [Int] Int [Int]
forall a. HasCallStack => a
undefined :: F4 [Int] [Int] Int [Int])
, [Char] -> F4 [Int] [Int] [Int] Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 [Int] [Int] [Int] Int
forall a. HasCallStack => a
undefined :: F4 [Int] [Int] [Int] Int)
, [Char] -> F4 Int Int [Int] [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 Int Int [Int] [Int]
forall a. HasCallStack => a
undefined :: F4 Int Int [Int] [Int])
, [Char] -> F4 [Int] [Int] Int Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"f" (F4 [Int] [Int] Int Int
forall a. HasCallStack => a
undefined :: F4 [Int] [Int] Int Int)
]
type F4 a b c d = a -> b -> c -> d -> d
type F41 a = F4 a a a a
(-?-) :: Expr -> Expr -> Expr
-?- :: Expr -> Expr -> Expr
(-?-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-?-)"
[ [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Int -> Int -> Int
forall a. HasCallStack => a
undefined :: Int -> Int -> Int)
, [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Comparison Bool
forall a. HasCallStack => a
undefined :: Bool -> Bool -> Bool)
, [Char] -> (Char -> Char -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Char -> Char -> Char
forall a. HasCallStack => a
undefined :: Char -> Char -> Char)
, [Char] -> Append Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Append Int
forall a. HasCallStack => a
undefined :: [Int] -> [Int] -> [Int])
, [Char] -> Append Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Append Char
forall a. HasCallStack => a
undefined :: String -> String -> String)
, [Char] -> Take Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Take Int
forall a. HasCallStack => a
undefined :: Int -> [Int] -> [Int])
, [Char] -> Insert Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Insert Char
forall a. HasCallStack => a
undefined :: Char -> String -> String)
]
question :: Expr
question :: Expr
question = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Int -> Int -> Int
forall a. HasCallStack => a
undefined :: Int -> Int -> Int)
oo :: Expr -> Expr -> Expr
oo :: Expr -> Expr -> Expr
oo = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"oo"
[ [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" (Int -> Int -> Int
forall a. HasCallStack => a
undefined :: Int -> Int -> Int)
, [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" (Comparison Bool
forall a. HasCallStack => a
undefined :: Bool -> Bool -> Bool)
, [Char] -> (Char -> Char -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" (Char -> Char -> Char
forall a. HasCallStack => a
undefined :: Char -> Char -> Char)
, [Char] -> Append Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" (Append Int
forall a. HasCallStack => a
undefined :: [Int] -> [Int] -> [Int])
, [Char] -> Append Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" (Append Char
forall a. HasCallStack => a
undefined :: String -> String -> String)
]
ooE :: Expr
ooE :: Expr
ooE = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" (Int -> Int -> Int
forall a. HasCallStack => a
undefined :: Int -> Int -> Int)
(-+-) :: Expr -> Expr -> Expr
Expr
e1 -+- :: Expr -> Expr -> Expr
-+- Expr
e2 = Expr
plus Expr -> Expr -> Expr
:$ Expr
e1 Expr -> Expr -> Expr
:$ Expr
e2
infixl 6 -+-
plus :: Expr
plus :: Expr
plus = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"+" (Int -> Int -> Int
forall a. Num a => a -> a -> a
(+) :: Int -> Int -> Int)
(-*-) :: Expr -> Expr -> Expr
Expr
e1 -*- :: Expr -> Expr -> Expr
-*- Expr
e2 = Expr
times Expr -> Expr -> Expr
:$ Expr
e1 Expr -> Expr -> Expr
:$ Expr
e2
infixl 7 -*-
times :: Expr
times :: Expr
times = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"*" (Int -> Int -> Int
forall a. Num a => a -> a -> a
(*) :: Int -> Int -> Int)
minus :: Expr
minus :: Expr
minus = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"-" ((-) :: Int -> Int -> Int)
div' :: Expr -> Expr -> Expr
Expr
ex div' :: Expr -> Expr -> Expr
`div'` Expr
ey = Expr
divE Expr -> Expr -> Expr
:$ Expr
ex Expr -> Expr -> Expr
:$ Expr
ey
divE :: Expr
divE :: Expr
divE = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"`div`" (Int -> Int -> Int
forall a. Integral a => a -> a -> a
div :: Int -> Int -> Int)
mod' :: Expr -> Expr -> Expr
Expr
ex mod' :: Expr -> Expr -> Expr
`mod'` Expr
ey = Expr
modE Expr -> Expr -> Expr
:$ Expr
ex Expr -> Expr -> Expr
:$ Expr
ey
modE :: Expr
modE :: Expr
modE = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"`mod`" (Int -> Int -> Int
forall a. Integral a => a -> a -> a
mod :: Int -> Int -> Int)
quot' :: Expr -> Expr -> Expr
Expr
ex quot' :: Expr -> Expr -> Expr
`quot'` Expr
ey = Expr
quotE Expr -> Expr -> Expr
:$ Expr
ex Expr -> Expr -> Expr
:$ Expr
ey
quotE :: Expr
quotE :: Expr
quotE = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"`quot`" (Int -> Int -> Int
forall a. Integral a => a -> a -> a
quot :: Int -> Int -> Int)
rem' :: Expr -> Expr -> Expr
Expr
ex rem' :: Expr -> Expr -> Expr
`rem'` Expr
ey = Expr
remE Expr -> Expr -> Expr
:$ Expr
ex Expr -> Expr -> Expr
:$ Expr
ey
remE :: Expr
remE :: Expr
remE = [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"`rem`" (Int -> Int -> Int
forall a. Integral a => a -> a -> a
rem :: Int -> Int -> Int)
id' :: Expr -> Expr
id' :: Expr -> Expr
id' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"id'"
[ Expr
idInt
, Expr
idBool
, Expr
idChar
, Expr
idInts
, Expr
idBools
, Expr
idString
]
idE :: Expr
idE :: Expr
idE = Expr
idInt
idInt,idBool,idChar,idInts,idBools,idString :: Expr
idInt :: Expr
idInt = [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Int -> Int
forall a. a -> a
id :: Id Int)
idBool :: Expr
idBool = [Char] -> Id Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Id Bool
forall a. a -> a
id :: Id Bool)
idChar :: Expr
idChar = [Char] -> (Char -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Char -> Char
forall a. a -> a
id :: Id Char)
idInts :: Expr
idInts = [Char] -> Sort Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Sort Int
forall a. a -> a
id :: Id [Int])
idBools :: Expr
idBools = [Char] -> Sort Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Sort Bool
forall a. a -> a
id :: Id [Bool])
idString :: Expr
idString = [Char] -> Sort Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Sort Char
forall a. a -> a
id :: Id String)
type Id a = a -> a
const' :: Expr -> Expr -> Expr
const' :: Expr -> Expr -> Expr
const' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"const'"
[ [Char] -> (Int -> Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" (Int -> Int -> Int
forall a b. a -> b -> a
const :: Int -> Int -> Int)
, [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" (Comparison Bool
forall a b. a -> b -> a
const :: Bool -> Bool -> Bool)
, [Char] -> (Char -> Char -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" (Char -> Char -> Char
forall a b. a -> b -> a
const :: Char -> Char -> Char)
, [Char] -> Append Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" (Append Int
forall a b. a -> b -> a
const :: [Int] -> [Int] -> [Int])
, [Char] -> Append Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" (Append Bool
forall a b. a -> b -> a
const :: [Bool] -> [Bool] -> [Bool])
, [Char] -> Append Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" (Append Char
forall a b. a -> b -> a
const :: String -> String -> String)
]
negate' :: Expr -> Expr
negate' :: Expr -> Expr
negate' Expr
e = Expr
negateE Expr -> Expr -> Expr
:$ Expr
e
negateE :: Expr
negateE :: Expr
negateE = [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"negate" (Int -> Int
forall a. Num a => a -> a
negate :: Int -> Int)
abs' :: Expr -> Expr
abs' :: Expr -> Expr
abs' Expr
e = Expr
absE Expr -> Expr -> Expr
:$ Expr
e
absE :: Expr
absE :: Expr
absE = [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"abs" (Int -> Int
forall a. Num a => a -> a
abs :: Int -> Int)
signum' :: Expr -> Expr
signum' :: Expr -> Expr
signum' Expr
e = Expr
signumE Expr -> Expr -> Expr
:$ Expr
e
signumE :: Expr
signumE :: Expr
signumE = [Char] -> (Int -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"signum" (Int -> Int
forall a. Num a => a -> a
signum :: Int -> Int)
odd' :: Expr -> Expr
odd' :: Expr -> Expr
odd' = (Expr
oddE Expr -> Expr -> Expr
:$) where oddE :: Expr
oddE = [Char] -> (Int -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"odd" (Int -> Bool
forall a. Integral a => a -> Bool
odd :: Int -> Bool)
even' :: Expr -> Expr
even' :: Expr -> Expr
even' = (Expr
evenE Expr -> Expr -> Expr
:$) where evenE :: Expr
evenE = [Char] -> (Int -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"even" (Int -> Bool
forall a. Integral a => a -> Bool
even :: Int -> Bool)
c_ :: Expr
c_ :: Expr
c_ = Char -> Expr
forall a. Typeable a => a -> Expr
hole Char
char
cs_ :: Expr
cs_ :: Expr
cs_ = [Char] -> Expr
forall a. Typeable a => a -> Expr
hole [Char
char]
cc :: Expr
cc :: Expr
cc = [Char] -> Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"c" Char
char
dd :: Expr
dd :: Expr
dd = [Char] -> Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"d" Char
char
ccs :: Expr
ccs :: Expr
ccs = [Char] -> [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"cs" [Char
char]
ae :: Expr
ae :: Expr
ae = Char -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Char
'a'
bee :: Expr
bee :: Expr
bee = Char -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Char
'b'
cee :: Expr
cee :: Expr
cee = Char -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Char
'c'
dee :: Expr
dee :: Expr
dee = Char -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Char
'd'
zed :: Expr
zed :: Expr
zed = Char -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Char
'z'
zee :: Expr
zee :: Expr
zee = Char -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Char
'z'
space :: Expr
space :: Expr
space = Char -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Char
' '
lineBreak :: Expr
lineBreak :: Expr
lineBreak = Char -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val Char
'\n'
ord' :: Expr -> Expr
ord' :: Expr -> Expr
ord' = (Expr
ordE Expr -> Expr -> Expr
:$)
ordE :: Expr
ordE :: Expr
ordE = [Char] -> (Char -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"ord" Char -> Int
ord
is_ :: Expr
is_ :: Expr
is_ = [Int] -> Expr
forall a. Typeable a => a -> Expr
hole [Int
int]
xxs :: Expr
xxs :: Expr
xxs = [Char] -> [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"xs" [Int
int]
yys :: Expr
yys :: Expr
yys = [Char] -> [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"ys" [Int
int]
zzs :: Expr
zzs :: Expr
zzs = [Char] -> [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"zs" [Int
int]
nil :: Expr
nil :: Expr
nil = Expr
nilInt
emptyString :: Expr
emptyString :: Expr
emptyString = [Char] -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val [Char]
""
nilInt, nilBool, nilChar :: Expr
nilInt :: Expr
nilInt = [Int] -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val ([] :: [Int])
nilBool :: Expr
nilBool = [Bool] -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val ([] :: [Bool])
nilChar :: Expr
nilChar = [Char] -> [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"[]" ([] :: [Char])
nilInts :: Expr
nilInts = [[Int]] -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val ([] :: [[Int]])
cons :: Expr
cons :: Expr
cons = Expr
consInt
consInt, consBool, consChar :: Expr
consInt :: Expr
consInt = [Char] -> Take Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons Int)
consBool :: Expr
consBool = [Char] -> Insert Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons Bool)
consChar :: Expr
consChar = [Char] -> Insert Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons Char)
type Cons a = a -> [a] -> [a]
unit :: Expr -> Expr
unit :: Expr -> Expr
unit Expr
e = Expr
e Expr -> Expr -> Expr
-:- Expr
nil'
where
nil' :: Expr
nil' | Expr -> TypeRep
typ Expr
e TypeRep -> TypeRep -> Bool
forall a. Eq a => a -> a -> Bool
== Expr -> TypeRep
typ Expr
i_ = Expr
nilInt
| Expr -> TypeRep
typ Expr
e TypeRep -> TypeRep -> Bool
forall a. Eq a => a -> a -> Bool
== Expr -> TypeRep
typ Expr
c_ = Expr
emptyString
| Expr -> TypeRep
typ Expr
e TypeRep -> TypeRep -> Bool
forall a. Eq a => a -> a -> Bool
== Expr -> TypeRep
typ Expr
b_ = Expr
nilBool
| Expr -> TypeRep
typ Expr
e TypeRep -> TypeRep -> Bool
forall a. Eq a => a -> a -> Bool
== Expr -> TypeRep
typ Expr
is_ = Expr
nilInts
| Bool
otherwise = [Char] -> [Expr] -> [Expr] -> Expr
err [Char]
"unit" [Expr
e] [Expr
nil,Expr
emptyString,Expr
nilBool,Expr
nilInts]
(-:-) :: Expr -> Expr -> Expr
-:- :: Expr -> Expr -> Expr
(-:-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-:-)"
[ Expr
consInt
, Expr
consBool
, Expr
consChar
, [Char] -> Insert [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons [Int])
, [Char] -> Insert [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons [Bool])
, [Char] -> Insert [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons String)
, [Char] -> Insert (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons (Int,Int))
, [Char] -> Cons (Bool, Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons (Bool,Bool))
, [Char] -> Cons (Char, Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons (Char,Char))
, [Char] -> Insert (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons (Maybe Int))
, [Char] -> Cons (Either Int Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons (Either Int Int))
]
infixr 5 -:-
appendInt :: Expr
appendInt :: Expr
appendInt = [Char] -> Append Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append Int
forall a. [a] -> [a] -> [a]
(++) :: [Int] -> [Int] -> [Int])
(-++-) :: Expr -> Expr -> Expr
-++- :: Expr -> Expr -> Expr
(-++-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-++-)"
[ [Char] -> Append Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append Int
forall a. [a] -> [a] -> [a]
(++) :: Append Int)
, [Char] -> Append Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append Char
forall a. [a] -> [a] -> [a]
(++) :: Append Char)
, [Char] -> Append Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append Bool
forall a. [a] -> [a] -> [a]
(++) :: Append Bool)
, [Char] -> Append [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append [Int]
forall a. [a] -> [a] -> [a]
(++) :: Append [Int])
, [Char] -> Append [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append [Char]
forall a. [a] -> [a] -> [a]
(++) :: Append [Char])
, [Char] -> Append [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append [Bool]
forall a. [a] -> [a] -> [a]
(++) :: Append [Bool])
, [Char] -> Append (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append (Int, Int)
forall a. [a] -> [a] -> [a]
(++) :: Append (Int,Int))
, [Char] -> Append (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" (Append (Maybe Int)
forall a. [a] -> [a] -> [a]
(++) :: Append (Maybe Int))
]
infixr 5 -++-
type Append a = [a] -> [a] -> [a]
head' :: Expr -> Expr
head' :: Expr -> Expr
head' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"head'"
[ [Char] -> Length Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" (Length Int
forall a. HasCallStack => [a] -> a
head :: Head Int)
, [Char] -> Head Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" (Head Char
forall a. HasCallStack => [a] -> a
head :: Head Char)
, [Char] -> Null Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" (Null Bool
forall a. HasCallStack => [a] -> a
head :: Head Bool)
, [Char] -> Head [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" (Head [Int]
forall a. HasCallStack => [a] -> a
head :: Head [Int])
, [Char] -> Head [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" (Head [Char]
forall a. HasCallStack => [a] -> a
head :: Head [Char])
, [Char] -> Head [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" (Head [Bool]
forall a. HasCallStack => [a] -> a
head :: Head [Bool])
, [Char] -> Head (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" (Head (Int, Int)
forall a. HasCallStack => [a] -> a
head :: Head (Int,Int))
, [Char] -> Head (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" (Head (Maybe Int)
forall a. HasCallStack => [a] -> a
head :: Head (Maybe Int))
]
type Head a = [a] -> a
tail' :: Expr -> Expr
tail' :: Expr -> Expr
tail' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"tail'"
[ [Char] -> Sort Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Sort Int
forall a. HasCallStack => [a] -> [a]
tail :: Tail Int)
, [Char] -> Sort Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Sort Char
forall a. HasCallStack => [a] -> [a]
tail :: Tail Char)
, [Char] -> Sort Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Sort Bool
forall a. HasCallStack => [a] -> [a]
tail :: Tail Bool)
, [Char] -> Sort [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Sort [Int]
forall a. HasCallStack => [a] -> [a]
tail :: Tail [Int])
, [Char] -> Sort [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Sort [Char]
forall a. HasCallStack => [a] -> [a]
tail :: Tail [Char])
, [Char] -> Sort [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Sort [Bool]
forall a. HasCallStack => [a] -> [a]
tail :: Tail [Bool])
, [Char] -> Sort (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Sort (Int, Int)
forall a. HasCallStack => [a] -> [a]
tail :: Tail (Int,Int))
, [Char] -> Sort (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Sort (Maybe Int)
forall a. HasCallStack => [a] -> [a]
tail :: Tail (Maybe Int))
]
type Tail a = [a] -> [a]
null' :: Expr -> Expr
null' :: Expr -> Expr
null' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"null'"
[ [Char] -> Null Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" (Null Int
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: Null Int)
, [Char] -> Null Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" (Null Char
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: Null Char)
, [Char] -> Null Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" (Null Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: Null Bool)
, [Char] -> Null [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" (Null [Int]
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: Null [Int])
, [Char] -> Null [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" (Null [Char]
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: Null [Char])
, [Char] -> Null [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" (Null [Bool]
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: Null [Bool])
, [Char] -> Null (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" (Null (Int, Int)
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: Null (Int,Int))
, [Char] -> Null (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" (Null (Maybe Int)
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: Null (Maybe Int))
]
type Null a = [a] -> Bool
length' :: Expr -> Expr
length' :: Expr -> Expr
length' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"length'"
[ [Char] -> Length Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" (Length Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: Length Int)
, [Char] -> Length Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" (Length Char
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: Length Char)
, [Char] -> Length Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" (Length Bool
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: Length Bool)
, [Char] -> Length [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" (Length [Int]
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: Length [Int])
, [Char] -> Length [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" (Length [Char]
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: Length [Char])
, [Char] -> Length [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" (Length [Bool]
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: Length [Bool])
, [Char] -> Length (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" (Length (Int, Int)
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: Length (Int,Int))
, [Char] -> Length (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" (Length (Maybe Int)
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: Length (Maybe Int))
]
type Length a = [a] -> Int
init' :: Expr -> Expr
init' :: Expr -> Expr
init' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"init'"
[ [Char] -> Sort Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Sort Int
forall a. HasCallStack => [a] -> [a]
init :: Init Int)
, [Char] -> Sort Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Sort Char
forall a. HasCallStack => [a] -> [a]
init :: Init Char)
, [Char] -> Sort Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Sort Bool
forall a. HasCallStack => [a] -> [a]
init :: Init Bool)
, [Char] -> Sort [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Sort [Int]
forall a. HasCallStack => [a] -> [a]
init :: Init [Int])
, [Char] -> Sort [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Sort [Char]
forall a. HasCallStack => [a] -> [a]
init :: Init [Char])
, [Char] -> Sort [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Sort [Bool]
forall a. HasCallStack => [a] -> [a]
init :: Init [Bool])
, [Char] -> Sort (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Sort (Int, Int)
forall a. HasCallStack => [a] -> [a]
init :: Init (Int,Int))
, [Char] -> Sort (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Sort (Maybe Int)
forall a. HasCallStack => [a] -> [a]
init :: Init (Maybe Int))
]
type Init a = Tail a
sort' :: Expr -> Expr
sort' :: Expr -> Expr
sort' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"sort'"
[ [Char] -> Sort Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Sort Int
forall a. Ord a => [a] -> [a]
sort :: Sort Int)
, [Char] -> Sort Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Sort Char
forall a. Ord a => [a] -> [a]
sort :: Sort Char)
, [Char] -> Sort Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Sort Bool
forall a. Ord a => [a] -> [a]
sort :: Sort Bool)
, [Char] -> Sort [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Sort [Int]
forall a. Ord a => [a] -> [a]
sort :: Sort [Int])
, [Char] -> Sort [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Sort [Char]
forall a. Ord a => [a] -> [a]
sort :: Sort [Char])
, [Char] -> Sort [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Sort [Bool]
forall a. Ord a => [a] -> [a]
sort :: Sort [Bool])
, [Char] -> Sort (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Sort (Int, Int)
forall a. Ord a => [a] -> [a]
sort :: Sort (Int,Int))
, [Char] -> Sort (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Sort (Maybe Int)
forall a. Ord a => [a] -> [a]
sort :: Sort (Maybe Int))
]
type Sort a = Tail a
insert' :: Expr -> Expr -> Expr
insert' :: Expr -> Expr -> Expr
insert' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"insert'"
[ [Char] -> Take Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Take Int
forall a. Ord a => a -> [a] -> [a]
insert :: Insert Int)
, [Char] -> Insert Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Insert Char
forall a. Ord a => a -> [a] -> [a]
insert :: Insert Char)
, [Char] -> Insert Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Insert Bool
forall a. Ord a => a -> [a] -> [a]
insert :: Insert Bool)
, [Char] -> Insert [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Insert [Int]
forall a. Ord a => a -> [a] -> [a]
insert :: Insert [Int])
, [Char] -> Insert [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Insert [Char]
forall a. Ord a => a -> [a] -> [a]
insert :: Insert [Char])
, [Char] -> Insert [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Insert [Bool]
forall a. Ord a => a -> [a] -> [a]
insert :: Insert [Bool])
, [Char] -> Insert (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Insert (Int, Int)
forall a. Ord a => a -> [a] -> [a]
insert :: Insert (Int,Int))
, [Char] -> Insert (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Insert (Maybe Int)
forall a. Ord a => a -> [a] -> [a]
insert :: Insert (Maybe Int))
]
type Insert a = Cons a
elem' :: Expr -> Expr -> Expr
elem' :: Expr -> Expr -> Expr
elem' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"elem'"
[ [Char] -> Elem Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Elem Int
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Elem Int)
, [Char] -> Elem Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Elem Char
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Elem Char)
, [Char] -> Elem Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Elem Bool
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Elem Bool)
, [Char] -> Elem [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Elem [Int]
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Elem [Int])
, [Char] -> Elem [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Elem [Char]
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Elem [Char])
, [Char] -> Elem [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Elem [Bool]
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Elem [Bool])
, [Char] -> Elem (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Elem (Int, Int)
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Elem (Int,Int))
, [Char] -> Elem (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Elem (Maybe Int)
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Elem (Maybe Int))
]
type Elem a = a -> [a] -> Bool
drop' :: Expr -> Expr -> Expr
drop' :: Expr -> Expr -> Expr
drop' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"drop'"
[ [Char] -> Take Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"drop" (Take Int
forall a. Int -> [a] -> [a]
drop :: Drop Int)
, [Char] -> Take Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"drop" (Take Char
forall a. Int -> [a] -> [a]
drop :: Drop Char)
, [Char] -> Take Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"drop" (Take Bool
forall a. Int -> [a] -> [a]
drop :: Drop Bool)
, [Char] -> Take [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"drop" (Take [Int]
forall a. Int -> [a] -> [a]
drop :: Drop [Int])
, [Char] -> Take [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"drop" (Take [Char]
forall a. Int -> [a] -> [a]
drop :: Drop [Char])
, [Char] -> Take [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"drop" (Take [Bool]
forall a. Int -> [a] -> [a]
drop :: Drop [Bool])
, [Char] -> Take (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"drop" (Take (Int, Int)
forall a. Int -> [a] -> [a]
drop :: Drop (Int,Int))
, [Char] -> Take (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"drop" (Take (Maybe Int)
forall a. Int -> [a] -> [a]
drop :: Drop (Maybe Int))
]
type Drop a = Int -> [a] -> [a]
take' :: Expr -> Expr -> Expr
take' :: Expr -> Expr -> Expr
take' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"take'"
[ [Char] -> Take Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"take" (Take Int
forall a. Int -> [a] -> [a]
take :: Take Int)
, [Char] -> Take Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"take" (Take Char
forall a. Int -> [a] -> [a]
take :: Take Char)
, [Char] -> Take Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"take" (Take Bool
forall a. Int -> [a] -> [a]
take :: Take Bool)
, [Char] -> Take [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"take" (Take [Int]
forall a. Int -> [a] -> [a]
take :: Take [Int])
, [Char] -> Take [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"take" (Take [Char]
forall a. Int -> [a] -> [a]
take :: Take [Char])
, [Char] -> Take [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"take" (Take [Bool]
forall a. Int -> [a] -> [a]
take :: Take [Bool])
, [Char] -> Take (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"take" (Take (Int, Int)
forall a. Int -> [a] -> [a]
take :: Take (Int,Int))
, [Char] -> Take (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"take" (Take (Maybe Int)
forall a. Int -> [a] -> [a]
take :: Take (Maybe Int))
]
type Take a = Int -> [a] -> [a]
(-$-) :: Expr -> Expr -> Expr
-$- :: Expr -> Expr -> Expr
(-$-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-$-)"
[ [Char] -> Apply Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply Int
forall a b. (a -> b) -> a -> b
($) :: Apply Int)
, [Char] -> Apply Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply Bool
forall a b. (a -> b) -> a -> b
($) :: Apply Bool)
, [Char] -> Apply Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply Char
forall a b. (a -> b) -> a -> b
($) :: Apply Char)
, [Char] -> Apply [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply [Int]
forall a b. (a -> b) -> a -> b
($) :: Apply [Int])
, [Char] -> Apply [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply [Bool]
forall a b. (a -> b) -> a -> b
($) :: Apply [Bool])
, [Char] -> Apply [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply [Char]
forall a b. (a -> b) -> a -> b
($) :: Apply [Char])
, [Char] -> Apply (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply (Int, Int)
forall a b. (a -> b) -> a -> b
($) :: Apply (Int,Int))
, [Char] -> Apply (Bool, Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply (Bool, Bool)
forall a b. (a -> b) -> a -> b
($) :: Apply (Bool,Bool))
, [Char] -> Apply (Char, Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply (Char, Char)
forall a b. (a -> b) -> a -> b
($) :: Apply (Char,Char))
, [Char] -> Apply (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"$" (Apply (Maybe Int)
forall a b. (a -> b) -> a -> b
($) :: Apply (Maybe Int))
]
infixl 6 -$-
type Apply a = (a -> a) -> a -> a
(-==-) :: Expr -> Expr -> Expr
-==- :: Expr -> Expr -> Expr
(-==-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-==-)"
[ [Char] -> Comparison () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison ()
forall a. Eq a => a -> a -> Bool
(==) :: Comparison ())
, [Char] -> Comparison Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison Int
forall a. Eq a => a -> a -> Bool
(==) :: Comparison Int)
, [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison Bool
forall a. Eq a => a -> a -> Bool
(==) :: Comparison Bool)
, [Char] -> Comparison Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison Char
forall a. Eq a => a -> a -> Bool
(==) :: Comparison Char)
, [Char] -> Comparison [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison [Int]
forall a. Eq a => a -> a -> Bool
(==) :: Comparison [Int])
, [Char] -> Comparison [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison [Bool]
forall a. Eq a => a -> a -> Bool
(==) :: Comparison [Bool])
, [Char] -> Comparison [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison [Char]
forall a. Eq a => a -> a -> Bool
(==) :: Comparison [Char])
, [Char] -> Comparison [[Int]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison [[Int]]
forall a. Eq a => a -> a -> Bool
(==) :: Comparison [[Int]])
, [Char] -> Comparison [[Bool]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison [[Bool]]
forall a. Eq a => a -> a -> Bool
(==) :: Comparison [[Bool]])
, [Char] -> Comparison [[Char]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison [[Char]]
forall a. Eq a => a -> a -> Bool
(==) :: Comparison [[Char]])
, [Char] -> Comparison (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison (Int, Int)
forall a. Eq a => a -> a -> Bool
(==) :: Comparison (Int,Int))
, [Char] -> Comparison (Bool, Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison (Bool, Bool)
forall a. Eq a => a -> a -> Bool
(==) :: Comparison (Bool,Bool))
, [Char] -> Comparison (Char, Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison (Char, Char)
forall a. Eq a => a -> a -> Bool
(==) :: Comparison (Char,Char))
, [Char] -> Comparison (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison (Maybe Int)
forall a. Eq a => a -> a -> Bool
(==) :: Comparison (Maybe Int))
, [Char] -> Comparison (Int, Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Comparison (Int, Int, Int)
forall a. Eq a => a -> a -> Bool
(==) :: Comparison (Int,Int,Int))
]
infix 4 -==-
type Comparison a = a -> a -> Bool
(-/=-) :: Expr -> Expr -> Expr
-/=- :: Expr -> Expr -> Expr
(-/=-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-/=-)"
[ [Char] -> Comparison () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison ()
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison ())
, [Char] -> Comparison Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison Int
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison Int)
, [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison Bool
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison Bool)
, [Char] -> Comparison Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison Char
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison Char)
, [Char] -> Comparison [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison [Int]
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison [Int])
, [Char] -> Comparison [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison [Bool]
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison [Bool])
, [Char] -> Comparison [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison [Char]
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison [Char])
, [Char] -> Comparison [[Int]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison [[Int]]
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison [[Int]])
, [Char] -> Comparison [[Bool]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison [[Bool]]
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison [[Bool]])
, [Char] -> Comparison [[Char]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison [[Char]]
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison [[Char]])
, [Char] -> Comparison (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison (Int, Int)
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison (Int,Int))
, [Char] -> Comparison (Bool, Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison (Bool, Bool)
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison (Bool,Bool))
, [Char] -> Comparison (Char, Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison (Char, Char)
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison (Char,Char))
, [Char] -> Comparison (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison (Maybe Int)
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison (Maybe Int))
, [Char] -> Comparison (Int, Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Comparison (Int, Int, Int)
forall a. Eq a => a -> a -> Bool
(/=) :: Comparison (Int,Int,Int))
]
infix 4 -/=-
(-<=-) :: Expr -> Expr -> Expr
-<=- :: Expr -> Expr -> Expr
(-<=-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-<=-)"
[ [Char] -> Comparison () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison ()
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison ())
, [Char] -> Comparison Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison Int
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison Int)
, [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison Bool
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison Bool)
, [Char] -> Comparison Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison Char
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison Char)
, [Char] -> Comparison [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison [Int]
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison [Int])
, [Char] -> Comparison [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison [Bool]
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison [Bool])
, [Char] -> Comparison [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison [Char]
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison [Char])
, [Char] -> Comparison [[Int]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison [[Int]]
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison [[Int]])
, [Char] -> Comparison [[Bool]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison [[Bool]]
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison [[Bool]])
, [Char] -> Comparison [[Char]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison [[Char]]
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison [[Char]])
, [Char] -> Comparison (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison (Int, Int)
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison (Int,Int))
, [Char] -> Comparison (Bool, Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison (Bool, Bool)
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison (Bool,Bool))
, [Char] -> Comparison (Char, Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison (Char, Char)
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison (Char,Char))
, [Char] -> Comparison (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison (Maybe Int)
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison (Maybe Int))
, [Char] -> Comparison (Int, Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Comparison (Int, Int, Int)
forall a. Ord a => a -> a -> Bool
(<=) :: Comparison (Int,Int,Int))
]
infix 4 -<=-
(-<-) :: Expr -> Expr -> Expr
-<- :: Expr -> Expr -> Expr
(-<-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-<-)"
[ [Char] -> Comparison () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison ()
forall a. Ord a => a -> a -> Bool
(<) :: Comparison ())
, [Char] -> Comparison Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison Int
forall a. Ord a => a -> a -> Bool
(<) :: Comparison Int)
, [Char] -> Comparison Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison Bool
forall a. Ord a => a -> a -> Bool
(<) :: Comparison Bool)
, [Char] -> Comparison Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison Char
forall a. Ord a => a -> a -> Bool
(<) :: Comparison Char)
, [Char] -> Comparison [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison [Int]
forall a. Ord a => a -> a -> Bool
(<) :: Comparison [Int])
, [Char] -> Comparison [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison [Bool]
forall a. Ord a => a -> a -> Bool
(<) :: Comparison [Bool])
, [Char] -> Comparison [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison [Char]
forall a. Ord a => a -> a -> Bool
(<) :: Comparison [Char])
, [Char] -> Comparison [[Int]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison [[Int]]
forall a. Ord a => a -> a -> Bool
(<) :: Comparison [[Int]])
, [Char] -> Comparison [[Bool]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison [[Bool]]
forall a. Ord a => a -> a -> Bool
(<) :: Comparison [[Bool]])
, [Char] -> Comparison [[Char]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison [[Char]]
forall a. Ord a => a -> a -> Bool
(<) :: Comparison [[Char]])
, [Char] -> Comparison (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison (Int, Int)
forall a. Ord a => a -> a -> Bool
(<) :: Comparison (Int,Int))
, [Char] -> Comparison (Bool, Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison (Bool, Bool)
forall a. Ord a => a -> a -> Bool
(<) :: Comparison (Bool,Bool))
, [Char] -> Comparison (Char, Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison (Char, Char)
forall a. Ord a => a -> a -> Bool
(<) :: Comparison (Char,Char))
, [Char] -> Comparison (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison (Maybe Int)
forall a. Ord a => a -> a -> Bool
(<) :: Comparison (Maybe Int))
, [Char] -> Comparison (Int, Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Comparison (Int, Int, Int)
forall a. Ord a => a -> a -> Bool
(<) :: Comparison (Int,Int,Int))
]
infix 4 -<-
if' :: Expr -> Expr -> Expr -> Expr
if' :: Expr -> Expr -> Expr -> Expr
if' = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
"if'"
[ [Char] -> CaseB () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (CaseB ()
forall a. Bool -> a -> a -> a
iff :: If ())
, [Char] -> CaseB Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (CaseB Int
forall a. Bool -> a -> a -> a
iff :: If Int)
, [Char] -> CaseB Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (CaseB Bool
forall a. Bool -> a -> a -> a
iff :: If Bool)
, [Char] -> CaseB Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (CaseB Char
forall a. Bool -> a -> a -> a
iff :: If Char)
, [Char] -> CaseB [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (CaseB [Int]
forall a. Bool -> a -> a -> a
iff :: If [Int])
, [Char] -> CaseB [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (CaseB [Bool]
forall a. Bool -> a -> a -> a
iff :: If [Bool])
, [Char] -> CaseB [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (CaseB [Char]
forall a. Bool -> a -> a -> a
iff :: If [Char])
, [Char] -> If [[Int]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (If [[Int]]
forall a. Bool -> a -> a -> a
iff :: If [[Int]])
, [Char] -> If [[Bool]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (If [[Bool]]
forall a. Bool -> a -> a -> a
iff :: If [[Bool]])
, [Char] -> If [[Char]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (If [[Char]]
forall a. Bool -> a -> a -> a
iff :: If [[Char]])
]
where
iff :: Bool -> a -> a -> a
iff :: forall a. Bool -> a -> a -> a
iff Bool
p a
x a
y = if Bool
p then a
x else a
y
type If a = Bool -> a -> a -> a
caseBool :: Expr -> Expr -> Expr -> Expr
caseBool :: Expr -> Expr -> Expr -> Expr
caseBool = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
"caseBool"
[ [Char] -> CaseB () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseB ()
forall a. Bool -> a -> a -> a
caseB :: CaseB ())
, [Char] -> CaseB Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseB Int
forall a. Bool -> a -> a -> a
caseB :: CaseB Int)
, [Char] -> CaseB Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseB Bool
forall a. Bool -> a -> a -> a
caseB :: CaseB Bool)
, [Char] -> CaseB Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseB Char
forall a. Bool -> a -> a -> a
caseB :: CaseB Char)
, [Char] -> CaseB [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseB [Int]
forall a. Bool -> a -> a -> a
caseB :: CaseB [Int])
, [Char] -> CaseB [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseB [Bool]
forall a. Bool -> a -> a -> a
caseB :: CaseB [Bool])
, [Char] -> CaseB [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseB [Char]
forall a. Bool -> a -> a -> a
caseB :: CaseB [Char])
]
where
caseB :: Bool -> a -> a -> a
caseB :: forall a. Bool -> a -> a -> a
caseB Bool
p a
x a
y = case Bool
p of
Bool
False -> a
x
Bool
True -> a
y
type CaseB a = Bool -> a -> a -> a
caseOrdering :: Expr -> Expr -> Expr -> Expr -> Expr
caseOrdering :: Expr -> Expr -> Expr -> Expr -> Expr
caseOrdering = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr
mk4 [Char]
"caseOrdering"
[ [Char] -> CaseO () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseO ()
forall a. Ordering -> a -> a -> a -> a
caseO :: CaseO ())
, [Char] -> CaseO Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseO Int
forall a. Ordering -> a -> a -> a -> a
caseO :: CaseO Int)
, [Char] -> CaseO Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseO Bool
forall a. Ordering -> a -> a -> a -> a
caseO :: CaseO Bool)
, [Char] -> CaseO Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseO Char
forall a. Ordering -> a -> a -> a -> a
caseO :: CaseO Char)
, [Char] -> CaseO [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseO [Int]
forall a. Ordering -> a -> a -> a -> a
caseO :: CaseO [Int])
, [Char] -> CaseO [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseO [Bool]
forall a. Ordering -> a -> a -> a -> a
caseO :: CaseO [Bool])
, [Char] -> CaseO [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (CaseO [Char]
forall a. Ordering -> a -> a -> a -> a
caseO :: CaseO [Char])
]
where
caseO :: Ordering -> a -> a -> a -> a
caseO :: forall a. Ordering -> a -> a -> a -> a
caseO Ordering
o a
x a
y a
z = case Ordering
o of
Ordering
LT -> a
x
Ordering
EQ -> a
y
Ordering
GT -> a
z
type CaseO a = Ordering -> a -> a -> a -> a
compare' :: Expr -> Expr -> Expr
compare' :: Expr -> Expr -> Expr
compare' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"compare'"
[ [Char] -> Compare () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare ()
forall a. Ord a => a -> a -> Ordering
compare :: Compare ())
, [Char] -> Compare Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare Int
forall a. Ord a => a -> a -> Ordering
compare :: Compare Int)
, [Char] -> Compare Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare Bool
forall a. Ord a => a -> a -> Ordering
compare :: Compare Bool)
, [Char] -> Compare Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare Char
forall a. Ord a => a -> a -> Ordering
compare :: Compare Char)
, [Char] -> Compare [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare [Int]
forall a. Ord a => a -> a -> Ordering
compare :: Compare [Int])
, [Char] -> Compare [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare [Bool]
forall a. Ord a => a -> a -> Ordering
compare :: Compare [Bool])
, [Char] -> Compare [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare [Char]
forall a. Ord a => a -> a -> Ordering
compare :: Compare [Char])
, [Char] -> Compare [[Int]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare [[Int]]
forall a. Ord a => a -> a -> Ordering
compare :: Compare [[Int]])
, [Char] -> Compare [[Bool]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare [[Bool]]
forall a. Ord a => a -> a -> Ordering
compare :: Compare [[Bool]])
, [Char] -> Compare [[Char]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"compare" (Compare [[Char]]
forall a. Ord a => a -> a -> Ordering
compare :: Compare [[Char]])
]
type Compare a = a -> a -> Ordering
nothing :: Expr
nothing :: Expr
nothing = Expr
nothingInt
nothingInt :: Expr
nothingInt :: Expr
nothingInt = Maybe Int -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Maybe Int
forall a. Maybe a
Nothing :: Maybe Int)
nothingBool :: Expr
nothingBool :: Expr
nothingBool = Maybe Bool -> Expr
forall a. (Typeable a, Show a) => a -> Expr
val (Maybe Bool
forall a. Maybe a
Nothing :: Maybe Bool)
justInt :: Expr
justInt :: Expr
justInt = [Char] -> (Int -> Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"Just" (Int -> Maybe Int
forall a. a -> Maybe a
Just :: Int -> Maybe Int)
justBool :: Expr
justBool :: Expr
justBool = [Char] -> (Bool -> Maybe Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"Just" (Bool -> Maybe Bool
forall a. a -> Maybe a
Just :: Bool -> Maybe Bool)
just :: Expr -> Expr
just :: Expr -> Expr
just = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"just"
[ Expr
justInt
, Expr
justBool
, [Char] -> Just Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"Just" (Just Char
forall a. a -> Maybe a
Just :: Just Char)
, [Char] -> Just [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"Just" (Just [Int]
forall a. a -> Maybe a
Just :: Just [Int])
, [Char] -> Just [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"Just" (Just [Bool]
forall a. a -> Maybe a
Just :: Just [Bool])
, [Char] -> Just [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"Just" (Just [Char]
forall a. a -> Maybe a
Just :: Just String)
]
type Just a = a -> Maybe a
(-|-) :: Expr -> Expr -> Expr
-|- :: Expr -> Expr -> Expr
(-|-) = Expr -> Expr -> Expr
pair
pair :: Expr -> Expr -> Expr
pair :: Expr -> Expr -> Expr
pair = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"pair"
[ [Char] -> Pair Int Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 Int)
, [Char] -> Pair1 Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 Bool)
, [Char] -> Pair1 Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 Char)
, [Char] -> Pair1 [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 [Int])
, [Char] -> Pair1 [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 [Bool])
, [Char] -> Pair1 [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 [Char])
, [Char] -> Pair Int [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Int [Int])
, [Char] -> Pair Bool [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Bool [Bool])
, [Char] -> Pair Char [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Char [Char])
, [Char] -> Pair [Int] Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair [Int] Int)
, [Char] -> Pair [Bool] Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair [Bool] Bool)
, [Char] -> Pair [Char] Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair [Char] Char)
, [Char] -> Pair Int Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Int Bool)
, [Char] -> Pair Bool Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Bool Int)
, [Char] -> Pair Int Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Int Char)
, [Char] -> Pair Char Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Char Int)
, [Char] -> Pair Int (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Int (Int,Int))
, [Char] -> Pair (Int, Int) Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair (Int,Int) Int)
, [Char] -> Pair1 (Int, Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 (Int,Int))
, [Char] -> Pair1 [[Int]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 [[Int]])
, [Char] -> Pair1 [[Bool]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 [[Bool]])
, [Char] -> Pair1 [[Char]] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair1 [[Char]])
]
type Pair a b = a -> b -> (a,b)
type Pair1 a = Pair a a
comma :: Expr
comma :: Expr
comma = [Char] -> Pair Int Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Int Int)
triple :: Expr -> Expr -> Expr -> Expr
triple :: Expr -> Expr -> Expr -> Expr
triple = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
"triple"
[ [Char] -> Trio1 Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio1 Int)
, [Char] -> Trio1 Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio1 Bool)
, [Char] -> Trio1 Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio1 Char)
, [Char] -> Trio1 [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio1 [Int])
, [Char] -> Trio1 [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio1 [Bool])
, [Char] -> Trio1 [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio1 [Char])
, [Char] -> Trio Int Int [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Int Int [Int])
, [Char] -> Trio Int [Int] Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Int [Int] Int)
, [Char] -> Trio [Int] Int Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio [Int] Int Int)
, [Char] -> Trio Int [Int] [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Int [Int] [Int])
, [Char] -> Trio [Int] Int [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio [Int] Int [Int])
, [Char] -> Trio [Int] [Int] Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio [Int] [Int] Int)
, [Char] -> Trio Int Int Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Int Int Bool)
, [Char] -> Trio Int Bool Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Int Bool Int)
, [Char] -> Trio Bool Int Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Bool Int Int)
, [Char] -> Trio Int Bool Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Int Bool Bool)
, [Char] -> Trio Bool Int Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Bool Int Bool)
, [Char] -> Trio Bool Bool Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Trio Bool Bool Int)
]
type Trio a b c = a -> b -> c -> (a,b,c)
type Trio1 a = Trio a a a
quadruple :: Expr -> Expr -> Expr -> Expr -> Expr
quadruple :: Expr -> Expr -> Expr -> Expr -> Expr
quadruple = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr
mk4 [Char]
"quadruple"
[ [Char] -> Quartet1 Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,," ((,,,) :: Quartet1 Int)
, [Char] -> Quartet1 Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,," ((,,,) :: Quartet1 Bool)
, [Char] -> Quartet1 Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,," ((,,,) :: Quartet1 Char)
, [Char] -> Quartet1 [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,," ((,,,) :: Quartet1 [Int])
, [Char] -> Quartet1 [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,," ((,,,) :: Quartet1 [Bool])
, [Char] -> Quartet1 [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,," ((,,,) :: Quartet1 [Char])
]
type Quartet a b c d = a -> b -> c -> d -> (a,b,c,d)
type Quartet1 a = Quartet a a a a
quintuple :: Expr -> Expr -> Expr -> Expr -> Expr -> Expr
quintuple :: Expr -> Expr -> Expr -> Expr -> Expr -> Expr
quintuple = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
mk5 [Char]
"quintuple"
[ [Char] -> Quintet1 Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,," ((,,,,) :: Quintet1 Int)
, [Char] -> Quintet1 Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,," ((,,,,) :: Quintet1 Bool)
, [Char] -> Quintet1 Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,," ((,,,,) :: Quintet1 Char)
, [Char] -> Quintet1 [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,," ((,,,,) :: Quintet1 [Int])
, [Char] -> Quintet1 [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,," ((,,,,) :: Quintet1 [Bool])
, [Char] -> Quintet1 [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,," ((,,,,) :: Quintet1 [Char])
]
type Quintet a b c d e = a -> b -> c -> d -> e -> (a,b,c,d,e)
type Quintet1 a = Quintet a a a a a
sixtuple :: Expr -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
sixtuple :: Expr -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
sixtuple = [Char]
-> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
mk6 [Char]
"sixtuple"
[ [Char] -> Sextet1 Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,,," ((,,,,,) :: Sextet1 Int)
, [Char] -> Sextet1 Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,,," ((,,,,,) :: Sextet1 Bool)
, [Char] -> Sextet1 Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,,," ((,,,,,) :: Sextet1 Char)
, [Char] -> Sextet1 [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,,," ((,,,,,) :: Sextet1 [Int])
, [Char] -> Sextet1 [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,,," ((,,,,,) :: Sextet1 [Bool])
, [Char] -> Sextet1 [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,,," ((,,,,,) :: Sextet1 [Char])
]
type Sextet a b c d e f = a -> b -> c -> d -> e -> f -> (a,b,c,d,e,f)
type Sextet1 a = Sextet a a a a a a
bs_ :: Expr
bs_ :: Expr
bs_ = [Bool] -> Expr
forall a. Typeable a => a -> Expr
hole [Bool
bool]
pps :: Expr
pps :: Expr
pps = [Char] -> [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"ps" [Bool
bool]
qqs :: Expr
qqs :: Expr
qqs = [Char] -> [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"qs" [Bool
bool]
and' :: Expr -> Expr
and' :: Expr -> Expr
and' Expr
e = Expr
andE Expr -> Expr -> Expr
:$ Expr
e
where
andE :: Expr
andE = [Char] -> Null Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"and" (Null Bool
forall (t :: * -> *). Foldable t => t Bool -> Bool
and :: [Bool] -> Bool)
or' :: Expr -> Expr
or' :: Expr -> Expr
or' Expr
e = Expr
orE Expr -> Expr -> Expr
:$ Expr
e
where
orE :: Expr
orE = [Char] -> Null Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"or" (Null Bool
forall (t :: * -> *). Foldable t => t Bool -> Bool
or :: [Bool] -> Bool)
sum' :: Expr -> Expr
sum' :: Expr -> Expr
sum' Expr
e = Expr
sumE Expr -> Expr -> Expr
:$ Expr
e
where
sumE :: Expr
sumE = [Char] -> Length Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sum" (Length Int
forall a. Num a => [a] -> a
forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
sum :: [Int] -> Int)
product' :: Expr -> Expr
product' :: Expr -> Expr
product' Expr
e = Expr
productE Expr -> Expr -> Expr
:$ Expr
e
where
productE :: Expr
productE = [Char] -> Length Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"product" (Length Int
forall a. Num a => [a] -> a
forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
product :: [Int] -> Int)
headOr :: a -> [a] -> a
headOr :: forall a. a -> [a] -> a
headOr a
x [] = a
x
headOr a
_ (a
x:[a]
_) = a
x
(-%-) :: Expr -> Expr -> Expr
Expr
en -%- :: Expr -> Expr -> Expr
-%- Expr
ed = [Char] -> (Integer -> Integer -> Rational) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"%" (Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
(%) :: Integer -> Integer -> Rational) Expr -> Expr -> Expr
:$ Expr
en Expr -> Expr -> Expr
:$ Expr
ed
compose :: Expr
compose :: Expr
compose = [Char] -> Compose Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"." (Compose Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) :: Compose Int)
(-.-) :: Expr -> Expr -> Expr
-.- :: Expr -> Expr -> Expr
(-.-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-.-)"
[ [Char] -> Compose () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"." (Compose ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) :: Compose ())
, [Char] -> Compose Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"." (Compose Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) :: Compose Int)
, [Char] -> Compose Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"." (Compose Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) :: Compose Bool)
, [Char] -> Compose Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"." (Compose Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) :: Compose Char)
, [Char] -> Compose [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"." (Compose [Int]
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) :: Compose [Int])
, [Char] -> Compose [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"." (Compose [Bool]
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) :: Compose [Bool])
, [Char] -> Compose [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"." (Compose [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) :: Compose [Char])
]
type Compose a = (a -> a) -> (a -> a) -> (a -> a)
mapE :: Expr
mapE :: Expr
mapE = [Char] -> Map Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"map" (Map Int
forall a b. (a -> b) -> [a] -> [b]
map :: Map Int)
map' :: Expr -> Expr -> Expr
map' :: Expr -> Expr -> Expr
map' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"map'"
[ [Char] -> Map () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"map" (Map ()
forall a b. (a -> b) -> [a] -> [b]
map :: Map ())
, [Char] -> Map Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"map" (Map Int
forall a b. (a -> b) -> [a] -> [b]
map :: Map Int)
, [Char] -> Map Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"map" (Map Bool
forall a b. (a -> b) -> [a] -> [b]
map :: Map Bool)
, [Char] -> Map Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"map" (Map Char
forall a b. (a -> b) -> [a] -> [b]
map :: Map Char)
, [Char] -> Map [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"map" (Map [Int]
forall a b. (a -> b) -> [a] -> [b]
map :: Map [Int])
, [Char] -> Map [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"map" (Map [Bool]
forall a b. (a -> b) -> [a] -> [b]
map :: Map [Bool])
, [Char] -> Map [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"map" (Map [Char]
forall a b. (a -> b) -> [a] -> [b]
map :: Map [Char])
]
type Map a = (a -> a) -> [a] -> [a]
foldr' :: Expr -> Expr -> Expr -> Expr
foldr' :: Expr -> Expr -> Expr -> Expr
foldr' = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
"foldr'"
[ [Char] -> Foldr1 () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr1 ()
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr1 ())
, [Char] -> Foldr1 Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr1 Int
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr1 Int)
, [Char] -> Foldr1 Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr1 Bool
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr1 Bool)
, [Char] -> Foldr1 Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr1 Char
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr1 Char)
, [Char] -> Foldr1 [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr1 [Int]
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr1 [Int])
, [Char] -> Foldr1 [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr1 [Bool]
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr1 [Bool])
, [Char] -> Foldr1 [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr1 [Char]
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr1 [Char])
, [Char] -> Foldr Int [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr Int [Int]
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr Int [Int])
, [Char] -> Foldr Bool [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr Bool [Bool]
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr Bool [Bool])
, [Char] -> Foldr Char [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"foldr" (Foldr Char [Char]
forall a b. (a -> b -> b) -> b -> [a] -> b
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr :: Foldr Char [Char])
]
type Foldr a b = (a -> b -> b) -> b -> [a] -> b
type Foldr1 a = Foldr a a
filter' :: Expr -> Expr -> Expr
filter' :: Expr -> Expr -> Expr
filter' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"filter'"
[ [Char] -> Filter () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"filter" (Filter ()
forall a. (a -> Bool) -> [a] -> [a]
filter :: Filter ())
, [Char] -> Filter Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"filter" (Filter Int
forall a. (a -> Bool) -> [a] -> [a]
filter :: Filter Int)
, [Char] -> Map Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"filter" (Map Bool
forall a. (a -> Bool) -> [a] -> [a]
filter :: Filter Bool)
, [Char] -> Filter Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"filter" (Filter Char
forall a. (a -> Bool) -> [a] -> [a]
filter :: Filter Char)
, [Char] -> Filter [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"filter" (Filter [Int]
forall a. (a -> Bool) -> [a] -> [a]
filter :: Filter [Int])
, [Char] -> Filter [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"filter" (Filter [Bool]
forall a. (a -> Bool) -> [a] -> [a]
filter :: Filter [Bool])
, [Char] -> Filter [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"filter" (Filter [Char]
forall a. (a -> Bool) -> [a] -> [a]
filter :: Filter [Char])
]
type Filter a = (a -> Bool) -> [a] -> [a]
enumFrom' :: Expr -> Expr
enumFrom' :: Expr -> Expr
enumFrom' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"enumFrom'"
[ [Char] -> EnumFrom Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFrom" (EnumFrom Int
forall a. Enum a => a -> [a]
enumFrom :: EnumFrom Int)
, [Char] -> EnumFrom Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFrom" (EnumFrom Bool
forall a. Enum a => a -> [a]
enumFrom :: EnumFrom Bool)
, [Char] -> EnumFrom Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFrom" (EnumFrom Char
forall a. Enum a => a -> [a]
enumFrom :: EnumFrom Char)
]
type EnumFrom a = (a -> [a])
(-..) :: Expr -> () -> Expr
Expr
e -.. :: Expr -> () -> Expr
-.. ()
_ = Expr -> Expr
mk Expr
e
where
mk :: Expr -> Expr
mk = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"(-..)"
[ [Char] -> EnumFrom Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
".." (EnumFrom Int
forall a. Enum a => a -> [a]
enumFrom :: EnumFrom Int)
, [Char] -> EnumFrom Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
".." (EnumFrom Bool
forall a. Enum a => a -> [a]
enumFrom :: EnumFrom Bool)
, [Char] -> EnumFrom Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
".." (EnumFrom Char
forall a. Enum a => a -> [a]
enumFrom :: EnumFrom Char)
]
enumFromTo' :: Expr -> Expr -> Expr
enumFromTo' :: Expr -> Expr -> Expr
enumFromTo' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"enumFromTo'"
[ [Char] -> EnumFromTo Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromTo" (EnumFromTo Int
forall a. Enum a => a -> a -> [a]
enumFromTo :: EnumFromTo Int)
, [Char] -> EnumFromTo Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromTo" (EnumFromTo Bool
forall a. Enum a => a -> a -> [a]
enumFromTo :: EnumFromTo Bool)
, [Char] -> EnumFromTo Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromTo" (EnumFromTo Char
forall a. Enum a => a -> a -> [a]
enumFromTo :: EnumFromTo Char)
]
type EnumFromTo a = (a -> a -> [a])
(-..-) :: Expr -> Expr -> Expr
-..- :: Expr -> Expr -> Expr
(-..-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-..-)"
[ [Char] -> EnumFromTo Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
".." (EnumFromTo Int
forall a. Enum a => a -> a -> [a]
enumFromTo :: EnumFromTo Int)
, [Char] -> EnumFromTo Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
".." (EnumFromTo Bool
forall a. Enum a => a -> a -> [a]
enumFromTo :: EnumFromTo Bool)
, [Char] -> EnumFromTo Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
".." (EnumFromTo Char
forall a. Enum a => a -> a -> [a]
enumFromTo :: EnumFromTo Char)
]
enumFromThen' :: Expr -> Expr -> Expr
enumFromThen' :: Expr -> Expr -> Expr
enumFromThen' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"enumFromThen'"
[ [Char] -> EnumFromTo Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromThen" (EnumFromTo Int
forall a. Enum a => a -> a -> [a]
enumFromThen :: EnumFromThen Int)
, [Char] -> EnumFromTo Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromThen" (EnumFromTo Bool
forall a. Enum a => a -> a -> [a]
enumFromThen :: EnumFromThen Bool)
, [Char] -> EnumFromTo Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromThen" (EnumFromTo Char
forall a. Enum a => a -> a -> [a]
enumFromThen :: EnumFromThen Char)
]
type EnumFromThen a = (a -> a -> [a])
(--..) :: (Expr,Expr) -> () -> Expr
(Expr
e1,Expr
e2) --.. :: (Expr, Expr) -> () -> Expr
--.. ()
_ = Expr -> Expr -> Expr
mk Expr
e1 Expr
e2
where
mk :: Expr -> Expr -> Expr
mk = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(--..)"
[ [Char] -> EnumFromTo Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",.." (EnumFromTo Int
forall a. Enum a => a -> a -> [a]
enumFromThen :: EnumFromThen Int)
, [Char] -> EnumFromTo Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",.." (EnumFromTo Bool
forall a. Enum a => a -> a -> [a]
enumFromThen :: EnumFromThen Bool)
, [Char] -> EnumFromTo Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",.." (EnumFromTo Char
forall a. Enum a => a -> a -> [a]
enumFromThen :: EnumFromThen Char)
]
enumFromThenTo' :: Expr -> Expr -> Expr -> Expr
enumFromThenTo' :: Expr -> Expr -> Expr -> Expr
enumFromThenTo' = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
"enumFromThenTo'"
[ [Char] -> EnumFromThenTo Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromThenTo" (EnumFromThenTo Int
forall a. Enum a => a -> a -> a -> [a]
enumFromThenTo :: EnumFromThenTo Int)
, [Char] -> EnumFromThenTo Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromThenTo" (EnumFromThenTo Bool
forall a. Enum a => a -> a -> a -> [a]
enumFromThenTo :: EnumFromThenTo Bool)
, [Char] -> EnumFromThenTo Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"enumFromThenTo" (EnumFromThenTo Char
forall a. Enum a => a -> a -> a -> [a]
enumFromThenTo :: EnumFromThenTo Char)
]
type EnumFromThenTo a = (a -> a -> a -> [a])
(--..-) :: (Expr,Expr) -> Expr -> Expr
(Expr
e1, Expr
e2) --..- :: (Expr, Expr) -> Expr -> Expr
--..- Expr
e3 = Expr -> Expr -> Expr -> Expr
mk Expr
e1 Expr
e2 Expr
e3
where
mk :: Expr -> Expr -> Expr -> Expr
mk = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
"(--..-)"
[ [Char] -> EnumFromThenTo Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",.." (EnumFromThenTo Int
forall a. Enum a => a -> a -> a -> [a]
enumFromThenTo :: EnumFromThenTo Int)
, [Char] -> EnumFromThenTo Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",.." (EnumFromThenTo Bool
forall a. Enum a => a -> a -> a -> [a]
enumFromThenTo :: EnumFromThenTo Bool)
, [Char] -> EnumFromThenTo Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",.." (EnumFromThenTo Char
forall a. Enum a => a -> a -> a -> [a]
enumFromThenTo :: EnumFromThenTo Char)
]
mk1 :: String -> [Expr] -> Expr -> Expr
mk1 :: [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
nm [Expr]
efs Expr
ex = Expr -> [Expr] -> Expr
forall a. a -> [a] -> a
headOr ([Char] -> [Expr] -> [Expr] -> Expr
err [Char]
nm [Expr]
efs [Expr
ex]) ([Expr] -> Expr) -> [Expr] -> Expr
forall a b. (a -> b) -> a -> b
$ [Expr]
efs [Expr] -> Expr -> [Expr]
>$$ Expr
ex
mk2 :: String -> [Expr] -> Expr -> Expr -> Expr
mk2 :: [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
nm [Expr]
efs Expr
ex Expr
ey = Expr -> [Expr] -> Expr
forall a. a -> [a] -> a
headOr ([Char] -> [Expr] -> [Expr] -> Expr
err [Char]
nm [Expr]
efs [Expr
ex,Expr
ey]) ([Expr] -> Expr) -> [Expr] -> Expr
forall a b. (a -> b) -> a -> b
$ [Expr]
efs [Expr] -> Expr -> [Expr]
>$$ Expr
ex [Expr] -> Expr -> [Expr]
>$$ Expr
ey
mk3 :: String -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 :: [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
nm [Expr]
efs Expr
ex Expr
ey Expr
ez = Expr -> [Expr] -> Expr
forall a. a -> [a] -> a
headOr ([Char] -> [Expr] -> [Expr] -> Expr
err [Char]
nm [Expr]
efs [Expr
ex,Expr
ey,Expr
ez])
([Expr] -> Expr) -> [Expr] -> Expr
forall a b. (a -> b) -> a -> b
$ [Expr]
efs [Expr] -> Expr -> [Expr]
>$$ Expr
ex [Expr] -> Expr -> [Expr]
>$$ Expr
ey [Expr] -> Expr -> [Expr]
>$$ Expr
ez
mk4 :: String -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr
mk4 :: [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr
mk4 [Char]
nm [Expr]
efs Expr
ex Expr
ey Expr
ez Expr
ew = Expr -> [Expr] -> Expr
forall a. a -> [a] -> a
headOr ([Char] -> [Expr] -> [Expr] -> Expr
err [Char]
nm [Expr]
efs [Expr
ex,Expr
ey,Expr
ez,Expr
ew])
([Expr] -> Expr) -> [Expr] -> Expr
forall a b. (a -> b) -> a -> b
$ [Expr]
efs [Expr] -> Expr -> [Expr]
>$$ Expr
ex [Expr] -> Expr -> [Expr]
>$$ Expr
ey [Expr] -> Expr -> [Expr]
>$$ Expr
ez [Expr] -> Expr -> [Expr]
>$$ Expr
ew
mk5 :: String -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
mk5 :: [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
mk5 [Char]
nm [Expr]
efs Expr
ex Expr
ey Expr
ez Expr
ew Expr
ev = Expr -> [Expr] -> Expr
forall a. a -> [a] -> a
headOr ([Char] -> [Expr] -> [Expr] -> Expr
err [Char]
nm [Expr]
efs [Expr
ex,Expr
ey,Expr
ez,Expr
ew,Expr
ev])
([Expr] -> Expr) -> [Expr] -> Expr
forall a b. (a -> b) -> a -> b
$ [Expr]
efs [Expr] -> Expr -> [Expr]
>$$ Expr
ex [Expr] -> Expr -> [Expr]
>$$ Expr
ey [Expr] -> Expr -> [Expr]
>$$ Expr
ez [Expr] -> Expr -> [Expr]
>$$ Expr
ew [Expr] -> Expr -> [Expr]
>$$ Expr
ev
mk6 :: String -> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
mk6 :: [Char]
-> [Expr] -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
mk6 [Char]
nm [Expr]
efs Expr
ex Expr
ey Expr
ez Expr
ew Expr
ev Expr
eu = Expr -> [Expr] -> Expr
forall a. a -> [a] -> a
headOr ([Char] -> [Expr] -> [Expr] -> Expr
err [Char]
nm [Expr]
efs [Expr
ex,Expr
ey,Expr
ez,Expr
ew,Expr
ev,Expr
eu])
([Expr] -> Expr) -> [Expr] -> Expr
forall a b. (a -> b) -> a -> b
$ [Expr]
efs [Expr] -> Expr -> [Expr]
>$$ Expr
ex [Expr] -> Expr -> [Expr]
>$$ Expr
ey [Expr] -> Expr -> [Expr]
>$$ Expr
ez [Expr] -> Expr -> [Expr]
>$$ Expr
ew [Expr] -> Expr -> [Expr]
>$$ Expr
ev [Expr] -> Expr -> [Expr]
>$$ Expr
eu
err :: String -> [Expr] -> [Expr] -> Expr
err :: [Char] -> [Expr] -> [Expr] -> Expr
err [Char]
fn [Expr]
efs [Expr]
exs = [Char] -> Expr
forall a. HasCallStack => [Char] -> a
error
([Char] -> Expr) -> [Char] -> Expr
forall a b. (a -> b) -> a -> b
$ [Char]
fn Append Char
forall a. [a] -> [a] -> [a]
++ [Char]
": unhandled type: "
Append Char
forall a. [a] -> [a] -> [a]
++ [Char] -> Head [Char]
forall a. [a] -> [[a]] -> [a]
intercalate [Char]
", " ((Expr -> [Char]) -> [Expr] -> [[Char]]
forall a b. (a -> b) -> [a] -> [b]
map Expr -> [Char]
forall a. Show a => a -> [Char]
show [Expr]
exs)
Append Char
forall a. [a] -> [a] -> [a]
++ [Char]
"\n accepted types are:\n"
Append Char
forall a. [a] -> [a] -> [a]
++ Head [Char]
unlines ((Expr -> [Char]) -> [Expr] -> [[Char]]
forall a b. (a -> b) -> [a] -> [b]
map (([Char]
" " Append Char
forall a. [a] -> [a] -> [a]
++) Sort Char -> (Expr -> [Char]) -> Expr -> [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Expr -> [Char]
forall a. Show a => a -> [Char]
show) [Expr]
efs)