[Haskell-cafe] Re: Haskell stacktrace

Justin Bailey jgbailey at gmail.com
Tue Sep 9 17:12:38 EDT 2008


2008/9/9 Pieter Laeremans <pieter at laeremans.org>:
> What 's the best equivalent haskell approach ?
> thanks in advance,
> Pieter

The preferred approach is to look at your code, figure out where you
are using tail (or could be calling something that uses tail) and use
the "trace" function to output logging info. Don't forget that output
is buffered with trace so you might get some strange ordering. A quick
search of the API docs should show you where trace lives.

Techniques that worked for Java don't work very well when debugging
haskell. Others will tell you about flags and possibly using the
debugger but I would count on eyeballing and printing as the least
painful method.

Justin


More information about the Haskell-Cafe mailing list