[Haskell-cafe] how do you debug programs?

Tamas K Papp tpapp at Princeton.EDU
Wed Sep 6 05:04:42 EDT 2006


Hi,

I would like to learn a reasonable way (ie how others do it) to debug
programs in Haskell.  Is it possible to "see" what's going on when a
function is evaluated?  Eg in

f a b = let c = a+b
      	    d = a*b
	in c+d

evaluating 

f 1 2

would output something like

f called with values 1 2
c is now (+) a b => (+) 1 2 => 3
d is now (*) a b => (*) 1 2 => 2
...

Or maybe I am thinking the wrong way, and functional programming has
its own debugging style...

Thanks,

Tamas


More information about the Haskell-Cafe mailing list