type-definition | ::= | type typedef { and typedef } |
typedef | ::= | [type-params] typeconstr-name [type-equation] [type-representation] { type-constraint } |
type-equation | ::= | = typexpr |
type-representation | ::= | = constr-decl { | constr-decl } |
| | = { label-decl { ; label-decl } } | |
type-params | ::= | ' ident |
| | ( ' ident { , ' ident } ) | |
constr-decl | ::= | cconstr-name |
| | ncconstr-name of typexpr | |
label-decl | ::= | label-name : typexpr |
| | mutable label-name : typexpr | |
type-constraint | ::= | constraint ' ident = typexpr |
exception-definition | ::= | exception constr-decl |
exn
of exception values. The constructors are declared as
for a definition of a variant type.