pub enum MonomorphicType {
Primitive(PrimitiveType),
Var(TVar),
Fn(Box<MonomorphicType>, Box<MonomorphicType>),
Tuple(Tuple),
Pointer(Box<MonomorphicType>),
Constant(String),
}
Variants§
Primitive(PrimitiveType)
Var(TVar)
Fn(Box<MonomorphicType>, Box<MonomorphicType>)
Tuple(Tuple)
Pointer(Box<MonomorphicType>)
Constant(String)
Implementations§
Source§impl MonomorphicType
impl MonomorphicType
pub fn unify( &self, other: &MonomorphicType, ) -> Result<Substitutions, AlgorithmUError>
Source§impl MonomorphicType
impl MonomorphicType
pub fn generalize(&self, free: &HashSet<TVar>) -> PolymorphicType
pub fn normalize(self) -> PolymorphicType
Trait Implementations§
Source§impl BitAnd<&Substitutions> for &MonomorphicType
impl BitAnd<&Substitutions> for &MonomorphicType
Source§type Output = MonomorphicType
type Output = MonomorphicType
The resulting type after applying the
&
operator.Source§impl BitAnd<&Substitutions> for MonomorphicType
impl BitAnd<&Substitutions> for MonomorphicType
Source§type Output = MonomorphicType
type Output = MonomorphicType
The resulting type after applying the
&
operator.Source§impl BitAnd<Substitutions> for &MonomorphicType
impl BitAnd<Substitutions> for &MonomorphicType
Source§type Output = MonomorphicType
type Output = MonomorphicType
The resulting type after applying the
&
operator.Source§impl BitAnd<Substitutions> for MonomorphicType
impl BitAnd<Substitutions> for MonomorphicType
Source§type Output = MonomorphicType
type Output = MonomorphicType
The resulting type after applying the
&
operator.Source§impl Clone for MonomorphicType
impl Clone for MonomorphicType
Source§fn clone(&self) -> MonomorphicType
fn clone(&self) -> MonomorphicType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MonomorphicType
impl Debug for MonomorphicType
Source§impl Display for MonomorphicType
impl Display for MonomorphicType
Source§impl From<Box<MonomorphicType>> for MonomorphicType
impl From<Box<MonomorphicType>> for MonomorphicType
Source§fn from(original: Box<MonomorphicType>) -> MonomorphicType
fn from(original: Box<MonomorphicType>) -> MonomorphicType
Converts to this type from the input type.
Source§impl From<PrimitiveType> for MonomorphicType
impl From<PrimitiveType> for MonomorphicType
Source§fn from(original: PrimitiveType) -> MonomorphicType
fn from(original: PrimitiveType) -> MonomorphicType
Converts to this type from the input type.
Source§impl From<String> for MonomorphicType
impl From<String> for MonomorphicType
Source§fn from(original: String) -> MonomorphicType
fn from(original: String) -> MonomorphicType
Converts to this type from the input type.
Source§impl From<TVar> for MonomorphicType
impl From<TVar> for MonomorphicType
Source§fn from(original: TVar) -> MonomorphicType
fn from(original: TVar) -> MonomorphicType
Converts to this type from the input type.
Source§impl From<Tuple> for MonomorphicType
impl From<Tuple> for MonomorphicType
Source§fn from(original: Tuple) -> MonomorphicType
fn from(original: Tuple) -> MonomorphicType
Converts to this type from the input type.
Source§impl Hash for MonomorphicType
impl Hash for MonomorphicType
Source§impl PartialEq for MonomorphicType
impl PartialEq for MonomorphicType
impl Eq for MonomorphicType
impl StructuralPartialEq for MonomorphicType
Auto Trait Implementations§
impl Freeze for MonomorphicType
impl RefUnwindSafe for MonomorphicType
impl Send for MonomorphicType
impl Sync for MonomorphicType
impl Unpin for MonomorphicType
impl UnwindSafe for MonomorphicType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more