On Wed, Aug 03, 2005 at 08:20:08AM +0100, Uriel wrote:
> 
> The most effective debugging tool is still careful thought, coupled with
> judiciously placed print statements.
> 
>     -- Brian W. Kernighan, in the paper Unix for Beginners (1979)

At http://www.haskell.org/hawiki/QuotesPage:

seen on news://comp.lang.functional

> By the way seriously: how do you debug Haskell programs?

Mostly seriously: I don't. If the programme doesn't work the
way I intended it, I rewrite bits in a simpler fashion until
I understand it well enough and it works. For the sort of
programme you were asking for, breaking things up until they
are small enough that one can understand the individual
parts completely (as I did in the solution I posted) and
then composing them together really is the best approach.

If you need to debug a programme that simple, what it's
telling you is that you've written it the wrong way!

--
Jón Fairbairn


-- 
For indoor or outdoor use only
                -- Warning on a Xmas lights set

Reply via email to