Provide span information in messages
#90 (closed)
FixesThis branch will implement support for spans (instead of just positions) in error and warning messages where possible.
Note that this merge request depends on curry-base!16 (merged), which is required for building this branch. Since the posMessage
function is still available in this version of curry-base
, these changes (to the frontend) can be applied gradually without breaking the build.
The following checklist tracks the progress. Many changes are fairly straightforward, since identifiers (Ident
, QualIdent
, ModuleIdent
, ...) provide span information and those are used in many places where errors/warnings are generated.
To Do
-
General
-
CurryBuilder
-
errUnknownOptions
-
errIllegalOption
-
-
Interfaces
-
errInterfaceNotFound
(span encompasses module identifier) -
errWrongInterface
(see above) -
errCyclicImport
(see above)
-
-
Messages
-
re-export of posMessage
(removed, being no longer needed)
-
-
CurryBuilder
-
Checks
-
DeriveCheck
-
errNoAbstractDerive
-
errNotDerivable
-
errNoDataDerive
-
errNotEnum
-
errNotBounded
-
-
ExportCheck
-
errAmbiguous
-
errModuleNotImported
-
errMultiple
-
errNotDataTypeOrTypeClass
-
errOutsideTypeExport
-
errUndefinedElement
-
errUndefinedMethod
-
errUndefined
-
-
ExtensionCheck
-
errUnknownExtension
(along with using a span inExtension
fromcurry-base
)
-
-
ImportSyntaxCheck
-
errUndefinedElement
-
errUndefinedMethod
-
errUndefinedEntity
-
errNonDataTypeOrClass
-
errImportDataConstr
-
-
ImpredCheck
-
errIllegalPolymorphicType
-
errIllegalDefaultType
-
-
InstanceCheck
-
errMissingInstance
-
-
InterfaceCheck
-
errNotExported
(using type/value identifiers from incorrect declarations) -
errNoPrecedence
(see above) -
errNoInstance
(see above) -
errImportConflict
(see above) -
errInstanceConflict
(see above)
-
-
InterfaceSyntaxCheck
-
errUndefined
-
errMultipleImplementation
-
errAmbiguousType
(usingIMethodDecl
's identifier) -
errConstrainedClassVariable
(usingIMethodDecl
's identifier) -
errNonLinear
-
errNoVariable
-
errUnboundVariable
-
errBadTypeSynonym
-
errNoElement
(using the invalid constructor's identifier instead of the type's) -
errIllegalSimpleConstraint
-
errIllegalInstanceType
(using the identifier the implementor)
-
-
KindCheck
-
errRecursiveTypes
-
errRecursiveClasses
-
errNonArrowKind
(using theTypeExpr
s spans) -
errPartialAlias
(see above) -
errKindMismatch
(see above)
-
-
PrecCheck
-
errUndefinedOperator
-
errMultiplePrecedence
-
errInvalidParse
-
errAmbiguousParse
-
-
SyntaxCheck
-
errUnsupportedFPTerm
-
errUnsupportedFuncPattern
-
errFuncPatNotGlobal
-
errFuncPatCyclic
-
errPrecedenceOutOfRange
-
errUndefinedVariable
-
errUndefinedData
-
errUndefinedLabel
-
errUndefinedMethod
-
errAmbiguous
-
errDuplicateDefinition
-
errDuplicateVariables
-
errMultipleDataConstructor
-
errMultipleDeclarations
-
errDuplicateTypeSig
-
errDuplicateLabel
-
errNonVariable
-
errNoBody
-
errNoCommonCons
-
errNoLabel
-
errNoTypeSig
-
errToplevelPattern
-
errDifferentArity
-
errWrongArity
-
errMissingLanguageExtension
-
errInfixWithoutParens
-
-
TypeCheck
-
errPolymorphicVar
-
errTypeSigTooGeneral
(usingTypeExpr
's span) -
errMethodTypeTooSpecific
(usingFunctionDecl
's identifier) -
errNonFunctionType
-
errNonBinaryOp
-
errTypeMismatch
-
errSubsumption
-
errIncompatibleLabelType
-
errMissingInstance
-
errAmbiguousTypeVariable
-
-
TypeSyntaxCheck
-
errMultipleDefaultDeclarations
-
errMultipleDeclarations
-
errMissingLanguageExtension
-
errUndefined
-
errAmbiguousIndent
-
errAmbiguousType
-
errConstrainedClassVariable
-
errNonLinear
-
errNoVariable
-
errUnboundVariable
-
errIllegalConstraint
-
errIllegalSimpleConstraint
-
errIllegalInstanceType
-
errIllegalDataInstance
-
-
WarnCheck
-
warnMultiplyImportedModule
-
warnMultiplyImportedSymbol
-
warnMultiplyHiddenSymbol
-
warnDisjoinedFunctionRules
-
warnOrphanInstance
-
warnMissingMethodImplementation
-
warnMissingTypeSignature
-
warnModuleNameClash
-
warnAliasNameClash
-
warnMissingPattern
-
warnUnreachablePattern
-
warnNondetOverlapping
-
warnRedContext
-
warnCaseMode
-
warnUnrefTypeVar
-
warnUnrefVar
-
warnShadowing
-
warnTypeShadowing
-
-
DeriveCheck
Edited by Fredrik Wieczerkowski