Struct gluon_check::unify_type::State
source · pub struct State<'a> {
pub in_alias: bool,
/* private fields */
}
Fields§
§in_alias: bool
Implementations§
Trait Implementations§
source§impl<'a> Unifiable<State<'a>> for RcType
impl<'a> Unifiable<State<'a>> for RcType
type Error = TypeError<Symbol, ArcType<Symbol>>
source§fn zip_match<U>(
&self,
other: &Self,
unifier: &mut UnifierState<'a, U>
) -> Result<Option<Self>, Error<Symbol, RcType>>where
UnifierState<'a, U>: Unifier<State<'a>, Self>,
fn zip_match<U>( &self, other: &Self, unifier: &mut UnifierState<'a, U> ) -> Result<Option<Self>, Error<Symbol, RcType>>where UnifierState<'a, U>: Unifier<State<'a>, Self>,
Perform one level of equality testing between
self
and other
and recursively call
back into the unifier
for unification on any sub-terms. Read morefn error_type(state: &State<'a>) -> Self
source§impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> for UnifierState<'a, Equal<'e>>
impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> 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<Symbol>> for UnifierState<'a, Instantiation<'_, '_>>
impl<'a> Unifier<State<'a>, ArcType<Symbol>> 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<Symbol>> for UnifierState<'a, Smaller>
impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> 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<Symbol>> for UnifierState<'a, Subsume<'e>>
impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> 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 callerfn try_match_res( &mut self, l: &RcType, r: &RcType ) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>
fn error_type(&self) -> RcType
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for State<'a>
impl<'a> !Send for State<'a>
impl<'a> !Sync for State<'a>
impl<'a> Unpin for State<'a>
impl<'a> !UnwindSafe for State<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more