| Ocaml | Revised |
|---|---|
| int list | list int |
| ('a, bool) Hashtbl.t | Hashtbl.t 'a bool |
| type 'a foo = | type foo 'a = |
| 'a list list;; | list (list 'a); |
| Ocaml | Revised |
|---|---|
| type 'a foo;; | type foo 'a = 'b; |
| type bar;; | type bar = 'a; |
| Ocaml | Revised |
|---|---|
| int * bool | (int * bool) |
| Ocaml | Revised |
|---|---|
| type t = A of i | B;; | type t = [ A of i | B ]; |
type foo = [];
and''. In expressions and
patterns, this constructor parameters must be currified:
| Ocaml | Revised |
|---|---|
| type t = C of t1 * t2;; | type t = [ C of t1 and t2 ]; |
| C (x, y);; | C x y; |
| Ocaml | Revised |
|---|---|
| type t = D of (t1 * t2);; | type t = [ D of (t1 * t2) ]; |
| D (x, y);; | D (x, y); |
True'' and ``False''
start with an uppercase letter.mutable'' must appear
after the colon:
| Ocaml | Revised |
|---|---|
| type t = {mutable x : t1};; | type t = {x : mutable t1}; |