Proposal: Improved error message of "Error in array index"

Simon Marlow simonmar at
Wed Nov 9 05:13:57 EST 2005

On 08 November 2005 23:53, John Meacham wrote:

> On Tue, Nov 08, 2005 at 11:12:09AM -0000, Simon Marlow wrote:
>> One idea that occurred to us recently is this: GHCi could provide a
>> simplified version of the cost-centre-stack machinery *all the time*,
>> giving you a proper backtrace for any exception, at least for the
>> parts of the call stack that are interpreted.  We don't care about
>> the cost too much - interpreted code is a lot slower than compiled
>> already, and it would only be a small constant factor.  I think this
>> would be a huge win for debuggability.  And a nice project for
>> anyone who wants to hack on the GHC internals - though not a small
>> task by any means. 
> personally, I rarely find the stack dump very useful at all (though I
> always have high hopes). perhaps I have just had bad experiences with
> it, but it can often be uninformative or even misleading.

It wouldn't be a dump of the evaluation stack, rather a dump of the
lexical call stack - the stack that you see when you do +RTS -xc, or
time profiling in GHC.  It's much more useful than the evaluation stack,
which is usually not terribly informative I agree (though I've heard
others say they'd still like to be able to get hold of that too).


More information about the Glasgow-haskell-users mailing list