
tphyahoo:
I am a newbie learning haskell. (First forum post.)
I am wondering if there is a trick to get debugging information about functions out of the environment (which for me, for now, is ghci).
In this example,
*UnixTools> :t map (*) [1,2] map (*) [1,2] :: (Num a) => [a -> a]
This is very nice, but I would *really* like to see something like
*UnixTools> explodeLambda( map (*) [1,2] ) [(\x -> 1*x),(\x -> 2*x)]
Yes, maybe I'm dreaming, but I would like haskell to reverse engineer / pretty print lambda expressions for me.
You can use 'hat' to trace/reduce expressions. http://www.cs.york.ac.uk/fp/hat/ The new ghci debugger can print closures too, but I'm not sure if it does what you want. All very possible, maybe a little experimental though. -- Don