pub enum InvalidConstraintKind {
Variable(Name),
Unapplied(Name),
Arrow,
Tuple,
Unit,
Record,
}Expand description
What was written in front of => in place of a constraint — see
Error::InvalidConstraint.
A constraint is an uppercase name applied to one or more type arguments, and a
context is one constraint or a parenthesised, comma-separated list of them
([parser::Context]). This names every other shape an element of that list can
take, one per remaining [parser::TypeKind] case.
Variants§
Variable(Name)
A type variable on its own — a => a.
Unapplied(Name)
An uppercase name with no argument — Int => a, and so each half of
(Int, Char) => a. Carries the name so the message can quote it.
Arrow
A function type — Int -> Int => a.
Tuple
A tuple inside the parenthesised list — ((Eq a, Eq b), Eq c) => a. The
parser reads the outermost parentheses as the list, so only a tuple nested
in it reaches here.
Unit
The unit type — () => a.
Record
A record type — { x : a } => a.
Trait Implementations§
Source§impl Clone for InvalidConstraintKind
impl Clone for InvalidConstraintKind
Source§fn clone(&self) -> InvalidConstraintKind
fn clone(&self) -> InvalidConstraintKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more