mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 17:46:40 +03:00
13 lines
567 B
Plaintext
13 lines
567 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))))))))
|