pub enum InstanceHeadProblem {
NotAClass,
ClassApplied(usize),
Variable(Name),
Function,
Record,
ArgumentNotVariable,
RepeatedVariable(Name),
}Expand description
What is wrong with an instance head — see Error::InvalidInstanceHead.
A head is a class name applied to one type, and that type is a declared type applied
to distinct variables, a tuple of distinct variables, or ().
Variants§
NotAClass
Something other than a class name applied to a type — instance a where.
ClassApplied(usize)
The class applied to some number of types other than one — instance Eq Int Char.
Variable(Name)
A bare type variable — instance Eq a.
Function
A function type — instance Eq (a -> b).
Record
A record type.
ArgumentNotVariable
An argument of the head’s type that is not a type variable — Int in
instance Eq (Maybe Int).
RepeatedVariable(Name)
A variable the head already bound — the second a of instance Eq (Pair a a).
Trait Implementations§
Source§impl Clone for InstanceHeadProblem
impl Clone for InstanceHeadProblem
Source§fn clone(&self) -> InstanceHeadProblem
fn clone(&self) -> InstanceHeadProblem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InstanceHeadProblem
impl Debug for InstanceHeadProblem
Source§impl PartialEq for InstanceHeadProblem
impl PartialEq for InstanceHeadProblem
impl StructuralPartialEq for InstanceHeadProblem
Auto Trait Implementations§
impl Freeze for InstanceHeadProblem
impl RefUnwindSafe for InstanceHeadProblem
impl Send for InstanceHeadProblem
impl Sync for InstanceHeadProblem
impl Unpin for InstanceHeadProblem
impl UnsafeUnpin for InstanceHeadProblem
impl UnwindSafe for InstanceHeadProblem
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