Clean can not infer the kind of the array. The fact that is an Int array is clear but not the ArrayKind(see lang ref: 4.4).
The following code works. Note that it is only recommended to work with arrays
if the code is very time critical.
-----------------------------------
module test
import StdEnv
Start :: Int
Start = {#1,2,3,4}.[0] // Use an unboxed arraykind
Start = {!1,2,3,4}.[0] // Use a strict arraykind
-----------------------------------
Best,
Mart
> As I try to compile the following program, I get the following error:
>
> Overloading error [test.icl,4,Start]: internal overloading of "_createArray=
> " could not be solved.
>
> Where's the problem ?
> (Using Clean 2.4 windows 32 bits)
>
> Best regards.
> Maurizio.
>
> -----------------------------------
> module test
> import StdEnv
>
> Start :: Int
> Start = {1,2,3,4}.[0]
>
> ------------------------------------
>
> _______________________________________________
> clean-list mailing list
> [email protected]
> http://mailman.science.ru.nl/mailman/listinfo/clean-list
signature.asc
Description: PGP signature
_______________________________________________ clean-list mailing list [email protected] http://mailman.science.ru.nl/mailman/listinfo/clean-list
