[clean-list] Re: Clean compiler exited abnormally
Ronny Wichers Schreur
ronny@cs.kun.nl
Thu, 13 Sep 2001 16:24:38 +0200
Gé writes (to the Clean mailing list):
>I wrote something similar for general arrays:
>[..]
>str2d :: {{t}} -> String | ArrayElem, toString t
>str2d xx = str2d` 0
>where
> n = size xx
> str2d` i
> | i == n = ""
> = str1d xx.[i] +++ "\n" +++ str2d` (inc i)
>[..]
>when I put the function str1d and str2d in a separate
>module [..] the compiler [..] bails out on me with
>"Clean compiler exited abnormally"
>
>The question is then of course: is this a compiler bug or am
>I doing something wrong?
This is a compiler bug. You get this message when the Clean
compiler crashes on Linux/Unix.
>And if it is a bug in the compiler, is there a way to
>work around it?
Lift xx and specify str2d`'s type:
str2d :: {{t}} -> String | ArrayElem, toString t
str2d xx = str2d` 0 xx
where
n = size xx
str2d` :: Int {{t}} -> String| ArrayElem, toString t
str2d` i xx
| i == n = ""
= str1d xx.[i] +++ "\n" +++ str2d` (inc i) xx
We'll have to see if the bug is easy to fix. It's in a part
of the Clean compiler that won't be used in Clean 2.0, so
perhaps this bug won't get a high priority.
Cheers,
Ronny Wichers Schreur