Each simple definition defines one type constructor. A simple definition consists in a lowercase identifier, possibly preceded by one or several type parameters, and followed by an optional type equation, then an optional type representation, and then a constraint clause. The identifier is the name of the type constructor being defined. If no type representation is given, nothing is assumed on the structure of the type besides what is stated in the optional type equation. Constructor names must be capitalized.
Immutable fields are covariant, but mutable fields are neither covariant nor contravariant.
This generates a new type constructor and defines associated constructors or fields, through which values of that type can be directly built or inspected. In this case, the type constructor is defined as an abbreviation for the type expression given in the equation, but in addition the constructors or fields given in the representation remain attached to the defined type constructor. For abbreviations, variant types or record types, the variance properties of the type constructor are inferred from its definition, and the variance annotations are only checked for conformance with the definition. Type variables of typexpr can appear in the type equation and the type declaration. The constructors are declared as for a definition of a variant type.