- menhir
- Do
make dependandmake. You'll getpbci.- Or, do
omake.
- Or, do
- Not maintained right now: If you have BER MetaOCaml, do
make metainstead ofmake.
- Uppercase IDs for type variables.
- Lowercase IDs for term variables.
- Types:
int,bool,?(for type dynamic),S->T,All X.T.- Nested
Allcan be abbreviated, e.g.,All X Y.TforAll X. All Y. T.
- Nested
- Constants: integers,
true,false - Usual constructs such as:
let x = e1 in e2,if e1 then e2 else e3,+,*,< - Abstraction:
fun (x : T) -> e - Type abstraction:
fun X -> e - Type application:
e [T] - Recursion:
let rec f (x:S) : T = e in e- The return type annotation
: Tis mandatory.
- The return type annotation
- Ascription:
(e : T)(parentheses always required) - Cast:
(e : S => T)(parentheses always required) - Lists:
[@T](empty list ofT list),e::e- Omitting
@Tmakes? list [e; ...; e; @T](where "; @T" can be omitted) is supported
- Omitting
- Case analysis on lists:
match e with [] -> e | x :: y -> e - Top-level input:
e;;,let x : T = e;;,let f (x:T1) : T = e, orlet rec f (x:T1) : T = e;;.- Type annotation
:Tis optional in non-recursive definitions.
- Type annotation
- A list of parameters allowed for
let(let rec) andfun, as infun X (x:X) -> xorlet id X (x:X) : X = x;;let rectakes the formlet rec f X1 ... Xn (x:S) ... : T = e in ebut type abstractions byXi(preceding the first term variable) are done outside of recursion.- In other words, this is not polymorphic recursion; the type of
fisS -> Tfor fixedXi.)
- In other words, this is not polymorphic recursion; the type of
- Add more test inputs in test.gtf
- Data structures: pairs
- Implement reduction (not evaluation) for assist proofs
- pretty printer for Fg- ad Fc-terms
print_typedoesn't handle variable names declared twice properly.