On Wed, Mar 12, 2008 at 12:12 PM, Krzysztof Kościuszkiewicz
<[EMAIL PROTECTED]> wrote:
>  I have tried both Poly.StateLazy and Poly.State and they work quite well
>  - at least the space leak is eliminated. Now evaluation of the parser
>  state blows the stack...
>
>  The code is at http://hpaste.org/6310
>
>  Thanks in advance,

The stack blows up when a bunch of unevaluated thunks build up, and
you try to evaluate them. One way to determine where those thunks are
getting built is to use GHCs "retainer" profiling. Retainer sets will
show you the "call stack" that is holding on to memory. That can give
you a clue where these thunks are being created. To get finer-grained
results, annotate your code with {#- SCC "..." #-} pragmas. Then you
can filter the retainer profile by those annotations. That will help
you determine where in a given function the thunks are being created.

If you need help with profiling basics, feel free to ask.

Justin
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to