- Do
make depend
andmake
. You'll getminiml
.
It's like OCaml but type annotations are required for variable declarations.
- Types:
int
,bool
,S->T
. - Constants: integers,
true
,false
- Usual constructs such as:
let x = e1 in e2
,if e1 then e2 else e3
,+
,*
,<
- Abstraction:
fun (x : T) -> e
- The argument type
: T
is mandatory.
- The argument type
- Recursion:
let rec f (x:S) : T = e in e
- The return type annotation
: T
is mandatory.
- The return type annotation
- Lists:
[T]
(empty list ofT list
),e::e
(cons) - Case analysis on lists:
match e with [] -> e | x :: y -> e
- Top-level input:
e;;
,let x : T = e;;
,let f (x:T1) = e;;
, orlet rec f (x:T1) : T = e;;
.