Module Merlin_sherlodoc.Type_exprSource

A representation of internal types, with superfluous information removed to make it easier to compare them and calculate their distance.

Sourcetype t =
  1. | Arrow of t * t
  2. | Tycon of string * t list
  3. | Tuple of t list
  4. | Tyvar of int
  5. | Wildcard
  6. | Unhandled

Type variables are indexed by integers calculated according to their positions. For example, in the expression of type 'a -> 'b -> 'c, respectively 'a will have the value 1, 'b will have the value 2 and ’c will have the value 3.

This makes 'a -> 'b -> 'c isomorphic to ’foo -> 'bar -> 'baz.

Sourceval normalize_type_parameters : Type_parsed.t -> t

normalize_type_parameters ty replace string based type variables to integer based type variables.

Sourceval from_string : string -> t option

Try deserializing a string into a typed expression.

Sourceval to_string : t -> string

Render a type to a string.

Sourceval equal : t -> t -> bool

Equality between types