Is there a way to find out the type of a variable inside a function?

I'm learning Haskell, and I've been reading through various source code examples. I find the ":type" commend in GHCi very helpful in finding out what the type of top-level declarations are. However, it only works on top-level declarations (as far as I know). I find myself looking at code like f x = ... where g = ... wondering what f does, and so I try to figure out what the type of g is... and I get lost pretty quickly! :-) Is there a way to find out the type of g? Thanks! Andrew

Visual Haskell can do that. And you are right, in my experience it can
be very useful when 'reading' code.
http://haskell.org/visualhaskell/
On 17/08/06, Andrew Wilcox
I'm learning Haskell, and I've been reading through various source code examples.
I find the ":type" commend in GHCi very helpful in finding out what the type of top-level declarations are.
However, it only works on top-level declarations (as far as I know).
I find myself looking at code like
f x = ... where g = ...
wondering what f does, and so I try to figure out what the type of g is... and I get lost pretty quickly! :-)
Is there a way to find out the type of g?
Thanks!
Andrew _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

On 8/17/06, pepe
Visual Haskell can do that. And you are right, in my experience it can be very useful when 'reading' code.
Look cool! Sadly, I'm running Linux, not Windows. Andrew
participants (2)
-
Andrew Wilcox
-
pepe