[Haskell-cafe] Re: Debugging methods for haskell

2009-07-18 Thread Jon Fairbairn
Henning Thielemann lemm...@henning-thielemann.de writes: On Thu, 16 Jul 2009, Fernan Bolando wrote: Hi all I recently used 2 hours of work looking for a bug that was causing Program error: Prelude.!!: index too large A good way to avoid such problems is to avoid partial functions at

Re: [Haskell-cafe] Re: Debugging methods for haskell

2009-07-18 Thread Fernan Bolando
On Sat, Jul 18, 2009 at 4:57 PM, Jon Fairbairnjon.fairba...@cl.cam.ac.uk wrote: Henning Thielemann lemm...@henning-thielemann.de writes: On Thu, 16 Jul 2009, Fernan Bolando wrote: Hi all I recently used 2 hours of work looking for a bug that was causing Program error: Prelude.!!: index

Re: [Haskell-cafe] Re: Debugging methods for haskell

2009-07-18 Thread wren ng thornton
Fernan Bolando wrote: The intention is z0 is a system parameter and database, it contains a set of info needed to define a particular simulation it looks like ( [n,m...], [m,o,p]) n is is a list info settings for the circuit analysis m is a list of statistics for the circuits that is need in

[Haskell-cafe] Re: Debugging methods for haskell

2009-07-16 Thread Jon Fairbairn
Fernan Bolando fernanbola...@mailc.net writes: 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

Re: [Haskell-cafe] Re: Debugging methods for haskell

2009-07-16 Thread Fernan Bolando
On Thu, Jul 16, 2009 at 4:10 PM, Jon Fairbairnjon.fairba...@cl.cam.ac.uk wrote: I wonder if your code has to use !! at all? I took a look at a random module from the above link, and (without making much attempt at understanding it), I'd guess that using accumArray and friends would be more

[Haskell-cafe] Re: Debugging methods for haskell

2009-07-16 Thread Jon Fairbairn
Fernan Bolando fernanbola...@mailc.net writes: On Thu, Jul 16, 2009 at 4:10 PM, Jon Fairbairnjon.fairba...@cl.cam.ac.uk wrote: I wonder if your code has to use !! at all? I took a look at a random module from the above link, and (without making much attempt at understanding it), I'd guess