[Haskell-cafe] Best way to find an "undefined" error?

Scott West saynte at gmail.com
Thu Feb 14 16:12:34 EST 2008

On Thu, Feb 14, 2008 at 3:02 PM, Denis Bueno <dbueno at gmail.com> wrote:
> On Thu, Feb 14, 2008 at 2:55 PM, Don Stewart <dons at galois.com> wrote:
>  >  You can use the profiler to get a stack trace, or use the new
>  >  GHCi debugger to step backwards from the exception to the source.
>  >
>  >  I wrote a bit of a tutorial for this here:
>  >
>  >  http://cgi.cse.unsw.edu.au/~dons/blog/2007/11/14#no-exceptions
>  Section 6.3 of http://haskell.org/haskellwiki/Debugging also is
>  relevant for using ghcu to step backward ... perhaps the section label
>  is misleading, though.  Feel free to modify as needed if you find the
>  ghci stepper lets you find the problem

Well, when using +RTS -xc, I get:


I'm not really sure what to do with this, not really the stacktrace I
was hoping for. The ghci debugger I found was really quite nice, up
until it his some portion of code that it isn't interpreting. By not
"interpreting" i mean things that have been already been compiled and
it's just calling (even if it has been compiled with profiling). I
have a feeling that my problem is somewhere in something that has
already been compiled.

Knowing that, should +RTS -xc be giving me more information? Is there
a way for it to do so?


More information about the Haskell-Cafe mailing list