purescript-0.6.9.4: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell98

Language.PureScript.Errors

Description

 

Synopsis

Documentation

data ErrorMessage Source

A type of error messages

Constructors

ErrorParsingExterns ParseError 
ErrorParsingPrelude ParseError 
InvalidExternsFile FilePath 
CannotGetFileInfo FilePath 
CannotReadFile FilePath 
CannotWriteFile FilePath 
InfiniteType Type 
InfiniteKind Kind 
CannotReorderOperators 
MultipleFixities Ident 
OrphanTypeDeclaration Ident 
OrphanFixityDeclaration String 
RedefinedModule ModuleName 
RedefinedIdent Ident 
OverlappingNamesInLet 
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 
InvalidDoBind 
InvalidDoLet 
CycleInDeclaration Ident 
CycleInTypeSynonym (Maybe ProperName) 
CycleInModules [ModuleName] 
NameIsUndefined Ident 
NameNotInScope Ident 
UndefinedTypeVariable ProperName 
PartiallyAppliedSynonym (Qualified ProperName) 
NotYetDefined [Ident] ErrorMessage 
EscapedSkolem (Maybe Expr) 
UnspecifiedSkolemScope 
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) 
SubsumptionCheckFailed 
ExprDoesNotHaveType Expr Type 
PropertyIsMissing String Type 
ErrorUnifyingTypes Type Type ErrorMessage 
CannotApplyFunction Type Expr 
TypeSynonymInstance 
InvalidNewtype 
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 MultipleErrors m => 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