24 Mar
2010
24 Mar
'10
6:26 p.m.
On Wed, Mar 24, 2010 at 7:27 AM, Daniel Fischer wrote: [...]
and this expression is only evaluated if necessary. factorial 20000 builds a thunk of 20000 nested multiplications, this is tried to evaluate when the value is demanded for printing, but the expression is too deeply nested to fit on the stack.
So it goes to the stack, hum? It thought it would be just a pointer to some computation type on the heap. Anyway, thanks for the detailed answer. I asked here because I didn't test that code on any other compiler/interpreter, so it could be something related to hugs implementation. -- Bruno Schneider http://www.dcc.ufla.br/~bruno/