compiler issueshttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues2020-10-08T10:46:23+02:00https://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/77compiler crashes with "Run Time Error: index out of range"2020-10-08T10:46:23+02:00Steffen Michelscompiler crashes with "Run Time Error: index out of range"This can be reproduced with the nightly Linux-x64 iTasks compiler, but ONLY with the iTasks branch https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK/-/tree/editmode-only-in-generic-editor NOT with the master iTasks branch.
The mo...This can be reproduced with the nightly Linux-x64 iTasks compiler, but ONLY with the iTasks branch https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK/-/tree/editmode-only-in-generic-editor NOT with the master iTasks branch.
The most minimal definition resulting in the crash I could find is:
```
test :: Task (?(Either (?a) (?a, ?a, ?a))) | iTask a
test = withShared ?None \sds -> viewSharedInformation [ViewAs f] sds
where
f (?Just (Right (_, _, _))) = ()
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/76Incorrect code generated for Zip2 with stack tracing enabled2020-10-01T16:31:35+02:00Camil StapsIncorrect code generated for Zip2 with stack tracing enabledWith the current (linux x64) nightly, the following program crashes with a segmentation fault when stack tracing is enabled:
```clean
import StdOverloadedList
Start = Zip2 [!1,2,3!] [!2,3,4!]
```With the current (linux x64) nightly, the following program crashes with a segmentation fault when stack tracing is enabled:
```clean
import StdOverloadedList
Start = Zip2 [!1,2,3!] [!2,3,4!]
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/74Curried use of strict ?Just causes segmentation fault2020-09-21T12:59:00+02:00Camil StapsCurried use of strict ?Just causes segmentation faultFor example, this causes a segmentation fault on the current x64 nightly:
```clean
import StdEnv
f :: (Int -> ?Int)
f = ?Just o ((+) 5)
Start = f 1
```
Whereas this works fine with a custom ADT:
```clean
:: M a = J !a
g :: (Int -> ...For example, this causes a segmentation fault on the current x64 nightly:
```clean
import StdEnv
f :: (Int -> ?Int)
f = ?Just o ((+) 5)
Start = f 1
```
Whereas this works fine with a custom ADT:
```clean
:: M a = J !a
g :: (Int -> M Int)
g = J o ((+) 5)
Start = g 1
```
Also `f = (\x -> ?Just x) o ((+) 5)` works fine.
I think `?Just` should be defined as a `.record` in _system.abc, with the corresponding lazy entry for currying, as is done with strict lists and constructors.
Finally, I'm not sure whether it is related or not, but `f = ?Just` results in a lazy `?^Just` being created:
```clean
f :: (Int -> ?Int)
f = ?Just
Start = f 1
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/73generic type information still contains synonyms2020-09-24T14:30:27+02:00Mart Lubbersgeneric type information still contains synonymsThe following program:
```
module test
import StdEnv, StdGeneric
generic g a :: a -> String
g{|Int|} _ = "Int"
g{|RECORD of grd|} f (RECORD a) = grd.grd_name +++ " " +++ f a +++ " (" +++ toString grd.grd_type +++ ")"
g{|FIELD|} f (FIE...The following program:
```
module test
import StdEnv, StdGeneric
generic g a :: a -> String
g{|Int|} _ = "Int"
g{|RECORD of grd|} f (RECORD a) = grd.grd_name +++ " " +++ f a +++ " (" +++ toString grd.grd_type +++ ")"
g{|FIELD|} f (FIELD a) = f a
instance toString GenType
where
toString (GenTypeCons a) = a
toString (GenTypeVar i) = toString i
toString (GenTypeApp l r) = "(" +++ toString l +++ " " +++ toString r +++ ")"
toString (GenTypeArrow l r) = "(" +++ toString l +++ "->" +++ toString r +++ ")"
:: Syn :== Int
:: T = {t :: Syn}
derive g T
Start = g{|*|} {t=42}
```
Produces:
```
T Int ((Syn->T))
```
While I expect it (and want it) to produce:
```
T Int ((Int->T))
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/72?Just not allowed in patterns in parentheses2020-08-13T09:11:05+02:00Camil Staps?Just not allowed in patterns in parenthesesThe current parser does not accept `?Just` in patterns in parentheses:
```clean
Start = (?Just 5) =: (?Just _)
```
The error message is: `Parse error [sandbox.icl,3;22,pattern]: <pattern> expected instead of ?Just`.
With a normal ADT ...The current parser does not accept `?Just` in patterns in parentheses:
```clean
Start = (?Just 5) =: (?Just _)
```
The error message is: `Parse error [sandbox.icl,3;22,pattern]: <pattern> expected instead of ?Just`.
With a normal ADT this works fine:
```clean
:: X = X Int
Start = (X 1) =: (X _)
```
Without parentheses it also works fine:
```clean
Start = (?Just 5) =: ?Just _
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/71Crash with: no TypeCons2021-02-17T23:05:10+01:00Mart LubbersCrash with: no TypeCons```
module test
g{|{!#}|} = 0
```
Gives a correct error:
```
Parse error [test.icl,3;6,atype]: attributed and annotated type expected instead of #
```
but crashes the compiler with the error:
```
no TypeCons
``````
module test
g{|{!#}|} = 0
```
Gives a correct error:
```
Parse error [test.icl,3;6,atype]: attributed and annotated type expected instead of #
```
but crashes the compiler with the error:
```
no TypeCons
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/70Run time error, rule 'has_no_curried_macro_CasePatterns;402' in module 'trans...2020-06-23T14:27:22+02:00Camil StapsRun time error, rule 'has_no_curried_macro_CasePatterns;402' in module 'transform' does not matchThe compiler crashes on the program below due to an unimplemented pattern in `has_no_curried_macro_CasePatterns`. This happens for both `empty` and `empty2`.
```clean
import StdOverloadedList
Start = empty (L [|1])
:: L a = L ![a!]
e...The compiler crashes on the program below due to an unimplemented pattern in `has_no_curried_macro_CasePatterns`. This happens for both `empty` and `empty2`.
```clean
import StdOverloadedList
Start = empty (L [|1])
:: L a = L ![a!]
empty l :== case l of
L [|] -> True
_ -> False
empty2 l :== l=:(L [|])
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/69Incorrect error message for inconsistently attribution in classes2020-07-06T09:39:30+02:00Mart LubbersIncorrect error message for inconsistently attribution in classesThe following code:
```
module test
class C m :: v:m -> u:m
```
Gives the error:
```
Error [test.icl,2,C]: u inconsistently attributed (3)
```
While it should be:
```
Error [test.icl,2,C]: m inconsistently attributed (3)
```
It onl...The following code:
```
module test
class C m :: v:m -> u:m
```
Gives the error:
```
Error [test.icl,2,C]: u inconsistently attributed (3)
```
While it should be:
```
Error [test.icl,2,C]: m inconsistently attributed (3)
```
It only happens when using type attribute variable. The following program:
```
module test
class C m :: m -> *m
```
correctly reports:
```
Error [test.icl,2,C]: m inconsistently attributed (5)
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/67Runtime error in the compiler when using generics in conjunction with abstrac...2020-05-11T17:44:21+02:00Mart LubbersRuntime error in the compiler when using generics in conjunction with abstract newtypestest.icl
```
module test
import StdGeneric
import T
generic g a :: a
derive g T
Start = 42
```
T.dcl
```
definition module T
:: T a (=: T a)
```
T.icl
```
implementation module T
:: T a =: T a
```
With both the master and the iTa...test.icl
```
module test
import StdGeneric
import T
generic g a :: a
derive g T
Start = 42
```
T.dcl
```
definition module T
:: T a (=: T a)
```
T.icl
```
implementation module T
:: T a =: T a
```
With both the master and the iTask compiler:
```
Run time error, rule 'buildTypeDefInfo' in module 'generics1' does not match
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/66Compiler crashes for some derivations of [# !] and [#] in combination with ne...2020-04-16T11:19:22+02:00Mart LubbersCompiler crashes for some derivations of [# !] and [#] in combination with newtypesThe problem occurs on linux 64 bit both using the stable compiler and the iTask compiler from the latest nightly.
The following results in a compiler crash:
```
module test
import StdEnv, StdGeneric
:: Box b a =: Box b
derive bimap B...The problem occurs on linux 64 bit both using the stable compiler and the iTask compiler from the latest nightly.
The following results in a compiler crash:
```
module test
import StdEnv, StdGeneric
:: Box b a =: Box b
derive bimap Box
unBox (Box b) :== b
box b :== Box b
isInfinite :: ([String] -> Box Bool a) -> Bool
isInfinite f = unBox (f [])
generic gPotentialInf a :: [String] -> Box Bool a
derive gPotentialInf [#]
gPotentialInf{|Int|} _ = box False
gPotentialInf{|UNIT|} _ = box False
gPotentialInf{|EITHER|} l r m = box (unBox (l m) || unBox (r m))
gPotentialInf{|PAIR|} l r m = box (unBox (l m) || unBox (r m))
gPotentialInf{|CONS|} x m = box (unBox (x m))
gPotentialInf{|OBJECT of {gtd_name}|} x m
| isMember gtd_name m = box True
= box (unBox (x [gtd_name:m]))
Start :: Bool
Start = isInfinite t
where
t :: ([String] -> Box Bool [#Int])
t = gPotentialInf{|*|}
```
- Deriving regular lists works fine with the newtype
- Changing `Box` to `:: Box a b = Box b | Unused a` works as wellJohn van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/65Incorrect incorrect type warning2020-05-27T16:07:32+02:00Camil StapsIncorrect incorrect type warningWith the current compiler, the following program gives an incorrect type warning for `Start`:
```clean
module w
s :: *World -> *World
s w = w
Start w = s w
```
And running it fails with a type error.With the current compiler, the following program gives an incorrect type warning for `Start`:
```clean
module w
s :: *World -> *World
s w = w
Start w = s w
```
And running it fails with a type error.John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/64Run time error and many "inconsistent attribution" errors when using an undef...2020-03-25T17:25:37+01:00Camil StapsRun time error and many "inconsistent attribution" errors when using an undefined typeIn the current nightly, when I change the type of the `IWorld.engineOptions` field in iTasks.Internal.IWorld to a non-existent type (e.g. `engineOptions :: !X`) and try to recompile the module, the compiler gives many "inconsistent attri...In the current nightly, when I change the type of the `IWorld.engineOptions` field in iTasks.Internal.IWorld to a non-existent type (e.g. `engineOptions :: !X`) and try to recompile the module, the compiler gives many "inconsistent attribution" errors which I think should not be there, and eventually crashes with a run time error:
```
$ cpm project BasicAPIExamples.prj compile iTasks.Internal.IWorld
Compiling 'iTasks.Internal.IWorld'.
Run time error, rule '<case>[line:864];11;433' in module 'checktypes' does not match
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: X undefined
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,35,IWorld]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,61,TaskEvalState]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,61,TaskEvalState]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,61,TaskEvalState]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,61,TaskEvalState]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,61,TaskEvalState]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,69,IOTasks]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,69,IOTasks]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,78,ListenerInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,78,ListenerInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,78,ListenerInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,78,ListenerInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,84,ConnectionInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,84,ConnectionInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,84,ConnectionInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,84,ConnectionInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,84,ConnectionInstanceOpts]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,120,ClockParameter]: inconsistent attribution of type definition
Error [iTasks.Internal.IWorld.dcl,120,ClockParameter]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,25,WebTask]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,25,WebTask]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,30,StartupTask]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,30,StartupTask]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,36,TaskWrapper]: a type variable already defined
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,59,EngineOptions]: inconsistent attribution of type definition
Error [iTasks.Engine.dcl,49,Startable]: a (variable) already defined
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/63More aggressive optimizations for lambdas2020-03-20T15:41:02+01:00Camil StapsMore aggressive optimizations for lambdasIn https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK/-/merge_requests/387 I noticed that writing `\_ k -> key == k` was faster than `const ((==) key)`. This is even the case if `const` were a macro.
Is it possible to fill in argu...In https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK/-/merge_requests/387 I noticed that writing `\_ k -> key == k` was faster than `const ((==) key)`. This is even the case if `const` were a macro.
Is it possible to fill in arguments of lambdas when they are already known? For example, I would expect to see the same code generated for these two Start rules:
```
Start = ((\x _ -> x) ((==) 0)) () 1
Start = (\_ -> (==) 0) () 1
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/62Cannot unify types when using an existentially quantified type variable in tw...2020-03-02T15:16:37+01:00Camil StapsCannot unify types when using an existentially quantified type variable in two record fieldsIn the program below, the result type of `fromInt` cannot be unified to the parameter type of `toInt`, even though they are the same.
Would this be very complicated to implement?
```clean
import StdEnv
:: R = E.a: {fromInt :: Int -> a,...In the program below, the result type of `fromInt` cannot be unified to the parameter type of `toInt`, even though they are the same.
Would this be very complicated to implement?
```clean
import StdEnv
:: R = E.a: {fromInt :: Int -> a, toInt :: a -> Int}
f :: R -> Int
f r = r.toInt (r.fromInt 5)
Start = f {fromInt=id, toInt=id}
```
There is a workaround, so it's not really urgent:
```clean
:: R = E.a: {funs :: Funs a}
:: Funs a = {fromInt :: Int -> a, toInt :: a -> Int}
f :: R -> Int
f {funs=f=:{fromInt,toInt}} = toInt (fromInt 5)
Start = f {funs={fromInt=id, toInt=id}}
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/61rank2 polymorphism problem with newtypes2020-02-21T07:55:24+01:00Mart Lubbersrank2 polymorphism problem with newtypesUsing this file (both with the itask and the master compiler):
```
module test
import StdEnv
import Data.Maybe
import Data.Functor
import Control.Applicative
class expr v where
lit :: i -> v i | toString i
(+.) infixl 6 :: (v i) (v ...Using this file (both with the itask and the master compiler):
```
module test
import StdEnv
import Data.Maybe
import Data.Functor
import Control.Applicative
class expr v where
lit :: i -> v i | toString i
(+.) infixl 6 :: (v i) (v i) -> v i | + i
instance expr Maybe where
lit i = Just i
+. x y = (+) <$> x <*> y
:: Print a = Print String
print :: (Print a) -> String
print (Print a) = a
instance expr Print where
lit i = Print (toString i)
+. (Print l) (Print r) = Print (l +++ "+" +++ r)
printEval :: (A.v: v a | expr v) -> (Maybe a, String)
printEval f = (f, let (Print p) = f in p)
Start :: (Maybe Int, String)
Start = printEval (lit 4 +. lit 38)
```
This works fine and gives the output:
```
((Just 42),"4+38")
```
However, if we change
```
:: Print a = Print a
```
to
```
:: Print a =: Print a
```
The output is wrong, and when we use the second element it obviously crashes:
```
((Just 42),_f54;54.12)
```
If we change
```
printEval f = (f, let (Print p) = f in p)
```
to
```
printEval f = (f, print f)
```
It works again.
The construction `let (Print p) = f in p` works fine in a non rank2 polymorphic functionJohn van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/60Index out of range in freshAlgebraicType in iTask compiler2020-02-19T12:31:15+01:00Camil StapsIndex out of range in freshAlgebraicType in iTask compilerOn the nightly of 2020-02-17, the iTask compiler doesn't manage to compile iTasks.UI.Tune:
```
$ cpm project BasicAPIExamples.prj compile iTasks.UI.Tune
Compiling 'iTasks.UI.Tune'.
Run Time Error: index out of range
Stack trace:
freshAl...On the nightly of 2020-02-17, the iTask compiler doesn't manage to compile iTasks.UI.Tune:
```
$ cpm project BasicAPIExamples.prj compile iTasks.UI.Tune
Compiling 'iTasks.UI.Tune'.
Run Time Error: index out of range
Stack trace:
freshAlgebraicType [module: type]
requirements_of_guarded_expressions;257 [module: type]
requirements;310 [module: type]
requirements;311 [module: type]
requirements_of_args;255 [module: type]
requirements;309 [module: type]
requirements_of_let_expr;562 [module: type]
requirements;311 [module: type]
requirements_of_algebraic_pattern;256 [module: type]
possibly_accumulate_reqs;558 [module: type]
requirements_of_algebraic_patterns;258 [module: type]
requirements_of_guarded_expressions;257 [module: type]
Error: Compiler crashed: /opt/clean/lib/exe/cocl-itasks
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/58Multiply defined error for instances of types imported qualifiedly2019-11-14T13:14:01+01:00Camil StapsMultiply defined error for instances of types imported qualifiedlyIt seems to be impossible to instantiate a class for two types that are imported qualifiedly. The following causes a "multiply defined" error on the current stable/itask compiler:
```clean
module inst
class c a :: a
instance c 'inst_a...It seems to be impossible to instantiate a class for two types that are imported qualifiedly. The following causes a "multiply defined" error on the current stable/itask compiler:
```clean
module inst
class c a :: a
instance c 'inst_a'.A where c = 'inst_a'.A
instance c 'inst_a'.B where c = 'inst_a'.B
```
```clean
definition module inst_a
:: A = A
:: B = B
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/57Newtypes of unboxable types cannot be unboxed in arrays any more2019-11-04T15:44:40+01:00Camil StapsNewtypes of unboxable types cannot be unboxed in arrays any morePerhaps since https://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/commit/616e33c040010a736c835345c273fd5a5270351c, it is no longer possible to define unboxed arrays of newtypes, so that the following program fails to compile wit...Perhaps since https://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/commit/616e33c040010a736c835345c273fd5a5270351c, it is no longer possible to define unboxed arrays of newtypes, so that the following program fails to compile with "I instance cannot be unboxed":
```clean
import StdEnv
:: I =: I Int
Start :: {#I}
Start = {I 5}
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/56Run time error, rule 'find_instance;201' in module 'overloading' does not match2019-10-31T10:46:33+01:00Steffen MichelsRun time error, rule 'find_instance;201' in module 'overloading' does not matchThe itasks compiler crashes for this program:
```
Start = f ()
class C a :: a
f :: !a -> () | C a
f _ = ()
```The itasks compiler crashes for this program:
```
Start = f ()
class C a :: a
f :: !a -> () | C a
f _ = ()
```John van GroningenJohn van Groningenhttps://gitlab.science.ru.nl/clean-compiler-and-rts/compiler/-/issues/55Issue with generic functions for boxed arrays2019-10-30T14:00:02+01:00Mart LubbersIssue with generic functions for boxed arraystest program:
```
module test
import StdEnv
import StdGeneric
generic gFun a :: Bool -> a
//Not allowed, throws a: Error [test.icl,9,gFun]: multiply defined
//gFun{|{#Char}|} True = "True"
//gFun{|{#Char}|} False = "False"
//Allowed...test program:
```
module test
import StdEnv
import StdGeneric
generic gFun a :: Bool -> a
//Not allowed, throws a: Error [test.icl,9,gFun]: multiply defined
//gFun{|{#Char}|} True = "True"
//gFun{|{#Char}|} False = "False"
//Allowed:
gFun{|String|} True = "True"
gFun{|String|} False = "False"
```Camil StapsCamil Staps