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
, 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'
, bs_, pps, qqs
, and', or'
, sum', product'
, appendInt
, nothing
, nothingInt
, nothingBool
, just
, justInt
, justBool
, comma
, pair
, (-|-)
, triple
, quadruple
, quintuple
, sixtuple
, (-%-)
, compose
, mapE
, (-.-)
, map'
, 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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"&&" Bool -> Id Bool
(&&)
orE :: Expr
orE :: Expr
orE = [Char] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"||" Bool -> Id 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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==>" Bool -> Id Bool
(==>)
where
Bool
False ==> :: Bool -> Id 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 = (Expr
ffE Expr -> Expr -> Expr
:$)
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 = (Expr
ggE Expr -> Expr -> Expr
:$)
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 = (Expr
hhE Expr -> Expr -> Expr
:$)
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)
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
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 [Char] -> Id [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
": unhandled type: "
[Char] -> Id [Char]
forall a. [a] -> [a] -> [a]
++ [Char] -> [[Char]] -> [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)
[Char] -> Id [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
"\n accepted types are:\n"
[Char] -> Id [Char]
forall a. [a] -> [a] -> [a]
++ [[Char]] -> [Char]
unlines ((Expr -> [Char]) -> [Expr] -> [[Char]]
forall a b. (a -> b) -> [a] -> [b]
map (([Char]
" " [Char] -> Id [Char]
forall a. [a] -> [a] -> [a]
++) Id [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)
(-?-) :: 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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Bool -> Id Bool
forall a. HasCallStack => a
undefined :: Bool -> Bool -> Bool)
, [Char] -> (Char -> Id Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Char -> Id Char
forall a. HasCallStack => a
undefined :: Char -> Char -> 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] -> ([Char] -> Id [Char]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" ([Char] -> Id [Char]
forall a. HasCallStack => a
undefined :: String -> String -> String)
, [Char] -> Cons Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Cons Int
forall a. HasCallStack => a
undefined :: Int -> [Int] -> [Int])
, [Char] -> Cons Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"?" (Cons 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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" (Bool -> Id Bool
forall a. HasCallStack => a
undefined :: Bool -> Bool -> Bool)
, [Char] -> (Char -> Id Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" (Char -> Id Char
forall a. HasCallStack => a
undefined :: Char -> Char -> Char)
, [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] -> ([Char] -> Id [Char]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
var [Char]
"`o`" ([Char] -> Id [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] -> Id Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Id Char
forall a. a -> a
id :: Id Char)
idInts :: Expr
idInts = [Char] -> ([Int] -> [Int]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" ([Int] -> [Int]
forall a. a -> a
id :: Id [Int])
idBools :: Expr
idBools = [Char] -> Id [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Id [Bool]
forall a. a -> a
id :: Id [Bool])
idString :: Expr
idString = [Char] -> Id [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"id" (Id [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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" (Bool -> Id Bool
forall a b. a -> b -> a
const :: Bool -> Bool -> Bool)
, [Char] -> (Char -> Id Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" (Char -> Id Char
forall a b. a -> b -> a
const :: Char -> Char -> Char)
, [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] -> ([Bool] -> Id [Bool]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" ([Bool] -> Id [Bool]
forall a b. a -> b -> a
const :: [Bool] -> [Bool] -> [Bool])
, [Char] -> ([Char] -> Id [Char]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"const" ([Char] -> Id [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])
cons :: Expr
cons :: Expr
cons = Expr
consInt
consInt, consBool, consChar :: Expr
consInt :: Expr
consInt = [Char] -> Cons Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons Int)
consBool :: Expr
consBool = [Char] -> Cons Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons Bool)
consChar :: Expr
consChar = [Char] -> Cons 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
nil
| 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 -> Expr -> Expr
-:- :: Expr -> Expr -> Expr
(-:-) = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"(-:-)"
[ Expr
consInt
, Expr
consBool
, Expr
consChar
, [Char] -> Cons (Maybe Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
":" ((:) :: Cons (Maybe Int))
]
infixr 5 -:-
appendInt :: Expr
appendInt :: Expr
appendInt = [Char] -> ([Int] -> [Int] -> [Int]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" ([Int] -> [Int] -> [Int]
forall a. [a] -> [a] -> [a]
(++) :: [Int] -> [Int] -> [Int])
(-++-) :: 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
value [Char]
"++" ([Int] -> [Int] -> [Int]
forall a. [a] -> [a] -> [a]
(++) :: [Int] -> [Int] -> [Int])
, [Char] -> ([Char] -> Id [Char]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" ([Char] -> Id [Char]
forall a. [a] -> [a] -> [a]
(++) :: String -> String -> String)
, [Char] -> ([Bool] -> Id [Bool]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"++" ([Bool] -> Id [Bool]
forall a. [a] -> [a] -> [a]
(++) :: [Bool] -> [Bool] -> [Bool])
]
infixr 5 -++-
head' :: Expr -> Expr
head' :: Expr -> Expr
head' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"head'"
[ [Char] -> ([Int] -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" ([Int] -> Int
forall a. HasCallStack => [a] -> a
head :: [Int] -> Int)
, [Char] -> ([Char] -> Char) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" ([Char] -> Char
forall a. HasCallStack => [a] -> a
head :: [Char] -> Char)
, [Char] -> ([Bool] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"head" ([Bool] -> Bool
forall a. HasCallStack => [a] -> a
head :: [Bool] -> Bool)
]
tail' :: Expr -> Expr
tail' :: Expr -> Expr
tail' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"tail'"
[ [Char] -> ([Int] -> [Int]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" ([Int] -> [Int]
forall a. HasCallStack => [a] -> [a]
tail :: [Int] -> [Int])
, [Char] -> Id [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Id [Char]
forall a. HasCallStack => [a] -> [a]
tail :: [Char] -> [Char])
, [Char] -> Id [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"tail" (Id [Bool]
forall a. HasCallStack => [a] -> [a]
tail :: [Bool] -> [Bool])
]
null' :: Expr -> Expr
null' :: Expr -> Expr
null' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"null'"
[ [Char] -> ([Int] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" ([Int] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: [Int] -> Bool)
, [Char] -> ([Char] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" ([Char] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: [Char] -> Bool)
, [Char] -> ([Bool] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"null" ([Bool] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null :: [Bool] -> Bool)
]
length' :: Expr -> Expr
length' :: Expr -> Expr
length' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"length'"
[ [Char] -> ([Int] -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" ([Int] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: [Int] -> Int)
, [Char] -> ([Char] -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" ([Char] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: [Char] -> Int)
, [Char] -> ([Bool] -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"length" ([Bool] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length :: [Bool] -> Int)
]
init' :: Expr -> Expr
init' :: Expr -> Expr
init' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"init'"
[ [Char] -> ([Int] -> [Int]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" ([Int] -> [Int]
forall a. HasCallStack => [a] -> [a]
init :: [Int] -> [Int])
, [Char] -> Id [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Id [Char]
forall a. HasCallStack => [a] -> [a]
init :: [Char] -> [Char])
, [Char] -> Id [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"init" (Id [Bool]
forall a. HasCallStack => [a] -> [a]
init :: [Bool] -> [Bool])
]
sort' :: Expr -> Expr
sort' :: Expr -> Expr
sort' = [Char] -> [Expr] -> Expr -> Expr
mk1 [Char]
"sort'"
[ [Char] -> ([Int] -> [Int]) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" ([Int] -> [Int]
forall a. Ord a => [a] -> [a]
sort :: [Int] -> [Int])
, [Char] -> Id [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Id [Char]
forall a. Ord a => [a] -> [a]
sort :: [Char] -> [Char])
, [Char] -> Id [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sort" (Id [Bool]
forall a. Ord a => [a] -> [a]
sort :: [Bool] -> [Bool])
]
insert' :: Expr -> Expr -> Expr
insert' :: Expr -> Expr -> Expr
insert' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"insert'"
[ [Char] -> Cons Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Cons Int
forall a. Ord a => a -> [a] -> [a]
insert :: Int -> [Int] -> [Int])
, [Char] -> Cons Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Cons Bool
forall a. Ord a => a -> [a] -> [a]
insert :: Bool -> [Bool] -> [Bool])
, [Char] -> Cons Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"insert" (Cons Char
forall a. Ord a => a -> [a] -> [a]
insert :: Char -> String -> String)
]
elem' :: Expr -> Expr -> Expr
elem' :: Expr -> Expr -> Expr
elem' = [Char] -> [Expr] -> Expr -> Expr -> Expr
mk2 [Char]
"elem'"
[ [Char] -> (Int -> [Int] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Int -> [Int] -> Bool
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Int -> [Int] -> Bool)
, [Char] -> (Bool -> [Bool] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Bool -> [Bool] -> Bool
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Bool -> [Bool] -> Bool)
, [Char] -> (Char -> [Char] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"elem" (Char -> [Char] -> Bool
forall a. Eq a => a -> [a] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
elem :: Char -> String -> Bool)
]
(-$-) :: 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])
]
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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"==" (Bool -> Id 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])
]
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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"/=" (Bool -> Id 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])
]
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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<=" (Bool -> Id 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])
]
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] -> (Bool -> Id Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"<" (Bool -> Id 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])
]
infix 4 -<-
if' :: Expr -> Expr -> Expr -> Expr
if' :: Expr -> Expr -> Expr -> Expr
if' = [Char] -> [Expr] -> Expr -> Expr -> Expr -> Expr
mk3 [Char]
"if'"
[ [Char] -> If () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"if" (If ()
forall a. Bool -> a -> a -> a
iff :: If ())
, [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)
, [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] -> If () -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (If ()
forall a. Bool -> a -> a -> a
caseB :: CaseB ())
, [Char] -> If Int -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (If Int
forall a. Bool -> a -> a -> a
caseB :: CaseB Int)
, [Char] -> If Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (If Bool
forall a. Bool -> a -> a -> a
caseB :: CaseB Bool)
, [Char] -> If Char -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (If Char
forall a. Bool -> a -> a -> a
caseB :: CaseB Char)
, [Char] -> If [Int] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (If [Int]
forall a. Bool -> a -> a -> a
caseB :: CaseB [Int])
, [Char] -> If [Bool] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (If [Bool]
forall a. Bool -> a -> a -> a
caseB :: CaseB [Bool])
, [Char] -> If [Char] -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"case" (If [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])
]
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
]
(-|-) :: 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]
"," ((,) :: Pair Int Int)
, [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 Bool Bool -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"," ((,) :: Pair Bool Bool)
]
type Pair a b = a -> b -> (a,b)
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 Expr
e1 Expr
e2 Expr
e3 = Expr
ccE Expr -> Expr -> Expr
:$ Expr
e1 Expr -> Expr -> Expr
:$ Expr
e2 Expr -> Expr -> Expr
:$ Expr
e3
where
ccE :: Expr
ccE = [Char] -> (Int -> Int -> Int -> (Int, Int, Int)) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",," ((,,) :: Int -> Int -> Int -> (Int,Int,Int))
quadruple :: Expr -> Expr -> Expr -> Expr -> Expr
quadruple :: Expr -> Expr -> Expr -> Expr -> Expr
quadruple Expr
e1 Expr
e2 Expr
e3 Expr
e4 = Expr
cccE Expr -> Expr -> Expr
:$ Expr
e1 Expr -> Expr -> Expr
:$ Expr
e2 Expr -> Expr -> Expr
:$ Expr
e3 Expr -> Expr -> Expr
:$ Expr
e4
where
cccE :: Expr
cccE = [Char]
-> (Int -> Int -> Int -> Int -> (Int, Int, Int, Int)) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,," ((,,,) :: Int -> Int -> Int -> Int -> (Int,Int,Int,Int))
quintuple :: Expr -> Expr -> Expr -> Expr -> Expr -> Expr
quintuple :: Expr -> Expr -> Expr -> Expr -> Expr -> Expr
quintuple Expr
e1 Expr
e2 Expr
e3 Expr
e4 Expr
e5 = Expr
ccccE Expr -> Expr -> Expr
:$ Expr
e1 Expr -> Expr -> Expr
:$ Expr
e2 Expr -> Expr -> Expr
:$ Expr
e3 Expr -> Expr -> Expr
:$ Expr
e4 Expr -> Expr -> Expr
:$ Expr
e5
where
ccccE :: Expr
ccccE = [Char]
-> (Int -> Int -> Int -> Int -> Int -> (Int, Int, Int, Int, Int))
-> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,," ((,,,,) :: Int -> Int -> Int -> Int -> Int -> (Int,Int,Int,Int,Int))
sixtuple :: Expr -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
sixtuple :: Expr -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr
sixtuple Expr
e1 Expr
e2 Expr
e3 Expr
e4 Expr
e5 Expr
e6 = Expr
cccccE Expr -> Expr -> Expr
:$ Expr
e1 Expr -> Expr -> Expr
:$ Expr
e2 Expr -> Expr -> Expr
:$ Expr
e3 Expr -> Expr -> Expr
:$ Expr
e4 Expr -> Expr -> Expr
:$ Expr
e5 Expr -> Expr -> Expr
:$ Expr
e6
where
cccccE :: Expr
cccccE = [Char]
-> (Int
-> Int
-> Int
-> Int
-> Int
-> Int
-> (Int, Int, Int, Int, Int, Int))
-> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
",,,,," ((,,,,,) :: Int -> Int -> Int -> Int -> Int -> Int -> (Int,Int,Int,Int,Int,Int))
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] -> ([Bool] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"and" ([Bool] -> 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] -> ([Bool] -> Bool) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"or" ([Bool] -> 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] -> ([Int] -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"sum" ([Int] -> 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] -> ([Int] -> Int) -> Expr
forall a. Typeable a => [Char] -> a -> Expr
value [Char]
"product" ([Int] -> 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]
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)
]