Skip to content

Provide span information in messages

Fredrik Wieczerkowski requested to merge message-spans into master

Fixes #90 (closed)

This 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)
  • Checks
    • DeriveCheck
      • errNoAbstractDerive
      • errNotDerivable
      • errNoDataDerive
      • errNotEnum
      • errNotBounded
    • ExportCheck
      • errAmbiguous
      • errModuleNotImported
      • errMultiple
      • errNotDataTypeOrTypeClass
      • errOutsideTypeExport
      • errUndefinedElement
      • errUndefinedMethod
      • errUndefined
    • ExtensionCheck
      • errUnknownExtension (along with using a span in Extension from curry-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 (using IMethodDecl's identifier)
      • errConstrainedClassVariable (using IMethodDecl'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 the TypeExprs 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 (using TypeExpr's span)
      • errMethodTypeTooSpecific (using FunctionDecl'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
Edited by Fredrik Wieczerkowski

Merge request reports