Function gluon_check::unify::unify [] [src]

pub fn unify<S, T>(
    subs: &Substitution<T>,
    state: S,
    l: &T,
    r: &T
) -> Result<T, Errors<Error<T, T::Error>>> where
    T: Unifiable<S> + PartialEq + Clone,
    T::Variable: Clone

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.