
On Thu, 28 Jul 2011, Paul Reiners wrote:
I have a question about the following GHCi interaction:
Prelude> let x = 23 Prelude> :show bindings x :: Integer = _
What is the meaning of the underscore in the third line? Why doesn't it say this, instead?
x :: Integer = 23
I have never used ':show bindings' before ... in other cases like let x='a' and let x=23::Int the value of 'x' is shown. If 'x' is bound to a function, the underscore is shown. Thus I assume, that ':show bindings' uses the underscore for types without text representation. But it seems not to use the 'Show' class, since in this case Integers could be shown. The documentation does not mention the output of values, at all: http://www.haskell.org/ghc/docs/7.0-latest/html/users_guide/ghci-commands.ht...