[Haskell-cafe] Debugging methods for haskell

Fernan Bolando fernanbolando at mailc.net
Wed Jul 15 18:07:40 EDT 2009


Hi all

I recently used 2 hours of work looking for a bug that was causing

Program error: Prelude.!!: index too large

This is not very informative. It did not give me a hint which function
was causing this. In C adding a few printf would have helped me, but
in haskell I was not sure how to do that. Can anybody point me to some
debuggin method everyone uses.

After 2 hours I did find the bug eventually. The code can be viewed here.
Maybe some reformatting of the code would make finding bugs easier?
http://plan9.bell-labs.com/sources/contrib/fernan/escomma/

fernan
-- 
http://www.fernski.com


More information about the Haskell-Cafe mailing list