[Haskell-cafe] how to debug stack overflow?

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Sat Jun 22 13:04:21 CEST 2013

What is the recommended method 
to find the exact reason for a stack overflow
(when running a Haskell program compiled with ghc)?

When I compile with -prof -auto-all, and run with +RTS -xc,
I see a very short call stack, which can't be right. 
But that's probably because I am calling some library method 
that was compiled without -auto-all so it's invisible in the trace?

I can avoid the overflow by +RTS -K1G  or something
but I want to investigate because it might indicate
some inefficiency in the code (evaluations happening
at the wrong time).

- J.W.

More information about the Haskell-Cafe mailing list