At 01:26 2001-02-26 -0800, Simon Peyton-Jones wrote:
>And so on.  So we build up a giant chain of thunks.
>Finally we evaluate the giant chain, and that builds up
>a giant stack.
> ...
>If GHC were to inline foldl more vigorously, this would [not] happen.

I'd hate to have my programs rely on implementation-dependent optimizations.

BTW, I've wondered why the Prelude provides foldl, which commonly leads to
this trap, and does not provide the strict variant foldl', which is useful
enough that it's defined internal to the Hugs prelude.  Simple prejudice
against strictness?

--
Scott Turner
[EMAIL PROTECTED]       http://www.billygoat.org/pkturner

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to