[Haskell-cafe] How to catch error in array index when debugging

Bulat Ziganshin bulat.ziganshin at gmail.com
Sat Mar 14 05:57:30 EDT 2009


Hello Colin,

Saturday, March 14, 2009, 11:39:41 AM, you wrote:

> I'm getting a runtime failure "Error in array index". This causes ghci
> to exit.

> Is there a way to get it to break instead, so I can find out which
> function is failing?

i recall two techniques - one is trivially define your own (!) and
print index at least. another is to use ghc profiling with -xc RTS
option


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list