Changes between Version 56 and Version 57 of NewGhciDebugger


Ignore:
Timestamp:
Apr 9, 2007 3:46:59 PM (8 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewGhciDebugger

    v56 v57  
    230230Now the foo thread is blocked, so we can't witness the breakpoint.
    231231
     232=== Wrong variable names in patterns ===
     233
     234Consider this program:
     235{{{
     236   foo (Just _  : xs) = [xs]
     237   foo (Nothing : ys) = [ys]  {- set a breakpoint on this line -}
     238
     239   main = print (foo [Nothing, Just ()])
     240}}}
     241
     242If we hit a breakpoint in the second equation for `foo` we expect to see `ys` displayed as the local variables. Unfortunately, the debugger says that the locals are called `xs`:
     243{{{
     244   *Main> :break 2
     245   Breakpoint activated in Main. Location: (2,22)-(2,25).
     246   *Main> main
     247   Stopped at breakpoint in Main. Location: (2,22)-(2,25).
     248   Locals: xs :: [Maybe ()]
     249}}}
     250The problem is the way that the compiler turns pattern matches into case expressions. XXX This issue deserves some extra thought.
    232251
    233252----