On Thu, Jul 28, 2011 at 14:43, Paul Reiners <paul.rein...@gmail.com> 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? > The underscore indicates an unevaluated thunk. In this case it's because numeric literals are translated into function calls (in this case (fromInteger 23); even though GHCi has already applied defaulting to the type, it still hasn't evaluated the *value* yet, and won't until it's needed due to laziness. If you do something like show x then the binding will be updated to show the actual value. -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe