Skip to content

Commit

Permalink
update explanation of variance annotations, following PR#7055
Browse files Browse the repository at this point in the history
  • Loading branch information
garrigue committed Nov 30, 2015
1 parent 20b59a3 commit 2934161
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions manual/manual/refman/typedecl.etex
Expand Up @@ -175,8 +175,10 @@ corresponding parameter. For instance, the abstract type declaration
supertype of $\sigma " t"$ if $\tau$ is subtype of $\sigma$.

The variance indicated by the "+" and "-" annotations on parameters
are required only for abstract types. For abbreviations, variant
types or record types, the variance properties of the type constructor
is enforced only for abstract and private types, or when there are
type constraints.
Otherwise, for abbreviations, variant and record types without type
constraints, the variance properties of the type constructor
are inferred from its definition, and the variance annotations are
only checked for conformance with the definition.

Expand Down

0 comments on commit 2934161

Please sign in to comment.