Any way to print out a type of a variable in a do / while / let block?

Viewed 8648

Is there any way to print out the inferred type of a nested variable in ghci? Consider the code,

let f = g where
    g (x :: Int) = x

then, it'd be nice to query the type of g, e.g. :t f.g would print out Int -> Int.

2 Answers
Related