#1531: _result can get bound to the wrong value in a breakpoint
---------------------------------+------------------------------------------
    Reporter:  mnislaih          |        Owner:                  
        Type:  bug               |       Status:  new             
    Priority:  low               |    Milestone:  _|_             
   Component:  GHCi              |      Version:  6.7             
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:  result001         |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by phercek):

 * cc: [email protected] (added)

Comment:

 I think I hit the same problem (ghci 6.10.1).
 {{{
 Ok, modules loaded: Main.
 *Main> :! cat b.hs
 fn :: Int -> Int
 fn x =
   if x > 10
     then 10
     else x
 *Main> :break 3
 Breakpoint 0 activated at b.hs:3:5-10
 *Main> fn 5
 Stopped at b.hs:3:5-10
 _result :: Int = _
 x :: Int = 5
 2  fn x =
 3    if x > 10
 4      then 10
 [b.hs:3:5-10] *Main> :force _result
 *** Ignoring breakpoint
 _result = 5
 [b.hs:3:5-10] *Main>
 }}}
 _result should have been False and not 5.[[BR]]
 _result does not correspond to the selected expression ('''x > 10''').

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1531#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to