Re: [Haskell-cafe] some way to reverse engineer lambda expressions out of the debugger?
Bulat Ziganshin [EMAIL PROTECTED] wrote: tphyahoo wrote: *UnixTools explodeLambda( map (*) [1,2] ) [(\x - 1*x),(\x - 2*x)] Have a play with this, from Claus Reinke: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/R.hs Regards, Malcolm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] some way to reverse engineer lambda expressions out of the debugger?
Looks very nice! However, I'm doing my learning on ghci and got an error when I tried to load it. Is this hugs only, or should I try harder? 2007/1/11, Malcolm Wallace [EMAIL PROTECTED]: Bulat Ziganshin [EMAIL PROTECTED] wrote: tphyahoo wrote: *UnixTools explodeLambda( map (*) [1,2] ) [(\x - 1*x),(\x - 2*x)] Have a play with this, from Claus Reinke: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/R.hs Regards, Malcolm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] some way to reverse engineer lambda expressions out of the debugger?
Hello tphyahoo, Saturday, December 30, 2006, 11:53:53 AM, you wrote: *UnixTools explodeLambda( map (*) [1,2] ) [(\x - 1*x),(\x - 2*x)] i'm wondering whether it's possible to use typeclasses to implement this, like packages for symbolic computations (afair, it was demonstrated by Oleg) -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] some way to reverse engineer lambda expressions out of the debugger?
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. (Note that: *UnixTools map ($ 5 ) [(\x - 1*x),(\x - 2*x)] [5,10] *UnixTools map ($ 5) ( map (*) [1..2] ) [5,10] So these expressions really are the same, only it could be argued that the first expression is in some sense easier to read if you are debugging something complex. ) I would like to have something like Data::Dumper from perl, but of course, on steroids. Is something like this possible, or be worked on? Or probably never going to happen? Cheers, thomas. -- View this message in context: http://www.nabble.com/some-way-to-reverse-engineer-lambda-expressions-out-of-the-debugger--tf2897954.html#a8096545 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] some way to reverse engineer lambda expressions out of the debugger?
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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe