[Haskell-cafe] Diagnose stack space overflow

Max Bolingbroke batterseapower at hotmail.com
Mon Jul 4 18:32:27 CEST 2011


On 4 July 2011 16:44, Logo Logo <saraslogo at gmail.com> wrote:
> Hi,
>
> For the following error:
>
> Stack space overflow: current size 8388608 bytes.
> Use `+RTS -Ksize -RTS' to increase it.
>
> I want to find out the culprit function and rewrite it tail-recursively. Is
> there a way to find out which function is causing this error other
> than reviewing the code manually?

It's possible that building your program with profiling and then
running with "+RTS -xc" will print a useful call stack.

Cheers,
Max



More information about the Haskell-Cafe mailing list