1. The following program seems able to run forever with hugs1.4 (on Sun Solaris):
Prelude> :s +g
Prelude> mapM_ putStr (repeat "")
{{Gc:94014}}{{Gc:94013}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{{Gc:94010}}{Interrupted!}
{{Gc:94014}}Prelude>
while after loading the file Main.hs containing the single definition
main = mapM_ putStr (repeat "")
we get instead
Hugs session for:
/usr/pd/lib/hugs1.4N/hugs/lib/Prelude.hs
Main.hs
Main> main
{{Gc:93694}}{{Gc:66926}}{{Gc:47803}}{{Gc:34143}}{{Gc:24388}}{{Gc:17420}}{{Gc:12446}}{{Gc:8890}}{{Gc:6350}}{{Gc:4534}}{{Gc:3239}}{{Gc:2311}}{{Gc:1652}}{{Gc:1180}}{{Gc:844}}
{{Gc:844}}ERROR: Garbage collection fails to reclaim sufficient space
Main>
Thus it seems that the global "data structure" main grows with time,
which is annoying (indeed, prohibitive) for some more interesting
non-terminating programs.
2. Using the Xlib files from hugs1.4beta indeed works, but with one change:
At the end of Xlib.hs,
needPrims_hugs
must now be followed by an integer literal.
I put
needPrims_hugs 1
and everything seems to work, but I would be happier if I knew what I was
doing. What is the significance of the number?
Best regards
Bj�rn von Sydow