#2976: :show bindings give wrong results when a variable was redefined
-----------------------------+----------------------------------------------
Reporter:  phercek           |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  GHCi            
 Version:  6.10.1            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 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.
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2976>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to