There is a syntax difference between data constructors with
several parameters and data constructors with one parameter of type
t-uple.
The declaration of a data constructor with several parameters is
done by separating the types with ``and''. In expressions and
patterns, this constructor parameters must be currified:
| Ocaml | Righteous |
| type t = C of t1 * t2;; | type t = [ C of t1 and t2 ]; |
| C (x, y);; | C x y; |
The declaration of a data constructor with one parameter of type
t-uple is done by using a t-uple type. In expressions and patterns,
the parameter has not to be currified, since it is alone:
| Ocaml | Righteous |
| type t = D of (t1 * t2);; | type t = [ D of (t1 * t2) ]; |
| D (x, y);; | D (x, y); |