[Haskell-cafe] A guess on stack-overflows - thunks build-up and tail recursion

GüŸnther Schmidt gue.schmidt at web.de
Fri Mar 20 06:59:51 EDT 2009


Hi all,

I've been running into stack-overflow problems for some time now. Here 
is what I gathered so far.

I used to think that the build up of thunks caused the stack overflow 
when, as it turns out, it does not.

I apparently can have a huge thunk build up eventhough I use a 
supposedly accumulative, tail-recursive algorithm.

Apparently it is the evaluation of this huge build-up that causes the 
stack-overflow but not the thunk-build-up *as such*.

Do I understand this correctly?

Günther



More information about the Haskell-Cafe mailing list