mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 19:47:15 +03:00
41 lines
935 B
Plaintext
41 lines
935 B
Plaintext
Kind.Term.parser.app
|
|
: (Parser.Guard Kind.PreTerm)
|
|
= (Parser.Guard.text
|
|
Kind.PreTerm
|
|
"("
|
|
(Kind.Term.parser.bind
|
|
Unit
|
|
(Parser.text "(")
|
|
λ_
|
|
(Kind.Term.parser.bind
|
|
Kind.PreTerm
|
|
Kind.Term.parser
|
|
λfun
|
|
(Kind.Term.parser.bind
|
|
(List Kind.PreTerm)
|
|
(Parser.until
|
|
Kind.PreTerm
|
|
(Parser.skip Bool (Parser.test ")"))
|
|
Kind.Term.parser
|
|
)
|
|
λterms
|
|
(Kind.Term.parser.bind
|
|
Unit
|
|
(Parser.text ")")
|
|
λ_
|
|
(Kind.Term.parser.pure
|
|
λscp
|
|
(List.fold
|
|
Kind.PreTerm
|
|
terms
|
|
∀(fun: Kind.Term) Kind.Term
|
|
λarg λrec λfun (rec (Kind.app fun (arg scp)))
|
|
λfun fun
|
|
(fun scp)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
) |