[−][src]Trait gluon_check::unify::Unifier
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>>
&mut self,
l: &Type,
r: &Type
) -> Result<Option<Type>, Error<Type::Error, Type>>
fn error_type(&self) -> Type
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
Implementors
impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> for gluon_check::unify_type::UnifierState<'a, Subsume<'e>>
[src]
fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
[src]
fn allow_returned_type_replacement(&self) -> bool
[src]
fn try_match_res(
&mut self,
l: &RcType,
r: &RcType
) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
[src]
&mut self,
l: &RcType,
r: &RcType
) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
fn error_type(&self) -> RcType
[src]
fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
[src]
impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> for gluon_check::unify_type::UnifierState<'a, Equal<'e>>
[src]
fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
[src]
fn try_match_res(
&mut self,
l: &RcType,
r: &RcType
) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
[src]
&mut self,
l: &RcType,
r: &RcType
) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
fn error_type(&self) -> RcType
[src]
fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
[src]
fn allow_returned_type_replacement(&self) -> bool
[src]
impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> for gluon_check::unify_type::UnifierState<'a, Smaller>
[src]
fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
[src]
fn try_match_res(
&mut self,
l: &RcType,
r: &RcType
) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
[src]
&mut self,
l: &RcType,
r: &RcType
) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
fn error_type(&self) -> RcType
[src]
fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
[src]
fn allow_returned_type_replacement(&self) -> bool
[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]
T: Unifiable<S> + PartialEq + Clone + Display + 'e,
T::Variable: Clone,
T::Factory: Clone,
fn report_error(&mut self, error: Error<T::Error, T>)
[src]
fn try_match_res(
&mut self,
l_orig: &T,
r_orig: &T
) -> Result<Option<T>, Error<T::Error, T>>
[src]
&mut self,
l_orig: &T,
r_orig: &T
) -> Result<Option<T>, Error<T::Error, T>>