curry-frontend issueshttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues2019-11-01T16:08:52Zhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/46[RankNTypes] Problems with additional constraints for functions inside Instan...2019-11-01T16:08:52ZKai Prott[RankNTypes] Problems with additional constraints for functions inside InstanceDeclsThe following code crashes with an error somewhere after dictionary insertion
```haskell
class Test a where
testfunc :: Integral b => a -> b
instance Test Float where
testfunc x = error ""
```
Without the InstanceDecl, the code work...The following code crashes with an error somewhere after dictionary insertion
```haskell
class Test a where
testfunc :: Integral b => a -> b
instance Test Float where
testfunc x = error ""
```
Without the InstanceDecl, the code works just fine.Jan-Hendrik MatthesJan-Hendrik Mattheshttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/45Front end crashes when importing RankNTypes2019-09-17T14:57:48ZMichael HanusFront end crashes when importing RankNTypesWhen importing the module RankNTypes from the front-end test suite,
the front end crashes. E.g., if Test.curry contains
import RankNTypes
main = 42
the compilation of this file returns an error:
```
> :l Test
[1 of 3] Skipping...When importing the module RankNTypes from the front-end test suite,
the front end crashes. E.g., if Test.curry contains
import RankNTypes
main = 42
the compilation of this file returns an error:
```
> :l Test
[1 of 3] Skipping Prelude ( /net/medoc/home/mh/pakcs2.5/lib/Prelude.curry, /net/medoc/home/mh/pakcs2.5/lib/.curry/Prelude.fcy )
[2 of 3] Skipping RankNTypes ( RankNTypes.curry, .curry/RankNTypes.fcy )
[3 of 3] Compiling Test ( Test.curry, .curry/Test.fcy )
pakcs-frontend: Internal error: Checks.InterfaceSyntaxCheck.checkClosed
CallStack (from HasCallStack):
error, called at src/Base/Messages.hs:78:21 in main:Base.Messages
```Jan-Hendrik MatthesJan-Hendrik Mattheshttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/44Avoid use of absolute path names for style file copying2019-10-07T16:14:18ZMichael HanusAvoid use of absolute path names for style file copyingWhen somebody installs PAKCS with the pre-compiled frontend binary,
HTML generation does not work:
> bin/pakcs-frontend --html -i lib Prelude.curry
[1 of 1] Compiling Prelude ( lib/Prelude.curry, Prelude_curry.html )
...When somebody installs PAKCS with the pre-compiled frontend binary,
HTML generation does not work:
> bin/pakcs-frontend --html -i lib Prelude.curry
[1 of 1] Compiling Prelude ( lib/Prelude.curry, Prelude_curry.html )
Error:
Could not copy CSS style file:
File `/net/medoc/home/pakcs/debian-09-amd64/pakcs/frontend/pkg/share/x86_64-linux-ghc-8.4.3/curry-frontend-1.0.4/currysource.css' does not exist
It seems that the absolute path is part of the binary.https://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 Mattheshttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/42[RankNTypes] Compilation error2019-07-30T23:03:19ZFinn Teegen[RankNTypes] Compilation errorUsing the most recent version including arbitrary rank types, compilation of the PAKCS' toolsuite results in an error. The last lines of the log file are given below.
```
[40 of 62] Compiling Analysis.RightLinearity ( /home/fte/Project...Using the most recent version including arbitrary rank types, compilation of the PAKCS' toolsuite results in an error. The last lines of the log file are given below.
```
[40 of 62] Compiling Analysis.RightLinearity ( /home/fte/Projects/University/higher-rank-polymorphism/currytools/optimize/.cpm/packages/cass-analysis/src/Analysis/RightLinearity.curry, /home/fte/Projects/University/higher-rank-polymorphism/currytools/optimize/.cpm/packages/cass-analysis/src/.curry/Analysis/RightLinearity.fcy )
/home/fte/Projects/University/higher-rank-polymorphism/currytools/optimize/.cpm/packages/cass-analysis/src/Analysis/RightLinearity.curry, line 59.1: Error:
Ambiguous type variable _39
in type Prelude.Eq _39 => FlatCurry.Types.Expr ->
Prelude.Maybe [Prelude.Int]
inferred for equation
linearVariables (Comb _ f es)
| (f == ("Prelude", "?")) && (length es == 2) =
linearVariables (Or (head es) (head (tail es)))
| otherwise =
mapMMaybe linearVariables es >>-
(\esvars ->
let vars = concat esvars
in if nub vars == vars then Just vars else Nothing)
/home/fte/Projects/University/higher-rank-polymorphism/currytools/optimize/.cpm/packages/cass-analysis/src/Analysis/RightLinearity.curry, line 70.1: Error:
Ambiguous type variable _85
in type Prelude.Eq _85 => FlatCurry.Types.Expr ->
Prelude.Maybe [Prelude.Int]
inferred for equation
linearVariables (Let bs e) =
mapMMaybe linearVariables (map snd bs) >>-
(\bsvars ->
linearVariables e >>-
(\evars ->
let vars = concat (evars : bsvars)
in if nub vars == vars
then Just (vars \\ (map fst bs))
else Nothing))
ERROR occurred during parsing!
Makefile:29: recipe for target 'BindingOpt' failed
make[3]: *** [BindingOpt] Error 1
make[3]: Leaving directory '/home/fte/Projects/University/higher-rank-polymorphism/currytools/optimize'
Makefile:163: recipe for target 'kernel' failed
make[2]: *** [kernel] Error 2
make[2]: Leaving directory '/home/fte/Projects/University/higher-rank-polymorphism'
Makefile:155: recipe for target 'build' failed
make[1]: *** [build] Error 2
make[1]: Leaving directory '/home/fte/Projects/University/higher-rank-polymorphism'
Make process logged in file make.log
```Jan-Hendrik MatthesJan-Hendrik Mattheshttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/40[RankNTypes] Prelude.!!: index too large2019-07-25T09:39:05ZKai Prott[RankNTypes] Prelude.!!: index too largeThe following (simplified) program compiles correctly:
```haskell
{-# LANGUAGE RankNTypes #-}
newtype ParcurryT m a = ParcurryT {
runP :: forall r . (() -> r) -> m a
}
```
as soon as we try to use `runP`, the frontend fails with `Prel...The following (simplified) program compiles correctly:
```haskell
{-# LANGUAGE RankNTypes #-}
newtype ParcurryT m a = ParcurryT {
runP :: forall r . (() -> r) -> m a
}
```
as soon as we try to use `runP`, the frontend fails with `Prelude.!! index too large`.
Just add:
```
test = runP
```
Note:
* If we desugar the `RecordConstructor` to a "normal" one and add an explicit function for runP, the problem still exists.
* Using `data` instead of `newtype` makes no difference.Jan-Hendrik MatthesJan-Hendrik Mattheshttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/39Type-Check fails with internal error for instance declarations with ambiguous...2019-04-04T15:13:23ZKai ProttType-Check fails with internal error for instance declarations with ambiguous funtion namesSuppose you have
```
module A where
import Prelude hiding (id)
class ID a where
id :: a -> a
```
```
module B where
import Prelude
import A
instance ID Int where
id x = x
```
then the Type-Check will fail with an internal erro...Suppose you have
```
module A where
import Prelude hiding (id)
class ID a where
id :: a -> a
```
```
module B where
import Prelude
import A
instance ID Int where
id x = x
```
then the Type-Check will fail with an internal error, instead of reporting the ambiguous identifier.Kai ProttKai Protthttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/26Fix desugaring of record patterns2018-10-09T16:15:37ZFinn TeegenFix desugaring of record patternsConsider the following program.
```
data Car = Car {company :: String, model :: String, year :: Int}
main =
let
rec = Car {company="Ford", model="Mustang", year=1967}
rec2 = Car {company="Toyota", model="Camry", year=1997}
...Consider the following program.
```
data Car = Car {company :: String, model :: String, year :: Int}
main =
let
rec = Car {company="Ford", model="Mustang", year=1967}
rec2 = Car {company="Toyota", model="Camry", year=1997}
Car { company = companyVar } = rec
Car { company = companyVar2 } = rec2
in
rec
```
Compiling the program above leads to an internal error.
```
[2 of 2] Compiling test ( test.curry, .curry/test.fcy )
pakcs-frontend: Internal error: qualBindTopEnv QualIdent {qidModule =
Nothing, qidIdent = Ident {idPosition = NoPos, idName = "_", idUnique
= 0}}
CallStack (from HasCallStack):
error, called at src/Base/Messages.hs:78:21 in main:Base.Messages
ERROR occurred during parsing!
```Finn TeegenFinn Teegenhttps://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/12Fix reexport of modules imported with restrictions2019-10-19T01:46:45ZFinn TeegenFix reexport of modules imported with restrictionsConsider the following two modules:
<pre>
module Export where
data Test = Test { test :: Test }
</pre>
<pre>
module Import (module Export) where
import Export (Test(test))
</pre>
When restricting the import of a data type from another...Consider the following two modules:
<pre>
module Export where
data Test = Test { test :: Test }
</pre>
<pre>
module Import (module Export) where
import Export (Test(test))
</pre>
When restricting the import of a data type from another module to its labels only (as above), the reexport of this module leads to an internal error:
<pre>
cymake: Internal error: Exports.funDecl: QualIdent {qidModule = Just (ModuleIdent {midPosition = Position {file = ".curry/Export.icurry", line = 1, column = 11, astRef = }, midQualifiers = ["Export"]}), qidIdent = Ident {idPosition = Position {file = ".curry/Export.icurry", line = 2, column = 20, astRef = }, idName = "test", idUnique = 0}}
</pre>https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/9Improve Error Message regarding export/import of record labels2019-10-19T01:45:20ZFinn TeegenImprove Error Message regarding export/import of record labelsConsider the following Curry modules:
<pre>
module RecTest (R(C1)) where
data R = C1 { l1 :: String, l2 :: Int }
| C2 { l2 :: Int }
</pre>
<pre>
import RecTest
test :: R -> R
test r = r { l2 = 42 }
</pre>
Running curry-fronte...Consider the following Curry modules:
<pre>
module RecTest (R(C1)) where
data R = C1 { l1 :: String, l2 :: Int }
| C2 { l2 :: Int }
</pre>
<pre>
import RecTest
test :: R -> R
test r = r { l2 = 42 }
</pre>
Running curry-frontend on the module RecTest yields the error message:
<pre>
test/RecImp.curry, line 4.10: Error:
No constructor has all of these fields:
`l2'
</pre>
Since the record ```R``` includes the label ```l2``` for both constructors, the message should be improved to "No visible constructor has all of these fields".https://git.ps.informatik.uni-kiel.de/curry/curry-frontend/-/issues/8(Re)export of record labels2019-10-19T01:46:02ZFinn Teegen(Re)export of record labelsConsider the following modules:
<pre>
module RecTest where
data R = C1 { l1 :: String, l2 :: Int }
| C2 { l2 :: Int }
</pre>
<pre>
module RecImp (module RecTest) where
import RecTest (l2)
-- test :: R -> R
test r = r { l2 = 4...Consider the following modules:
<pre>
module RecTest where
data R = C1 { l1 :: String, l2 :: Int }
| C2 { l2 :: Int }
</pre>
<pre>
module RecImp (module RecTest) where
import RecTest (l2)
-- test :: R -> R
test r = r { l2 = 42 }
</pre>