[clean-list] Strict lists strike again...

John van Groningen johnvg@cs.kun.nl
Tue, 9 Dec 2003 17:14:45 +0100


Jerzy Karczmarczuk wrote:
>Illustrissimi Condottieri:
>
>A silly, wasteful infinite repetition for unboxed stuff, say Reals:
>
>rep :: !Real -> [#Real]
>rep x = [x : rep x]
>
>works. But making it just a cycle:
>
>Rep x = z where
>  z = [# x : z]
>
>as the obverloaded Repeat does -
>- chokes and dies, yelling horribly. (Clean 2.1, Microsoft Windows), after
>having displayed on the console some small number, close to floating underflow.
>The system wants even to launch the debugger, so there is some access violation
>somewhere in the generated code.

The compiler generates incorrect code if the root expression of a function
is an unboxed list constructor on a cycle.

An improved backend.dll for windows with a fix for this bug is available at:

http://www.cs.kun.nl/~clean/download/Clean21/windows/backend.zip

Regards,

John van Groningen