Skip to main content

Error

Enum Error 

Source
pub enum Error<'a> {
Show 76 variants DuplicateTest { name: &'a str, first: Region, second: Region, }, ValidatorMissingMain { region: Region, module: &'a str, }, ValidatorMainNotExposed { region: Region, module: &'a str, }, RecordLiteralNoAlias { region: Region, fields: &'a [&'a str], }, RecordLiteralAmbiguous { region: Region, candidates: &'a [QualifiedName<'a>], }, RecordTypeOutsideAlias { region: Region, }, OutOfFuel { region: Region, }, NegateWithoutNum { region: Region, }, DoWithoutMonad { region: Region, }, RefutableBindPattern { region: Region, }, StructuralEqOverride { head: &'a Located<Type<'a>>, }, ReflexiveLiftOverlap { heads: &'a [&'a Located<Type<'a>>], }, MissingSuperclass { region: Region, trait_: QualifiedName<'a>, heads: &'a [Located<Head<'a>>], superclass: &'a Pred<'a>, index: u16, reason: Failure, }, BadInstanceHead { region: Region, reason: BadHead, }, ImplContextVarNotInHead { region: Region, name: &'a str, }, MissingMethod { region: Region, trait_: &'a str, name: &'a str, }, UnknownMethod { region: Region, trait_: &'a str, name: &'a str, }, OrphanImpl { region: Region, trait_: QualifiedName<'a>, heads: &'a [HeadCon<'a>], }, OverlappingImpls { key: &'a ImplKey<'a>, first: Region, second: Region, first_home: ModuleName<'a>, second_home: ModuleName<'a>, }, ImportOpenTrait { region: Region, name: &'a str, }, DuplicateTrait { name: &'a str, first: Region, second: Region, }, DuplicateMethod { name: &'a str, first: Region, second: Region, }, DuplicateTraitParameter { name: &'a str, first: Region, second: Region, }, SuperclassBadArg { region: Region, trait_: &'a str, }, MethodMissingParameter { region: Region, method: &'a str, parameter: &'a str, }, RecursiveSuperclass { names: &'a [&'a Located<&'a str>], }, ExportOpenTrait { region: Region, name: &'a str, }, NotFoundTrait { region: Region, prefix: Option<&'a str>, name: &'a str, }, AmbiguousTrait { region: Region, prefix: Option<&'a str>, name: &'a str, first_module: ModuleName<'a>, other_modules: &'a [ModuleName<'a>], }, TraitArity { region: Region, name: &'a str, expected: usize, actual: usize, }, ContextVarNotInType { region: Region, name: &'a str, }, KindMismatch { region: Region, context: &'a KindContext<'a>, expected: &'a Kind<'a>, actual: &'a Kind<'a>, }, KindInfinite { region: Region, context: &'a KindContext<'a>, }, RepresentationMismatch { region: Region, context: &'a KindContext<'a>, required: ReprTrait, actual: Repr, }, ContradictoryRepresentation { region: Region, subject: &'a Located<Type<'a>>, }, ImplOfBuiltinTrait { region: Region, trait_: QualifiedName<'a>, }, IrregularRecursion { region: Region, constructor: QualifiedName<'a>, parameter: &'a str, }, Unsupported { feature: &'static str, region: Region, }, MissingModuleHeader, NotFoundType { region: Region, prefix: Option<&'a str>, name: &'a str, suggestions: PossibleNames<'a>, }, ImportNotFound { region: Region, module: &'a str, }, AmbiguousType { region: Region, prefix: Option<&'a str>, name: &'a str, first_module: ModuleName<'a>, other_modules: &'a [ModuleName<'a>], }, BadArity { region: Region, context: BadArityContext, name: &'a str, expected: usize, actual: usize, }, ExportNotFound { region: Region, kind: VarKind, name: &'a str, suggestions: &'a [&'a str], }, ExportOpenAlias { region: Region, name: &'a str, }, DuplicateDecl { name: &'a str, first: Region, second: Region, }, DuplicateType { name: &'a str, first: Region, second: Region, }, DuplicateCtor { name: &'a str, first: Region, second: Region, }, DuplicateBinop { name: &'a str, first: Region, second: Region, }, BinopFunctionNotFound { region: Region, op: &'a str, function: &'a str, }, DuplicateUnionArg { type_name: &'a str, arg_name: &'a str, first: Region, second: Region, }, DuplicateAliasArg { type_name: &'a str, arg_name: &'a str, first: Region, second: Region, }, RecursiveAlias { region: Region, name: &'a str, args: &'a [&'a str], typ: &'a Located<Type<'a>>, others: &'a [&'a str], }, TypeVarsUnboundInUnion { region: Region, name: &'a str, args: &'a [&'a str], unbound: (&'a str, Region), more_unbound: &'a [(&'a str, Region)], }, TypeVarsMessedUpInAlias { region: Region, name: &'a str, args: &'a [&'a str], unused: &'a [(&'a str, Region)], unbound: &'a [(&'a str, Region)], }, LabeledCtorMissingField { region: Region, ctor: &'a str, field: &'a str, }, LabeledCtorExtraField { region: Region, ctor: &'a str, field: &'a str, }, LabeledCtorUnknownField { region: Region, ctor: &'a str, field: &'a str, }, DuplicateField { name: &'a str, first: Region, second: Region, }, ExportDuplicate { name: &'a str, first: Region, second: Region, }, NotFoundCtor { region: Region, prefix: Option<&'a str>, name: &'a str, suggestions: PossibleNames<'a>, }, AmbiguousCtor { region: Region, prefix: Option<&'a str>, name: &'a str, first_module: ModuleName<'a>, other_modules: &'a [ModuleName<'a>], }, PatternHasRecordCtor { region: Region, name: &'a str, }, DuplicatePattern { context: DuplicatePatternContext<'a>, name: &'a str, first: Region, second: Region, }, NotFoundVar { region: Region, prefix: Option<&'a str>, name: &'a str, suggestions: PossibleNames<'a>, }, AmbiguousVar { region: Region, prefix: Option<&'a str>, name: &'a str, first_module: ModuleName<'a>, other_modules: &'a [ModuleName<'a>], }, NotFoundBinop { region: Region, name: &'a str, available: &'a [&'a str], }, AmbiguousBinop { region: Region, name: &'a str, first_module: ModuleName<'a>, other_modules: &'a [ModuleName<'a>], }, BinopConflict { region: Region, op1: &'a str, op2: &'a str, }, Shadowing { name: &'a str, original: Region, new: Region, }, RecursiveLet { name: &'a Located<&'a str>, others: &'a [&'a str], }, RecursiveDecl { name: &'a Located<&'a str>, others: &'a [&'a str], }, AnnotationTooShort { region: Region, name: &'a str, index: usize, leftovers: usize, }, ImportExposingNotFound { region: Region, module: ModuleName<'a>, name: &'a str, available: &'a [&'a str], }, ImportCtorByName { region: Region, name: &'a str, type_name: &'a str, }, ImportOpenAlias { region: Region, name: &'a str, },
}

Variants§

§

DuplicateTest

Fields

§name: &'a str
§first: Region
§second: Region
§

ValidatorMissingMain

Fields

§region: Region
§module: &'a str
§

ValidatorMainNotExposed

Fields

§region: Region
§module: &'a str
§

RecordLiteralNoAlias

Fields

§region: Region
§fields: &'a [&'a str]
§

RecordLiteralAmbiguous

Fields

§region: Region
§candidates: &'a [QualifiedName<'a>]
§

RecordTypeOutsideAlias

Fields

§region: Region
§

OutOfFuel

Overlap or superclass search used up the compile’s fuel.

Fields

§region: Region
§

NegateWithoutNum

Fields

§region: Region
§

DoWithoutMonad

Fields

§region: Region
§

RefutableBindPattern

Fields

§region: Region
§

StructuralEqOverride

Fields

§head: &'a Located<Type<'a>>
§

ReflexiveLiftOverlap

Fields

§heads: &'a [&'a Located<Type<'a>>]
§

MissingSuperclass

Fields

§region: Region
§trait_: QualifiedName<'a>
§heads: &'a [Located<Head<'a>>]
§superclass: &'a Pred<'a>
§index: u16
§reason: Failure
§

BadInstanceHead

Fields

§region: Region
§reason: BadHead
§

ImplContextVarNotInHead

Fields

§region: Region
§name: &'a str
§

MissingMethod

Fields

§region: Region
§trait_: &'a str
§name: &'a str
§

UnknownMethod

Fields

§region: Region
§trait_: &'a str
§name: &'a str
§

OrphanImpl

Fields

§region: Region
§trait_: QualifiedName<'a>
§heads: &'a [HeadCon<'a>]
§

OverlappingImpls

Fields

§key: &'a ImplKey<'a>
§first: Region
§second: Region
§first_home: ModuleName<'a>
§second_home: ModuleName<'a>
§

ImportOpenTrait

Fields

§region: Region
§name: &'a str
§

DuplicateTrait

Fields

§name: &'a str
§first: Region
§second: Region
§

DuplicateMethod

Fields

§name: &'a str
§first: Region
§second: Region
§

DuplicateTraitParameter

Fields

§name: &'a str
§first: Region
§second: Region
§

SuperclassBadArg

Fields

§region: Region
§trait_: &'a str
§

MethodMissingParameter

Fields

§region: Region
§method: &'a str
§parameter: &'a str
§

RecursiveSuperclass

Fields

§names: &'a [&'a Located<&'a str>]
§

ExportOpenTrait

Fields

§region: Region
§name: &'a str
§

NotFoundTrait

Fields

§region: Region
§prefix: Option<&'a str>
§name: &'a str
§

AmbiguousTrait

Fields

§region: Region
§prefix: Option<&'a str>
§name: &'a str
§first_module: ModuleName<'a>
§other_modules: &'a [ModuleName<'a>]
§

TraitArity

Fields

§region: Region
§name: &'a str
§expected: usize
§actual: usize
§

ContextVarNotInType

Fields

§region: Region
§name: &'a str
§

KindMismatch

Fields

§region: Region
§context: &'a KindContext<'a>
§expected: &'a Kind<'a>
§actual: &'a Kind<'a>
§

KindInfinite

Fields

§region: Region
§context: &'a KindContext<'a>
§

RepresentationMismatch

Fields

§region: Region
§context: &'a KindContext<'a>
§required: ReprTrait
§actual: Repr
§

ContradictoryRepresentation

Fields

§region: Region
§subject: &'a Located<Type<'a>>

A type variable or a type application such as 'f 'a.

§

ImplOfBuiltinTrait

Fields

§region: Region
§trait_: QualifiedName<'a>
§

IrregularRecursion

Fields

§region: Region
§constructor: QualifiedName<'a>
§parameter: &'a str
§

Unsupported

Fields

§feature: &'static str
§region: Region
§

MissingModuleHeader

§

NotFoundType

Fields

§region: Region
§prefix: Option<&'a str>
§name: &'a str
§suggestions: PossibleNames<'a>
§

ImportNotFound

Fields

§region: Region
§module: &'a str
§

AmbiguousType

Fields

§region: Region
§prefix: Option<&'a str>
§name: &'a str
§first_module: ModuleName<'a>
§other_modules: &'a [ModuleName<'a>]
§

BadArity

Fields

§region: Region
§name: &'a str
§expected: usize
§actual: usize
§

ExportNotFound

Fields

§region: Region
§kind: VarKind
§name: &'a str
§suggestions: &'a [&'a str]

Names that could have been meant, like Elm’s suggestion lists.

§

ExportOpenAlias

Fields

§region: Region
§name: &'a str
§

DuplicateDecl

Fields

§name: &'a str
§first: Region
§second: Region
§

DuplicateType

Fields

§name: &'a str
§first: Region
§second: Region
§

DuplicateCtor

Fields

§name: &'a str
§first: Region
§second: Region
§

DuplicateBinop

Fields

§name: &'a str
§first: Region
§second: Region
§

BinopFunctionNotFound

An infix declaration’s function is not a top-level value of the module. Elm never validates this (infix is kernel-only there, and its interface extraction crashes on the missing annotation); Nash allows user-defined operators, so it must be a real error.

Fields

§region: Region
§op: &'a str
§function: &'a str
§

DuplicateUnionArg

Fields

§type_name: &'a str
§arg_name: &'a str
§first: Region
§second: Region
§

DuplicateAliasArg

Fields

§type_name: &'a str
§arg_name: &'a str
§first: Region
§second: Region
§

RecursiveAlias

Fields

§region: Region
§name: &'a str
§args: &'a [&'a str]
§typ: &'a Located<Type<'a>>

The alias’s source type, used to suggest a type replacement.

§others: &'a [&'a str]
§

TypeVarsUnboundInUnion

Fields

§region: Region
§name: &'a str
§args: &'a [&'a str]
§unbound: (&'a str, Region)
§more_unbound: &'a [(&'a str, Region)]
§

TypeVarsMessedUpInAlias

Fields

§region: Region
§name: &'a str
§args: &'a [&'a str]
§unused: &'a [(&'a str, Region)]
§unbound: &'a [(&'a str, Region)]
§

LabeledCtorMissingField

Fields

§region: Region
§ctor: &'a str
§field: &'a str
§

LabeledCtorExtraField

Fields

§region: Region
§ctor: &'a str
§field: &'a str
§

LabeledCtorUnknownField

Fields

§region: Region
§ctor: &'a str
§field: &'a str
§

DuplicateField

Fields

§name: &'a str
§first: Region
§second: Region
§

ExportDuplicate

Fields

§name: &'a str
§first: Region
§second: Region
§

NotFoundCtor

Fields

§region: Region
§prefix: Option<&'a str>
§name: &'a str
§suggestions: PossibleNames<'a>
§

AmbiguousCtor

Fields

§region: Region
§prefix: Option<&'a str>
§name: &'a str
§first_module: ModuleName<'a>
§other_modules: &'a [ModuleName<'a>]
§

PatternHasRecordCtor

Fields

§region: Region
§name: &'a str
§

DuplicatePattern

Fields

§name: &'a str
§first: Region
§second: Region
§

NotFoundVar

Fields

§region: Region
§prefix: Option<&'a str>
§name: &'a str
§suggestions: PossibleNames<'a>
§

AmbiguousVar

Fields

§region: Region
§prefix: Option<&'a str>
§name: &'a str
§first_module: ModuleName<'a>
§other_modules: &'a [ModuleName<'a>]
§

NotFoundBinop

Fields

§region: Region
§name: &'a str
§available: &'a [&'a str]
§

AmbiguousBinop

Fields

§region: Region
§name: &'a str
§first_module: ModuleName<'a>
§other_modules: &'a [ModuleName<'a>]
§

BinopConflict

Fields

§region: Region
§op1: &'a str
§op2: &'a str
§

Shadowing

Fields

§name: &'a str
§original: Region
§

RecursiveLet

Fields

§name: &'a Located<&'a str>
§others: &'a [&'a str]
§

RecursiveDecl

Fields

§name: &'a Located<&'a str>
§others: &'a [&'a str]
§

AnnotationTooShort

Fields

§region: Region
§name: &'a str
§index: usize

How many arguments the annotation accounts for.

§leftovers: usize

How many definition arguments have no corresponding type.

§

ImportExposingNotFound

Fields

§region: Region
§module: ModuleName<'a>
§name: &'a str
§available: &'a [&'a str]
§

ImportCtorByName

Fields

§region: Region
§name: &'a str
§type_name: &'a str
§

ImportOpenAlias

Fields

§region: Region
§name: &'a str

Trait Implementations§

Source§

impl<'a> Clone for Error<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for Error<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Error<'a>

§

impl<'a> RefUnwindSafe for Error<'a>

§

impl<'a> Send for Error<'a>

§

impl<'a> Sync for Error<'a>

§

impl<'a> Unpin for Error<'a>

§

impl<'a> UnsafeUnpin for Error<'a>

§

impl<'a> UnwindSafe for Error<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.