[Haskell-cafe] how do you debug programs?

Pepe Iborra mnislaih at gmail.com
Wed Sep 6 07:24:57 EDT 2006


Thanks for the suggestion Don,

I started the wiki page at http://haskell.org/haskellwiki/Debugging

On 06/09/06, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
> mnislaih:
> > Hi Tamas
> >
> > There are several ways to debug a Haskell program.
> >
> > The most advanced ones are based in offline analysis of traces, I
> > think Hat [1] is the most up-to-date tool for this. There is a Windows
> > port of Hat at [5].
> >
> > Another approach is to simply use Debug.Trace. A more powerful
> > alternative for this approach is Hood [2]. Even if it hasn't been
> > updated in some time, Hood works perfectly with the current ghc
> > distribution. Even more, Hugs has it already integrated [3]. You can
> > simply import Observe and use observations directly in your program.
> > For instance:
> >
> > import Observe
> >
> > f' = observe "f" f
> > f a b = ....
> >
> > And then in hugs the expression:
> > >f' 1 2
> >
> > would output what you want.
> >
> > Finally, the GHCi debugger project [4] aims to bring dynamic
> > breakpoints and intermediate values observation to GHCi in a near
> > future. Right now the tool is only available from the site as a
> > modified version of GHC, so unfortunately you will have to compile it
> > yourself if you want to try it.
>
> Pepe, would you like to put up a page on the haskell.org wiki about
> debugging in Haskell? You could use the above mail as a start :)
>
> -- Don
>
>
>
>


More information about the Haskell-Cafe mailing list