pakcs issueshttps://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues2021-02-09T08:12:06Zhttps://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/32Add section on `Data` in manual2021-02-09T08:12:06ZMichael HanusAdd section on `Data` in manualMichael HanusMichael Hanushttps://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/31--numeric-version prints ~/.pakcsrc installed2020-11-17T14:25:07ZBennet Bleßmannstu201758@mail.uni-kiel.de--numeric-version prints ~/.pakcsrc installedWhen running pakcs --numeric-version I would expect to always get only the version as output, but if the ~/.pakcsrc file doesn't exist it will also inform of the creation of the file.
```sh
$ rm ~/.pakcsrc
$ pakcs --numeric-version
>>> ...When running pakcs --numeric-version I would expect to always get only the version as output, but if the ~/.pakcsrc file doesn't exist it will also inform of the creation of the file.
```sh
$ rm ~/.pakcsrc
$ pakcs --numeric-version
>>> ~/.pakcsrc installed.
3.2.0
$
```
[Screenshot](/uploads/2987d7471f595a8971f7b68468a023c3/numeric-version_flag.png "numeric-version flag")
Also the quiet flag behaves unexpected, expectation being to only print the version
even if .pakcsrc would be installed.
```sh
$ rm ~/.pakcsrc
$ pakcs -q --numeric-version
>>> ~/.pakcsrc installed.
$
```
```sh
$ rm ~/.pakcsrc
$ pakcs --numeric-version -q
>>> ~/.pakcsrc installed.
3.2.0
$
```
[Screenshot](/uploads/bdb1051dd1ae42060af3ef4012a08c3e/numeric-version_flag.png "numeric-version flag with quiet flag")
Expected behavior for usage with quiet flag:
```sh
$ rm ~/.pakcsrc
$ pakcs --numeric-version -q
3.2.0
$
```
```sh
$ rm ~/.pakcsrc
$ pakcs -q --numeric-version
3.2.0
$
```https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/30Handle explicit newtypes in the FlatCurry format2021-03-08T21:01:27ZFredrik WieczerkowskiHandle explicit newtypes in the FlatCurry formatThe new frontend compiles a declaration like
```haskell
newtype X a = X a
```
by default into the following FlatCurry type declaration:
```
TypeNew ("Newtype","X") Public [(0,KStar)] (NewCons ("Newtype","X") Public (TVar 0))
```
Curr...The new frontend compiles a declaration like
```haskell
newtype X a = X a
```
by default into the following FlatCurry type declaration:
```
TypeNew ("Newtype","X") Public [(0,KStar)] (NewCons ("Newtype","X") Public (TVar 0))
```
Currently, PAKCS uses the `-Odesugar-newtypes` flag, which converts such a newtype into a type synonym, to avoid this behavior. To make the FlatCurry representation more uniform across the different compilers (KiCS2, PAKCS, ...), however, it would be nice to have PAKCS handle the explicit representation of newtypes as well.https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/29Compile into versioned subfolder of .curry2020-11-06T16:15:32ZFredrik WieczerkowskiCompile into versioned subfolder of .currySince the different compiler implementations (KiCS2, PAKCS, ...) use slightly different FlatCurry representations, especially among different versions, the compilation artifacts (FlatCurry, generated Haskell code) should be placed in a v...Since the different compiler implementations (KiCS2, PAKCS, ...) use slightly different FlatCurry representations, especially among different versions, the compilation artifacts (FlatCurry, generated Haskell code) should be placed in a versioned subfolder of `.curry` to avoid conflicts when switching compiler versions. They could, for example, be placed in
```
.curry/pakcs-x.y.z
```
where `x.y.z` is the version number of the PAKCS compiler.https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/28Makefile not suited for paths containing spaces2020-10-30T13:33:07ZFinn TeegenMakefile not suited for paths containing spaceshttps://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/27Error messages containing predicate indicators get swallowed2020-10-20T15:51:25ZFredrik WieczerkowskiError messages containing predicate indicators get swallowedCalling `printError` e.g. with
```prolog
error(type_error(compound,[]),context(arg/3,_2620548))
```
causes `prologError2Atom` to swallow the term. Most likely this is due to `prologTerm2Atom` not being able to process predicate indicat...Calling `printError` e.g. with
```prolog
error(type_error(compound,[]),context(arg/3,_2620548))
```
causes `prologError2Atom` to swallow the term. Most likely this is due to `prologTerm2Atom` not being able to process predicate indicators like `arg/3`.https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/26Type defaulting does not work when Data contexts are involved2021-12-20T11:56:12ZFredrik WieczerkowskiType defaulting does not work when Data contexts are involvedConsider the following Curry example:
```haskell
last (_ ++ [x]) = x
value = last [1, 2, 3]
```
PAKCS 2.2.0 (which does not support the `Data` typeclass) infers the following types:
```haskell
last :: [a] -> a
value :: Num a => a
```
...Consider the following Curry example:
```haskell
last (_ ++ [x]) = x
value = last [1, 2, 3]
```
PAKCS 2.2.0 (which does not support the `Data` typeclass) infers the following types:
```haskell
last :: [a] -> a
value :: Num a => a
```
When the user loads the program and evaluates `value` in the REPL, its type gets (correctly) defaulted to `Int`:
```
> value
3
```
In PAKCS 3.2.0 (the current `master` branch), the following types are inferred:
```haskell
last :: Data a => [a] -> a
value :: (Data a, Num a) => a
```
Evaluating `value` in the REPL now fails with an error:
```
> value
Cannot handle arbitrary overloaded top-level expressions
Hint: add type annotation to overloaded entity
```https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/25Add Dockerfile to this repo2020-10-13T10:55:56ZFredrik WieczerkowskiAdd Dockerfile to this repoThere seems to be an official Docker image for PAKCS on the Docker Hub: https://hub.docker.com/r/caups/pakcs2
Maybe we could place the corresponding Dockerfile in this repository to make it easier e.g. to update it in sync with the comp...There seems to be an official Docker image for PAKCS on the Docker Hub: https://hub.docker.com/r/caups/pakcs2
Maybe we could place the corresponding Dockerfile in this repository to make it easier e.g. to update it in sync with the compiler?https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/24Different implementation for PAKCS in Applicative IO - instance2021-04-09T10:57:55ZKai ProttDifferent implementation for PAKCS in Applicative IO - instanceIn the version3 Prelude `(*>)` is defined as seqIO for PAKCS and as `m >>= \_ -> k` for KICS2.
Is there any reason for this?
Currently this leads to a warning when compiling with KICS2.
It would be nice to just keep the KICS2 Definitio...In the version3 Prelude `(*>)` is defined as seqIO for PAKCS and as `m >>= \_ -> k` for KICS2.
Is there any reason for this?
Currently this leads to a warning when compiling with KICS2.
It would be nice to just keep the KICS2 Definition and let the PAKCS override the definition internally.Michael HanusMichael Hanushttps://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/23Existence error when executing Curry program2020-01-05T13:57:20ZFinn TeegenExistence error when executing Curry programThe program
```
double x = (x, x)
f (fst (double x)) = (x, True)
e = snd (f (failed :: ()))
```
leads to the error
```
ERROR: error(existence_error(procedure,/(unifEq,6)),context(/(blocked_hnf,4),_))
```
when `e` gets executed in ...The program
```
double x = (x, x)
f (fst (double x)) = (x, True)
e = snd (f (failed :: ()))
```
leads to the error
```
ERROR: error(existence_error(procedure,/(unifEq,6)),context(/(blocked_hnf,4),_))
```
when `e` gets executed in the REPL of the newest PAKCS version. However, this program does work with an older version.https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/22Move newtype-transformation to pakcs2021-03-08T21:00:39ZKai ProttMove newtype-transformation to pakcsWe'd like to keep newtypes intact during translation to FlatCurry, because they will be needed in KICS2.
Thus, FlatCurry will be changed to include newtype declarations and functions will still contain references to newtype constructors....We'd like to keep newtypes intact during translation to FlatCurry, because they will be needed in KICS2.
Thus, FlatCurry will be changed to include newtype declarations and functions will still contain references to newtype constructors.
New FlatCurry datatype representation:
``` haskell
data TypeDecl
= Type QName Visibility [TVarIndex] [ConsDecl]
| TypeSyn QName Visibility [TVarIndex] TypeExpr
| TypeNew QName Visibility [TVarIndex] NewConsDecl -- <---------- added
deriving (Eq, Read, Show)
-- |A constructor declaration for a newtype consists
-- of the name of the constructor
-- and the argument type of the constructor.
data NewConsDecl = NewCons QName Visibility TypeExpr -- <---------- added
deriving (Eq, Read, Show)
```
Some additional notes:
* With the version3-branch, the curry frontend can output this new FlatCurry when `-O no-desugar-newtypes` is used as a command line option.
* Due to recent changes, on the newest version of this branch, [stack](stack) is needed to compile the frontend, but one could use an older commit.Michael HanusMichael Hanushttps://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/21Error when compiling PAKCS with SWI-Prolog 8.1.102019-08-08T12:45:59ZJan-Hendrik MatthesError when compiling PAKCS with SWI-Prolog 8.1.10I get the following error message multiple times when compiling PAKCS with SWI-Prolog 8.1.10.
```
swipl: Usage:
1) swipl [options] prolog-file ... [-- arg ...]
2) swipl [options] [-o executable] -c prolog-file ...
3) swipl -...I get the following error message multiple times when compiling PAKCS with SWI-Prolog 8.1.10.
```
swipl: Usage:
1) swipl [options] prolog-file ... [-- arg ...]
2) swipl [options] [-o executable] -c prolog-file ...
3) swipl --help Display this message (also -h)
4) swipl --version Display version information
4) swipl --arch Display architecture
6) swipl --dump-runtime-variables[=format]
Dump link info in sh(1) format
Options:
-x state Start from state (must be first)
-g goal Run goal (may be repeated)
-t toplevel Toplevel goal
-f file User initialisation file
-F file Site initialisation file
-l file Script source file
-s file Script source file
-p alias=path Define file search path 'alias'
-O Optimised compilation
--tty[=bool] (Dis)allow tty control
--signals[=bool] Do (not) modify signal handling
--threads[=bool] Do (not) allow for threads
--debug[=bool] Do (not) generate debug info
--quiet[=bool] (-q) Do (not) suppress informational messages
--traditional Disable extensions of version 7
--home=DIR Use DIR as SWI-Prolog home
--stack_limit=size[BKMG] Specify maximum size of Prolog stacks
--table_space=size[BKMG] Specify maximum size of SLG tables
--pce[=bool] Make the xpce gui available
--pldoc[=port] Start PlDoc server [at port]
Boolean options may be written as --name=bool, --name, --no-name or --noname
```
Removing the unrecognized options `-L0 -G0 -T0` from the [`SWIOPTIONS`](src/Makefile#L17) variable will fix this problem, which is caused by the changes made in [this commit](https://github.com/SWI-Prolog/swipl-devel/commit/a696a1a47f74b99ba9cee6ca34b0321107d9b99c).https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/20Errors when starting `pakcs` for the first time on macOS2019-03-15T17:37:05ZJan-Hendrik MatthesErrors when starting `pakcs` for the first time on macOSWhen starting `pakcs` on a clean macOS system for the first time, the following error occurs.
```
CRITICAL Illegal package: file `package.json' does not exist!
```
This is the result of the missing `.cpm` directory in the user's home ...When starting `pakcs` on a clean macOS system for the first time, the following error occurs.
```
CRITICAL Illegal package: file `package.json' does not exist!
```
This is the result of the missing `.cpm` directory in the user's home directory.
Launching `pakcs` again, succeeds. But evaluating a simple expression such as `21 + 42` results in the following error.
```
Error:
Missing target "repository"
sh: line 1: /Users/username/.cpm/pakcs-2.1.2-homepackage/src: No such file or directory
ERROR occurred during parsing!
```https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/19readlink does not support the`-f` flag on macOS2019-10-02T22:13:50ZJan-Hendrik Matthesreadlink does not support the`-f` flag on macOSStarting `pakcs` on macOS results in the following error message before the logo.
```
readlink: illegal option -- f
usage: readlink [-n] [file ...]
```Starting `pakcs` on macOS results in the following error message before the logo.
```
readlink: illegal option -- f
usage: readlink [-n] [file ...]
```https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/18Modularize PAKCS constants2019-11-08T17:19:09ZKai ProttModularize PAKCS constantsThere are a lot of hardcoded "magical atoms" like 'Prelude.(,)' all over the place.
The code would be easier to maintain, when all of those atoms are only defined once and used everywhere.There are a lot of hardcoded "magical atoms" like 'Prelude.(,)' all over the place.
The code would be easier to maintain, when all of those atoms are only defined once and used everywhere.https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/17Import currydox.tex instead of copying definitions into the libaries.tex file2019-11-08T17:19:22ZKai ProttImport currydox.tex instead of copying definitions into the libaries.tex fileThe "doc/src/libaries.tex" file has a section with the makro-definitions from currydoc.
It would be nice if those definitions could be imported with `\input{currydoc.tex}` instead.The "doc/src/libaries.tex" file has a section with the makro-definitions from currydoc.
It would be nice if those definitions could be imported with `\input{currydoc.tex}` instead.https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/16Typo in KNOWN_BUGS.txt2017-11-28T08:02:27ZKai ProttTypo in KNOWN_BUGS.txtIn the last sentence:
... up to **know** there is no application making ...In the last sentence:
... up to **know** there is no application making ...https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/15Fix defaulting when local classes are involved2017-10-31T17:07:14ZFinn TeegenFix defaulting when local classes are involvedConsider the following program.
```
class Eq
test :: (Eq a, Num a) => a
test = 42
```
The REPL tries to default the type of the expression `test` to `Int`. But due to the local definition of `Eq` this should not happen as it cannot be...Consider the following program.
```
class Eq
test :: (Eq a, Num a) => a
test = 42
```
The REPL tries to default the type of the expression `test` to `Int`. But due to the local definition of `Eq` this should not happen as it cannot be guaranteed that there is an `Eq` instance for `Int` (which is not the case in the program above).
This problem can be fixed, if the full qualified class name is considered when defaulting (so `Prelude.Eq` instead of `Eq`).https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/14Consider "Read" and "Show" constraints when defaulting2017-10-31T17:06:12ZFinn TeegenConsider "Read" and "Show" constraints when defaultingCurrently, only `Eq` and `Ord` constraints are considered when a numeric constraint is defaulted to `Int` or `Float`.
This way, expressions like `read "1.0" :: (Read a, Fractional a) => a` cannot be entered in the REPL without getting an...Currently, only `Eq` and `Ord` constraints are considered when a numeric constraint is defaulted to `Int` or `Float`.
This way, expressions like `read "1.0" :: (Read a, Fractional a) => a` cannot be entered in the REPL without getting an error.
To fix this problem, `Read` and `Show` constraints should be handled the same way as `Eq` and `Ord` constraints are handled.https://git.ps.informatik.uni-kiel.de/curry/pakcs/-/issues/13REPL does not print types with multiple class constraints correctly2017-10-24T21:45:29ZFinn TeegenREPL does not print types with multiple class constraints correctlyWhen using the `:t` command in the REPL, types with multiple class constraints are not printed correctly. For example, a type like `(Eq a, Show a) => a` gets printed as `Eq a => Show a => a`.When using the `:t` command in the REPL, types with multiple class constraints are not printed correctly. For example, a type like `(Eq a, Show a) => a` gets printed as `Eq a => Show a => a`.