incorrect implementation of :show bindings?

Peter Hercek phercek at gmail.com
Thu Jan 22 05:57:47 EST 2009


Hi,

Bindings displayed with ":show bindings" do not correspond to what can 
be observed by printing values explicitly for example using ":force". Is 
it supposed to work like that? If yes, why?

Notice the value and type reported for variable "test" after it has been 
redefined in the example at this post end.

Thanks,
Peter.

status:0 peter at dwarf [703] /tmp
% ghci
GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> let test = 0
Prelude> :show bindings
test :: Integer = _
Prelude> :force test
test = 0
Prelude> let test = "zero"
Prelude> :show bindings
test :: Integer = 0
Prelude> :force test
test = ['z','e','r','o']
Prelude> :quit
Leaving GHCi.
status:0 peter at dwarf [704] /tmp
%



More information about the Glasgow-haskell-users mailing list