[Haskell-cafe] Best way to find an "undefined" error?
dons at galois.com
Thu Feb 14 14:55:43 EST 2008
> Hello all,
> Does anyone favourite technique to track down an "undefined" call? I'm
> 99% sure that my code is not the offender (I've grepped for undefined
> occurrences and turned them all into "error" calls). Supposing that
> this is happening in some other package or library that I'm using,
> what is the best way to find out where it is? I have profiling enabled
> on all libraries that I use, so I'm ok there I think. Any magic
> combination of +RTS .. -RTS?
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:
More information about the Haskell-Cafe