Type Alias gluon_check::unify_type::UnifierState
source · pub type UnifierState<'a, U> = UnifierState<State<'a>, U>;
Aliased Type§
struct UnifierState<'a, U> {
pub state: State<'a>,
pub unifier: U,
}
Fields§
§state: State<'a>
§unifier: U
Trait Implementations§
source§impl<'a, 'e> Unifier<State<'a>, ArcType> for UnifierState<'a, Equal<'e>>
impl<'a, 'e> Unifier<State<'a>, ArcType> for UnifierState<'a, Equal<'e>>
source§fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
Reports an error to the
unifier
for cases when returning the error is not possible.fn try_match_res( &mut self, l: &RcType, r: &RcType ) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
fn error_type(&self) -> RcType
source§fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
Attempt to unify
l
and r
using the strategy of Self
.source§fn allow_returned_type_replacement(&self) -> bool
fn allow_returned_type_replacement(&self) -> bool
true
if the returned type can be replaced by the callersource§impl<'a> Unifier<State<'a>, ArcType> for UnifierState<'a, Instantiation<'_, '_>>
impl<'a> Unifier<State<'a>, ArcType> for UnifierState<'a, Instantiation<'_, '_>>
source§fn report_error(
&mut self,
_error: UnifyError<TypeError<Symbol, RcType>, RcType>
)
fn report_error( &mut self, _error: UnifyError<TypeError<Symbol, RcType>, RcType> )
Reports an error to the
unifier
for cases when returning the error is not possible.fn try_match_res( &mut self, l: &RcType, r: &RcType ) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
fn error_type(&self) -> RcType
source§fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
Attempt to unify
l
and r
using the strategy of Self
.source§fn allow_returned_type_replacement(&self) -> bool
fn allow_returned_type_replacement(&self) -> bool
true
if the returned type can be replaced by the callersource§impl<'a, 'e> Unifier<State<'a>, ArcType> for UnifierState<'a, Smaller>
impl<'a, 'e> Unifier<State<'a>, ArcType> for UnifierState<'a, Smaller>
source§fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
Reports an error to the
unifier
for cases when returning the error is not possible.fn try_match_res( &mut self, l: &RcType, r: &RcType ) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
fn error_type(&self) -> RcType
source§fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
fn try_match(&mut self, l: &Type, r: &Type) -> Option<Type>
Attempt to unify
l
and r
using the strategy of Self
.source§fn allow_returned_type_replacement(&self) -> bool
fn allow_returned_type_replacement(&self) -> bool
true
if the returned type can be replaced by the callersource§impl<'a, 'e> Unifier<State<'a>, ArcType> for UnifierState<'a, Subsume<'e>>
impl<'a, 'e> Unifier<State<'a>, ArcType> for UnifierState<'a, Subsume<'e>>
source§fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
fn report_error(&mut self, error: UnifyError<TypeError<Symbol, RcType>, RcType>)
Reports an error to the
unifier
for cases when returning the error is not possible.source§fn allow_returned_type_replacement(&self) -> bool
fn allow_returned_type_replacement(&self) -> bool
true
if the returned type can be replaced by the caller