[Haskell-cafe] How to debug GHC

Ketil Malde ketil+haskell at ii.uib.no
Wed Apr 27 01:45:28 EDT 2005


Donn Cave <donn at drizzle.com> writes:

>> Ideally, I think something like this should be the default behavior
>> for these functions. 

> But something like this should happen for any function, shouldn't
> it?

Any function where pattern match could fail, yes.  (Or should that be
any partial function?)  The burden is on the programmer to prove that
they won't fail, and some of these tend, IME, to be more troublesome
than others. 

> [I want to know] who called who all the way from "main" to "head",
> because the key function is going to be one somewhere in the middle.

Perhaps.  I am told stack backtraces are difficult with non-strict
semantics.  (Are you being ironic?)  File names and line numbers are a
compromise that happens to be easy to implement.

> Anything less general than this seems less than ideal to me.

I guess that's why we still have to suffer nearly information-free
error messages, when the 90% solution is fairly trivial.

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Haskell-Cafe mailing list