tracing Haskell programs

Mikael Brockman phubuh at
Mon Oct 20 16:29:00 EDT 2003

wvasconc at writes:

> Hi folk
> Is there a way to follow the "execution" of a Haskell program? What I mean here
> is a way to see which function definition is being used at any moment, and how
> the execution control moves around a script file.
> If this is a preposterous question, just tell me nicely and I will go away!
> Oh, and if this has been discussed before, please tell me where and I will chase
> it up.
> Thanks!

It is slightly preposterous; since Haskell programs are referentially
transparent, simply looking at the order in which the program is run
is confusing -- there are no side effects, so the compiler might
generate code whose order of execution is far from the expected.

Nevertheless, there are excellent debugging tools for Haskell:

  * Hat   <>
  * Hood  <>
  * GHood <>

Although they don't work like, say GDB, I find them more intuitive,
since they in the spirit of functional programming focus on /what/ a
function calculates instead of /how/.

There's a more exhaustive list at
<>. Knock yourself out!

Mikael Brockman
phubuh at

More information about the Haskell-Cafe mailing list