pub struct State<'a> {
    pub in_alias: bool,
    /* private fields */
}

Fields§

§in_alias: bool

Implementations§

source§

impl<'a> State<'a>

source

pub fn new( env: &'a (dyn TypeEnv<Type = RcType> + 'a), subs: &'a Substitution<RcType> ) -> State<'a>

source

pub fn with_refinement( env: &'a (dyn TypeEnv<Type = RcType> + 'a), subs: &'a Substitution<RcType>, refinement: bool ) -> State<'a>

Trait Implementations§

source§

impl<'a> Clone for State<'a>

source§

fn clone(&self) -> State<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

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>,

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

fn error_type(state: &State<'a>) -> Self

source§

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>)

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

fn try_match_res( &mut self, l: &RcType, r: &RcType ) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>

source§

fn error_type(&self) -> RcType

source§

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

true if the returned type can be replaced by the caller
source§

impl<'a> Unifier<State<'a>, ArcType<Symbol>> for UnifierState<'a, Instantiation<'_, '_>>

source§

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 try_match_res( &mut self, l: &RcType, r: &RcType ) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>

source§

fn error_type(&self) -> RcType

source§

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

true if the returned type can be replaced by the caller
source§

impl<'a, 'e> Unifier<State<'a>, ArcType<Symbol>> for UnifierState<'a, Smaller>

source§

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 try_match_res( &mut self, l: &RcType, r: &RcType ) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>

source§

fn error_type(&self) -> RcType

source§

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

true if the returned type can be replaced by the caller
source§

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>)

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

fn allow_returned_type_replacement(&self) -> bool

true if the returned type can be replaced by the caller
source§

fn try_match_res( &mut self, l: &RcType, r: &RcType ) -> Result<Option<RcType>, UnifyError<TypeError<Symbol, RcType>, RcType>>

source§

fn error_type(&self) -> RcType

source§

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

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

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<Id> AsId<Id> for Idwhere Id: ?Sized,

source§

fn as_id(&self) -> &Id

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.