mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 20:47:25 +03:00
62 lines
1.5 KiB
Plaintext
62 lines
1.5 KiB
Plaintext
Kind.if.mat
|
|
: ∀(term: Kind.Term)
|
|
∀(P: *)
|
|
∀(Y:
|
|
∀(nam: String)
|
|
∀(x: Kind.Term)
|
|
∀(z: Kind.Term)
|
|
∀(s: ∀(x: Kind.Term) Kind.Term)
|
|
∀(p: ∀(x: Kind.Term) Kind.Term)
|
|
P
|
|
)
|
|
∀(N: ∀(val: Kind.Term) P)
|
|
P
|
|
= λterm λP λY λN
|
|
let P = λx
|
|
∀(Y:
|
|
∀(nam: String)
|
|
∀(x: Kind.Term)
|
|
∀(z: Kind.Term)
|
|
∀(s: ∀(x: Kind.Term) Kind.Term)
|
|
∀(p: ∀(x: Kind.Term) Kind.Term)
|
|
P
|
|
)
|
|
∀(N: ∀(val: Kind.Term) P)
|
|
P
|
|
let all = λnam λinp λbod λY λN (N (Kind.all nam inp bod))
|
|
let lam = λnam λbod λY λN (N (Kind.lam nam bod))
|
|
let app = λfun λarg λY λN (N (Kind.app fun arg))
|
|
let ann = λval λtyp λY λN (N (Kind.ann val typ))
|
|
let slf = λnam λbod λY λN (N (Kind.slf nam bod))
|
|
let ins = λval λY λN (N (Kind.ins val))
|
|
let ref = λnam λval λY λN (N (Kind.ref nam val))
|
|
let def = λnam λval λbod λY λN (N (Kind.def nam val bod))
|
|
let set = λY λN (N Kind.set)
|
|
let u60 = λY λN (N Kind.u60)
|
|
let num = λval λY λN (N (Kind.num val))
|
|
let op2 = λopr λfst λsnd λY λN (N (Kind.op2 opr fst snd))
|
|
let mat = λnam λx λz λs λp λY λN (Y nam x z s p)
|
|
let txt = λlit λY λN (N (Kind.txt lit))
|
|
let hol = λnam λctx λY λN (N (Kind.hol nam ctx))
|
|
let var = λnam λidx λY λN (N (Kind.var nam idx))
|
|
(~term
|
|
P
|
|
all
|
|
lam
|
|
app
|
|
ann
|
|
slf
|
|
ins
|
|
ref
|
|
def
|
|
set
|
|
u60
|
|
num
|
|
op2
|
|
mat
|
|
txt
|
|
hol
|
|
var
|
|
Y
|
|
N
|
|
) |