Martin Stein <[EMAIL PROTECTED]> writes:

> Did I understand the strictness of the case statement right:
> case z of z' forces that z' (and z) will be in head normalform?

Yes, that's right.

> > I checked this with both ghc-3.02 and ghc-4.00 with and without -O,
> > and except for ghc-4.00 without -O they all require a constant 200
> > bytes or so of heap.
> 
> I got other results. With -O and ghc-3.02 (pl0) the program below (simplified
> version of the 5-line example) needs linear heap space, without -O it needs
> constant heap space (about 1KB).

This looks like a CAF problem (if you look in the "CAF bytes" column
of the stats output, almost all the live heap is CAF data).  

Anyway, the new garbage collector in GHC 4.00 will fix this.

Cheers,
        Simon

"GHC 4.00 - coming soon!"

-- 
Simon Marlow                                             [EMAIL PROTECTED]
University of Glasgow                       http://www.dcs.gla.ac.uk/~simonm/
finger for PGP public key

Reply via email to