Function gluon_check::unify::unify

source ·
pub fn unify<S, T>(
    subs: &Substitution<T>,
    state: S,
    l: &T,
    r: &T
) -> Result<T, Errors<Error<T::Error, T>>>
Expand description

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.