curry-frontend issueshttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues2020-11-25T11:09:14Zhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/110Allow Data instances for external data types2020-11-25T11:09:14ZFinn TeegenAllow Data instances for external data typesCurrently, the frontend only allows custom data instances in the prelude. It should also allow data instances for external data types in every module. Moreover, the frontend currently does not check whether there is another Data instance...Currently, the frontend only allows custom data instances in the prelude. It should also allow data instances for external data types in every module. Moreover, the frontend currently does not check whether there is another Data instance in the Prelude for normal data types. That way, it is possible to have two Data instances at once for one data type. This issue would be fixed by allowing custom Data instances only for external data types.https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/57Generate TypedFlatCurry via TypeAnnotatedFlatCurry2020-11-24T18:34:02ZKai ProttGenerate TypedFlatCurry via TypeAnnotatedFlatCurryhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/108Make specialization in dictionary transformation an optional optimization2020-11-23T16:54:00ZFinn TeegenMake specialization in dictionary transformation an optional optimizationThis is very useful for debugging the dictionary transformation.This is very useful for debugging the dictionary transformation.Finn TeegenFinn Teegenhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/101Deriving fails for empty data types2020-11-23T13:00:04ZFinn TeegenDeriving fails for empty data typesWhen trying to compile a program like
```
data A
```
the compiler fails with the following error message.
```
pakcs-frontend: Prelude.head: empty list
```
This is most likely due to the current way of generating the equations for binary ...When trying to compile a program like
```
data A
```
the compiler fails with the following error message.
```
pakcs-frontend: Prelude.head: empty list
```
This is most likely due to the current way of generating the equations for binary operations (in this case the generation of the equations of the `Data` class; for all other classes the DeriveCheck should throw an error that classes can't be derived for abstract data types). The obvious solution would be to add an additional check in the DeriveTransformation (see `hasDataInstance`) to rule out abstract data types.Finn TeegenFinn Teegenhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/105Add option to disable automatic deriving of Data2020-11-20T10:01:21ZFinn TeegenAdd option to disable automatic deriving of DataFinn TeegenFinn Teegenhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/104Do not exceed 80 characters in frontend messages2020-11-19T16:30:10ZFinn TeegenDo not exceed 80 characters in frontend messagesSome error or warning messages exceed the 80 character limit. This behavior results in difficult to read messages in standard terminal windows.Some error or warning messages exceed the 80 character limit. This behavior results in difficult to read messages in standard terminal windows.https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/103Add support for EmptyDataDeriving2020-11-19T16:28:29ZFinn TeegenAdd support for EmptyDataDerivingAs a fix for #101 will most likely result in a general support for empty data type deriving, this feature could also be made available via a language extension.As a fix for #101 will most likely result in a general support for empty data type deriving, this feature could also be made available via a language extension.Fredrik WieczerkowskiFredrik Wieczerkowskihttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/102Fix error message for explicitly derived Data2020-11-19T16:25:50ZFredrik WieczerkowskiFix error message for explicitly derived DataExplicitly deriving `Data` currently generates an incorrect span in the error message:
```haskell
data X = X deriving (Data)
```
```
Error:
Instances of type class `Prelude.Data' cannot be derived
|
1 | interface Prelude where...Explicitly deriving `Data` currently generates an incorrect span in the error message:
```haskell
data X = X deriving (Data)
```
```
Error:
Instances of type class `Prelude.Data' cannot be derived
|
1 | interface Prelude where {
| ^^^^^^^^^^^^
```https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/100Prelude is not imported in FCY2020-11-17T18:48:46ZMichael HanusPrelude is not imported in FCYTry the following program:
head (x:_) = x
The Prelude is not imported in the generated FCYTry the following program:
head (x:_) = x
The Prelude is not imported in the generated FCYhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/99Fix generation of AbstractCurry2020-11-17T17:17:23ZMichael HanusFix generation of AbstractCurryThe new frontend generates .acy files which are different (buggy)
compared to the previous version. Type declarations have the following
structure in AbstractCurry (version 2.0), see `AbstractCurry.Types`
in package `abstract-curry`:
...The new frontend generates .acy files which are different (buggy)
compared to the previous version. Type declarations have the following
structure in AbstractCurry (version 2.0), see `AbstractCurry.Types`
in package `abstract-curry`:
data CTypeDecl
= CType QName CVisibility [CTVarIName] [CConsDecl] [QName]
| CTypeSyn QName CVisibility [CTVarIName] CTypeExpr
| CNewType QName CVisibility [CTVarIName] CConsDecl [QName]
deriving (Eq, Show)
Consider the following minimal program:
data List = Empty
PAKCS/KiCS2 version generates the following acy file for this program:
{- AbstractCurry 2.0 -}
CurryProg "T"
["Prelude"]
Nothing
[]
[]
[CType ("T","List") Public [] [CCons [] (CContext []) ("T","Empty") Public []] []]
[]
[]
Unfortunately, the current frontend produces the following acy file:
{- AbstractCurry 2.0 -}
CurryProg "T"
[]
Nothing
[]
[]
[CType ("T","List") Public [] [CCons ("T","Empty") Public []] []]
[]
[]
As a consequence, many important Curry tools (CurryCheck, CurryDoc,
CurryPP) required for a basic Curry system do not work in
the new version!Finn TeegenFinn Teegenhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/98Set Haskell case mode as default2020-11-11T20:23:00ZFinn TeegenSet Haskell case mode as defaultFinn TeegenFinn Teegenhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/97Add parameter for output dir2020-11-06T16:00:35ZMichael HanusAdd parameter for output dirSupport a parameter (e.g., --outputdir) to replace the default output directory ".curry" by another one.
Could be used to compile Curry system-specific target code.
*Note:* The outputdir is always relative to the source directory of the...Support a parameter (e.g., --outputdir) to replace the default output directory ".curry" by another one.
Could be used to compile Curry system-specific target code.
*Note:* The outputdir is always relative to the source directory of the module!Fredrik WieczerkowskiFredrik Wieczerkowskihttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/96Perform general refactoring2020-11-04T12:04:30ZFredrik WieczerkowskiPerform general refactoringAfter the merge of curry-base in !34, a general refactoring of the modules may be due, e.g. considering that the curry-base hierarchy (now located under `src/Curry/...`) duplicates some functionality of the rest of the frontend.After the merge of curry-base in !34, a general refactoring of the modules may be due, e.g. considering that the curry-base hierarchy (now located under `src/Curry/...`) duplicates some functionality of the rest of the frontend.https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/93Improve spans for error messages2020-10-30T12:28:13ZFinn TeegenImprove spans for error messagesConsider the following program.
```
test = not (f True True)
f :: Bool -> Bool -> String
f _ _ = ""
```
The compiler prints the following (correct) error message when trying to compile the program.
```
1:6-1:24 Error:
Type error in ...Consider the following program.
```
test = not (f True True)
f :: Bool -> Bool -> String
f _ _ = ""
```
The compiler prints the following (correct) error message when trying to compile the program.
```
1:6-1:24 Error:
Type error in application
not (f True True)
Term: (f True True)
Inferred type: [Prelude.Char]
Expected type: Prelude.Bool
Types Prelude.Bool and [Prelude.Char] are incompatible
|
1 | test = not (f True True)
| ^^^^^^^^^^^^^^^^^^^
```
However, the highlighted part seems to be a bit off (or at least starting to early).Fredrik WieczerkowskiFredrik Wieczerkowskihttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/94Remove double errors2020-10-30T12:22:32ZFinn TeegenRemove double errorsConsider the following function.
```
mTestFunction :: Int
mTestFunction = length [unknown]
```
The frontend yields the following errors.
```
Test.curry:2:1-2:32 Error:
Ambiguous type variable _4
in type Prelude.Data _4 => Prel...Consider the following function.
```
mTestFunction :: Int
mTestFunction = length [unknown]
```
The frontend yields the following errors.
```
Test.curry:2:1-2:32 Error:
Ambiguous type variable _4
in type Prelude.Data _4 => Prelude.Int
inferred for equation
mTestFunction = length [unknown]
|
2 | mTestFunction = length [unknown]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Test.curry:2:1-2:32 Error:
Ambiguous type variable _4
in type Prelude.Data _4 => Prelude.Int
inferred for function `mTestFunction'
|
2 | mTestFunction = length [unknown]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR occurred during parsing!
```
As both errors refer to the same issue (even with the same spans), one error should not be raised.https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/95Emit colored messages2020-10-29T15:33:01ZFredrik WieczerkowskiEmit colored messagesIt would be nice to have GHC-style colored error and warning messages:
![image](/uploads/5ad3843ffebff82130135f1f7a6c84f9/image.png)
Emitting these requires using an ANSI color library, for example [`ansi-terminal`](https://hackage.has...It would be nice to have GHC-style colored error and warning messages:
![image](/uploads/5ad3843ffebff82130135f1f7a6c84f9/image.png)
Emitting these requires using an ANSI color library, for example [`ansi-terminal`](https://hackage.haskell.org/package/ansi-terminal).
It would, however, be preferable to have color support directly in the pretty printing library rather than just including raw ANSI escape sequences as text. There are a bunch of options here, but none of them really are a fitting 'drop-in-replacement' for the currently used pretty printer:
* **Hughes/PJ pretty printers**:
* [`pretty`](https://hackage.haskell.org/package/pretty) is currently used and does not support ANSI coloring
* **Wadler/Leijen pretty printers**:
* [`ansi-wl-pprint`](https://hackage.haskell.org/package/ansi-wl-pprint) has ANSI coloring support, but [may get deprecated](https://github.com/ekmett/ansi-wl-pprint/issues/18)
* [`ansi-pretty`](https://hackage.haskell.org/package/ansi-pretty) is an extension of `ansi-wl-pprint`
* [`prettyprinter`](https://hackage.haskell.org/package/prettyprinter) is modern and supports ANSI coloring, but uses `Data.Text` instead of `String`
Additionally, Wadler/Leijen pretty printers have a lot of subtle differences in their API compared to Hughes/PJ printers, thereby complicating a potential migration. This includes many of them providing their own `Pretty` class.https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/88Split curry-frontend into library and executable2020-10-26T10:43:33ZFredrik WieczerkowskiSplit curry-frontend into library and executableHaving a library target for the frontend would make it easier to embed/integrate the frontend into other applications, for example the [curry-language-server](https://github.com/fwcd/curry-language-server.git).Having a library target for the frontend would make it easier to embed/integrate the frontend into other applications, for example the [curry-language-server](https://github.com/fwcd/curry-language-server.git).Fredrik WieczerkowskiFredrik Wieczerkowskihttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/70Merge curry-base and curry-frontend2020-10-26T10:43:32ZKai ProttMerge curry-base and curry-frontendhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/89Create a cabal.project file and make the build "non-stateful"2020-10-23T16:21:33ZFredrik WieczerkowskiCreate a cabal.project file and make the build "non-stateful"### Problem
Currently, to compile the frontend, the user has to manually clone and install the `curry-base` package, since this project depends on a newer version (1.2.0) than the latest version from Hackage (1.1.1).
### Motivation
Si...### Problem
Currently, to compile the frontend, the user has to manually clone and install the `curry-base` package, since this project depends on a newer version (1.2.0) than the latest version from Hackage (1.1.1).
### Motivation
Since Cabal ist moving towards non-stateful, reproducible builds with version 2 ([see here](https://www.haskell.org/cabal/users-guide/nix-local-build-overview.html)), it would be nice to have this package "just build" when running `cabal v2-build`, without any preliminary steps.
Additionally, a non-stateful build could enable automatic CI builds/deployments, if so desired, in the future.
### Solution
Adding a `cabal.project` file that declares a `source-repository-package` (as introduced by Cabal 2.4, [see here](https://cabal.readthedocs.io/en/latest/nix-local-build.html#specifying-packages-from-remote-version-control-locations)) pointing towards the `curry-base` repository would fix the issue, since Cabal could automatically download and build `curry-base` from source.Fredrik WieczerkowskiFredrik Wieczerkowskihttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/43Type signatures are not correctly checked against inferred types with negativ...2020-10-21T10:10:37ZJan-Hendrik MatthesType signatures are not correctly checked against inferred types with negative type variablesThe following Curry program is accepted by the frontend, but it should be rejected due to the dependency of `h` from `g` and `g` from `x` bound on the left-hand side in `f`. Because of the dependencies the type of `h` has to be the same ...The following Curry program is accepted by the frontend, but it should be rejected due to the dependency of `h` from `g` and `g` from `x` bound on the left-hand side in `f`. Because of the dependencies the type of `h` has to be the same as the one from `f`.
```haskell
f :: Eq a => a -> Bool
f x = g x
where
g y = x == y
h :: a -> Bool
h x = g x
```Jan-Hendrik MatthesJan-Hendrik Matthes