Trait gluon_check::unify::Unifiable [] [src]

pub trait Unifiable<S>: Substitutable + Sized {
    type Error;
    fn zip_match<U>(
        &self,
        other: &Self,
        unifier: &mut UnifierState<S, U>
    ) -> Result<Option<Self>, Error<Self, Self::Error>>
    where
        U: Unifier<S, Self>
; }

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

Associated Types

Required Methods

Perform one level of equality testing between self and other and recursively call back into the unifier for unification on any sub-terms.

Returns Ok if the the immediate level of self and other were equal and optionally returns a more specific type (if None is returned self should be chosen as the type if that becomes necessary). Returns Err if the immediate level were not equal.

Implementors