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

Olaf Chitil O.Chitil at kent.ac.uk
Wed Nov 9 06:59:38 EST 2005


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.
>  
>
The cost-centre machinery is very close to the machinery necessary to 
generate the trace of the Haskell tracer Hat. If you implement one, with 
small modifications you get the other. The overhead for both is 
basically the same, except that the larger Hat trace needs to be written 
to file.

Ciao,
Olaf


More information about the Glasgow-haskell-users mailing list