:show bindings give wrong results when a variable was redefined
Bindings displayed with :show bindings do not correspond to what can be observed by printing values explicitly for example by using :force. The differences happen when a variable is redefined.[[BR]] I saw the bug in 6.10.1, and 6.8.2. Pepe Iborra could reproduce it in 6.8.1 and noticed that it works well in 6.6.
Notice the value and type reported for variable test after it has been redefined in this example.
% 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.