| TypeScheme | |||
| ::= | BoundTypeVarsopt Type | ||
| BoundTypeVars | |||
| ::= | [ BoundTypeVar (, BoundTypeVar)* ] | ||
| BoundTypeVar | |||
| ::= | TypeVar (<: Type)opt | ||
| Types | |||
| ::= | TypeTuple | ||
| | | Type | ||
| TypeTuple | |||
| ::= | ( (Type (, Type)+)opt ) | ||
| Type | |||
| ::= | FunType | ||
| | | AtomicType | ||
| FunType | |||
| ::= | AtomicTypes -> FunType | ||
| | | AtomicTypes -> AtomicTypes | ||
| AtomicTypes | |||
| ::= | TypeTuple | ||
| | | AtomicType | ||
| AtomicType | |||
| ::= | TypeVar | ||
| | | NamedType | ||
| | | $ TypeTuple | ||
| NamedType | |||
| ::= | Pathopt TypeId TypeArgsopt | ||
| | | typeof ( NamedClass ) | ||
| | | # NamedClass | ||
| TypeArgs | |||
| ::= | ( Type (, Type)* ) | ||
| RecordType | |||
| ::= | {| LabeledTypesopt |} | ||
| LabeledTypes | |||
| ::= | Label : ExtendedType (, Label : ExtendedType)* | ||
| ExtendedType | |||
| ::= | TypeScheme | ||
| | | var Type | ||
enumtype Order { Less, Equal, Greater }