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 su

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

2009-07-18 Thread Fernan Bolando
On Sat, Jul 18, 2009 at 4:57 PM, Jon Fairbairn wrote: > Henning Thielemann 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 s

[Haskell-cafe] Re: Debugging methods for haskell

2009-07-18 Thread Jon Fairbairn
Henning Thielemann 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 all. (!!) is also

[Haskell-cafe] Re: Debugging methods for haskell

2009-07-16 Thread Jon Fairbairn
Fernan Bolando writes: > On Thu, Jul 16, 2009 at 4:10 PM, Jon > Fairbairn 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

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

2009-07-16 Thread Fernan Bolando
On Thu, Jul 16, 2009 at 4:10 PM, Jon Fairbairn 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 appropriate. Mostly you d

[Haskell-cafe] Re: Debugging methods for haskell

2009-07-16 Thread Jon Fairbairn
Fernan Bolando 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 helped me, but >