curry-frontend merge requestshttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/merge_requests2022-11-22T10:21:12Zhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/merge_requests/50Remove some unused imports2022-11-22T10:21:12ZFredrik WieczerkowskiRemove some unused importsSome minor cleanup.Some minor cleanup.https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/merge_requests/41Update FlatCurry generation pipeline2020-11-24T18:34:02ZFredrik WieczerkowskiUpdate FlatCurry generation pipeline### Fixes #57
This merge request aims to establish a cleaner code generation pipeline:
```
IL -> TypeAnnotatedFlatCurry --+-> TypedFlatCurry
|
+-> FlatCurry
```### Fixes #57
This merge request aims to establish a cleaner code generation pipeline:
```
IL -> TypeAnnotatedFlatCurry --+-> TypedFlatCurry
|
+-> FlatCurry
```https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/merge_requests/34Merge curry-base2020-11-12T16:02:01ZFredrik WieczerkowskiMerge curry-base### Fixes #70 and #88
This branch...
* merges [`curry-base`](https://git.ps.informatik.uni-kiel.de/curry/curry-base)
* splits the frontend into a library and an executable target
* adds the Makefile and the Stack configuration that was...### Fixes #70 and #88
This branch...
* merges [`curry-base`](https://git.ps.informatik.uni-kiel.de/curry/curry-base)
* splits the frontend into a library and an executable target
* adds the Makefile and the Stack configuration that was previously duplicated between [`pakcs`](https://git.ps.informatik.uni-kiel.de/curry/pakcs) and [`kics2`](https://git.ps.informatik.uni-kiel.de/curry/kics2)
Having this new module structure provides several advantages:
* Combining `curry-base` and `curry-frontend` in a single repository simplifies the build process, since compiler repositories can now integrate the frontend using a single submodule
* Cleanly separating executable, library and test targets makes dependency management much easier since the test target no longer has to reenumerate all source modules
* Having a separate library target makes it easy to embed the frontend into third-party applications, e.g. language servershttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/merge_requests/26Provide span information in messages2020-10-20T14:34:45ZFredrik WieczerkowskiProvide span information in messages### Fixes #90
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/curry-base!16, which is required for building this b...### Fixes #90
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/curry-base!16, 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**
- [x] `errUnknownOptions`
- [x] `errIllegalOption`
- **Interfaces**
- [x] `errInterfaceNotFound` (span encompasses module identifier)
- [x] `errWrongInterface` (see above)
- [x] `errCyclicImport` (see above)
- **Messages**
- [x] re-export of `posMessage` (removed, being no longer needed)
- **Checks**
- **DeriveCheck**
- [x] `errNoAbstractDerive`
- [x] `errNotDerivable`
- [x] `errNoDataDerive`
- [x] `errNotEnum`
- [x] `errNotBounded`
- **ExportCheck**
- [x] `errAmbiguous`
- [x] `errModuleNotImported`
- [x] `errMultiple`
- [x] `errNotDataTypeOrTypeClass`
- [x] `errOutsideTypeExport`
- [x] `errUndefinedElement`
- [x] `errUndefinedMethod`
- [x] `errUndefined`
- **ExtensionCheck**
- [x] `errUnknownExtension` (along with using a span in `Extension` from `curry-base`)
- **ImportSyntaxCheck**
- [x] `errUndefinedElement`
- [x] `errUndefinedMethod`
- [x] `errUndefinedEntity`
- [x] `errNonDataTypeOrClass`
- [x] `errImportDataConstr`
- **ImpredCheck**
- [x] `errIllegalPolymorphicType`
- [x] `errIllegalDefaultType`
- **InstanceCheck**
- [x] `errMissingInstance`
- **InterfaceCheck**
- [x] `errNotExported` (using type/value identifiers from incorrect declarations)
- [x] `errNoPrecedence` (see above)
- [x] `errNoInstance` (see above)
- [x] `errImportConflict` (see above)
- [x] `errInstanceConflict` (see above)
- **InterfaceSyntaxCheck**
- [x] `errUndefined`
- [x] `errMultipleImplementation`
- [x] `errAmbiguousType` (using `IMethodDecl`'s identifier)
- [x] `errConstrainedClassVariable` (using `IMethodDecl`'s identifier)
- [x] `errNonLinear`
- [x] `errNoVariable`
- [x] `errUnboundVariable`
- [x] `errBadTypeSynonym`
- [x] `errNoElement` (using the invalid constructor's identifier instead of the type's)
- [x] `errIllegalSimpleConstraint`
- [x] `errIllegalInstanceType` (using the identifier the implementor)
- **KindCheck**
- [x] `errRecursiveTypes`
- [x] `errRecursiveClasses`
- [x] `errNonArrowKind` (using the `TypeExpr`s spans)
- [x] `errPartialAlias` (see above)
- [x] `errKindMismatch` (see above)
- **PrecCheck**
- [x] `errUndefinedOperator`
- [x] `errMultiplePrecedence`
- [x] `errInvalidParse`
- [x] `errAmbiguousParse`
- **SyntaxCheck**
- [x] `errUnsupportedFPTerm`
- [x] `errUnsupportedFuncPattern`
- [x] `errFuncPatNotGlobal`
- [x] `errFuncPatCyclic`
- [x] `errPrecedenceOutOfRange`
- [x] `errUndefinedVariable`
- [x] `errUndefinedData`
- [x] `errUndefinedLabel`
- [x] `errUndefinedMethod`
- [x] `errAmbiguous`
- [x] `errDuplicateDefinition`
- [x] `errDuplicateVariables`
- [x] `errMultipleDataConstructor`
- [x] `errMultipleDeclarations`
- [x] `errDuplicateTypeSig`
- [x] `errDuplicateLabel`
- [x] `errNonVariable`
- [x] `errNoBody`
- [x] `errNoCommonCons`
- [x] `errNoLabel`
- [x] `errNoTypeSig`
- [x] `errToplevelPattern`
- [x] `errDifferentArity`
- [x] `errWrongArity`
- [x] `errMissingLanguageExtension`
- [x] `errInfixWithoutParens`
- **TypeCheck**
- [x] `errPolymorphicVar`
- [x] `errTypeSigTooGeneral` (using `TypeExpr`'s span)
- [x] `errMethodTypeTooSpecific` (using `FunctionDecl`'s identifier)
- [x] `errNonFunctionType`
- [x] `errNonBinaryOp`
- [x] `errTypeMismatch`
- [x] `errSubsumption`
- [x] `errIncompatibleLabelType`
- [x] `errMissingInstance`
- [x] `errAmbiguousTypeVariable`
- **TypeSyntaxCheck**
- [x] `errMultipleDefaultDeclarations`
- [x] `errMultipleDeclarations`
- [x] `errMissingLanguageExtension`
- [x] `errUndefined`
- [x] `errAmbiguousIndent`
- [x] `errAmbiguousType`
- [x] `errConstrainedClassVariable`
- [x] `errNonLinear`
- [x] `errNoVariable`
- [x] `errUnboundVariable`
- [x] `errIllegalConstraint`
- [x] `errIllegalSimpleConstraint`
- [x] `errIllegalInstanceType`
- [x] `errIllegalDataInstance`
- **WarnCheck**
- [x] `warnMultiplyImportedModule`
- [x] `warnMultiplyImportedSymbol`
- [x] `warnMultiplyHiddenSymbol`
- [x] `warnDisjoinedFunctionRules`
- [x] `warnOrphanInstance`
- [x] `warnMissingMethodImplementation`
- [x] `warnMissingTypeSignature`
- [x] `warnModuleNameClash`
- [x] `warnAliasNameClash`
- [x] `warnMissingPattern`
- [x] `warnUnreachablePattern`
- [x] `warnNondetOverlapping`
- [x] `warnRedContext`
- [x] `warnCaseMode`
- [x] `warnUnrefTypeVar`
- [x] `warnUnrefVar`
- [x] `warnShadowing`
- [x] `warnTypeShadowing`