[clean-list] Strict lists strike again...
Jerzy Karczmarczuk
karczma@info.unicaen.fr
Mon, 08 Dec 2003 19:03:11 +0100
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.
Best regards
Jerzy Karczmarczuk