purescript- PureScript Programming Language Compiler

Safe HaskellNone






data ErrorMessage Source

A type of error messages


InfiniteType Type 
InfiniteKind Kind 
MultipleFixities Ident 
OrphanTypeDeclaration Ident 
OrphanFixityDeclaration String 
RedefinedModule ModuleName 
RedefinedIdent Ident 
UnknownModule ModuleName 
UnknownType (Qualified ProperName) 
UnknownTypeClass (Qualified ProperName) 
UnknownValue (Qualified Ident) 
UnknownDataConstructor (Qualified ProperName) (Maybe (Qualified ProperName)) 
UnknownTypeConstructor (Qualified ProperName) 
ConflictingImport String ModuleName 
ConflictingImports String ModuleName ModuleName 
ConflictingTypeDecls ProperName 
ConflictingCtorDecls ProperName 
TypeConflictsWithClass ProperName 
CtorConflictsWithClass ProperName 
ClassConflictsWithType ProperName 
ClassConflictsWithCtor ProperName 
DuplicateClassExport ProperName 
DuplicateValueExport Ident 
DuplicateTypeArgument String 
CycleInDeclaration Ident 
CycleInTypeSynonym (Maybe ProperName) 
NameIsUndefined Ident 
NameNotInScope Ident 
UndefinedTypeVariable ProperName 
PartiallyAppliedSynonym (Qualified ProperName) 
NotYetDefined [Ident] ErrorMessage 
EscapedSkolem (Maybe Expr) 
TypesDoNotUnify Type Type 
KindsDoNotUnify Kind Kind 
ConstrainedTypeUnified Type Type 
OverlappingInstances (Qualified ProperName) [Type] [DictionaryValue] 
NoInstanceFound (Qualified ProperName) [Type] 
DuplicateLabel String (Maybe Expr) 
DuplicateValueDeclaration Ident 
ArgListLengthsDiffer Ident 
OverlappingArgNames (Maybe Ident) 
MissingClassMember Ident 
ExpectedType Kind 
IncorrectConstructorArity (Qualified ProperName) 
ExprDoesNotHaveType Expr Type 
PropertyIsMissing String Type 
ErrorUnifyingTypes Type Type ErrorMessage 
CannotApplyFunction Type Expr 
InvalidInstanceHead Type 
TransitiveExportError DeclarationRef [DeclarationRef] 
ErrorInExpression Expr ErrorMessage 
ErrorInModule ModuleName ErrorMessage 
ErrorInInstance (Qualified ProperName) [Type] ErrorMessage 
ErrorInSubsumption Type Type ErrorMessage 
ErrorCheckingType Expr Type ErrorMessage 
ErrorCheckingKind Type ErrorMessage 
ErrorInferringType Expr ErrorMessage 
ErrorInApplication Expr Type Expr ErrorMessage 
ErrorInDataConstructor ProperName ErrorMessage 
ErrorInTypeConstructor ProperName ErrorMessage 
ErrorInBindingGroup [Ident] ErrorMessage 
ErrorInDataBindingGroup ErrorMessage 
ErrorInTypeSynonym ProperName ErrorMessage 
ErrorInValueDeclaration Ident ErrorMessage 
ErrorInForeignImport Ident ErrorMessage 
PositionedError SourceSpan ErrorMessage 

errorCode :: ErrorMessage -> String Source

Get the error code for a particular error type

errorMessage :: ErrorMessage -> MultipleErrors Source

Create an error set from a single error message

onErrorMessages :: (ErrorMessage -> ErrorMessage) -> MultipleErrors -> MultipleErrors Source

Lift a function on ErrorMessage to a function on MultipleErrors

prettyPrintSingleError :: Bool -> ErrorMessage -> Box Source

Pretty print a single error, simplifying if necessary

prettyPrintMultipleErrors :: Bool -> MultipleErrors -> String Source

Pretty print multiple errors

interpretMultipleErrors :: MonadError String m => Bool -> Either MultipleErrors a -> m a Source

Interpret multiple errors in a monad supporting errors

rethrow :: MonadError e m => (e -> e) -> m a -> m a Source

Rethrow an error with a more detailed error message in the case of failure

rethrowWithPosition :: MonadError MultipleErrors m => SourceSpan -> m a -> m a Source

Rethrow an error with source position information

parU :: (MonadError MultipleErrors m, Functor m) => [a] -> (a -> m b) -> m [b] Source

Collect errors in in parallel