[][src]Trait gluon_check::unify::Unifier

pub trait Unifier<S, Type> where
    Type: Unifiable<S>, 
{ fn report_error(&mut self, error: Error<Type::Error, Type>);
fn try_match_res(
        &mut self,
        l: &Type,
        r: &Type
    ) -> Result<Option<Type>, Error<Type::Error, Type>>;
fn error_type(&self) -> Type; fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type> { ... }
fn allow_returned_type_replacement(&self) -> bool { ... } }

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

Required methods

fn report_error(&mut self, error: Error<Type::Error, Type>)

Reports an error to the unifier for cases when returning the error is not possible.

fn try_match_res(
    &mut self,
    l: &Type,
    r: &Type
) -> Result<Option<Type>, Error<Type::Error, Type>>

fn error_type(&self) -> Type

Loading content...

Provided methods

fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>

Attempt to unify l and r using the strategy of Self.

fn allow_returned_type_replacement(&self) -> bool

true if the returned type can be replaced by the caller

Loading content...

Implementors

impl<'a, '_, '_> Unifier<State<'a>, ArcType<Symbol>> for gluon_check::unify_type::UnifierState<'a, Instantiation<'_, '_>>[src]

impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> for gluon_check::unify_type::UnifierState<'a, Equal<'e>>[src]

impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> for gluon_check::unify_type::UnifierState<'a, Smaller>[src]

impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> for gluon_check::unify_type::UnifierState<'a, Subsume<'e>>[src]

impl<'e, S, T> Unifier<S, T> for gluon_check::unify::UnifierState<S, Unify<'e, T, T::Error>> where
    T: Unifiable<S> + PartialEq + Clone + Display + 'e,
    T::Variable: Clone,
    T::Factory: Clone
[src]

Loading content...