Kind/book/Kind.Term.parser.kind2
Victor Taelin 85ad65b026 use-notation
Now, there are two local binders:

let x = ...
use x = ...

The 'let' binder will create a local definition, type-check it, and
assign a name to it. When compiled, it will create 'dup' nodes.

The 'use' binder is just an alias. It will not bind a new variable, and,
when compiled, will create inline copies. Also, for type-checking, it
allows creating aliases that are definitionaly equal for the checker.
2024-03-08 17:39:37 -03:00

50 lines
1.4 KiB
Plaintext

Kind.Term.parser
: (Parser Kind.PreTerm)
= use TRY = (List.cons (Parser.Guard Kind.PreTerm))
use END = (List.nil (Parser.Guard Kind.PreTerm))
(Parser.variant
Kind.PreTerm
(TRY
Kind.Term.parser.all
(TRY
Kind.Term.parser.lam
(TRY
Kind.Term.parser.app
(TRY
Kind.Term.parser.ann
(TRY
Kind.Term.parser.slf
(TRY
Kind.Term.parser.ins
(TRY
Kind.Term.parser.set
(TRY
Kind.Term.parser.def
(TRY
Kind.Term.parser.u60
(TRY
Kind.Term.parser.op2
(TRY
Kind.Term.parser.mat
(TRY
Kind.Term.parser.chr
(TRY
Kind.Term.parser.str
(TRY
Kind.Term.parser.num
(TRY Kind.Term.parser.hol (TRY Kind.Term.parser.var END))
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)