Module gluon_check::unify [] [src]

Structs

UnifierState

Enums

Error

Traits

Fresh
GenericVariant
Unifiable

A type which can be unified by checking for equivalence between the top level of two instances of the type and then recursively calling into the unifier on all sub-terms

Unifier

A Unifier is a type which implements a unifying strategy between two values.

Functions

intersection

Calculates the intersection between two types. The intersection between two types is the most specialized type which both types can sucessfully unify to.

unify

Unify l and r taking into account and updating the substitution subs using the Union-Find algorithm to resolve which types must be equal. If the unification is successful the returned type is the unified type with as much sharing as possible which lets further computions be more efficient.