Module Merlin_sherlodoc.Type_polarity

Describes the polarity sign of a type negative for contravariant parameters and positive for covariant parameters (the return of the function).

type t
val positive : t
val negative : t
val negate : t -> t

negate x returns positive if x is negative and negative if x is positive.

val equal : t -> t -> bool

Equality between polarity sign.

val compare : t -> t -> int

A comparison that act that negative < positive.

val to_string : t -> string

Simple printer for polarity sign.