Fix #8487: Debugger confuses variables
To display the free variables for a single breakpoint, GHCi pulls out the information from the fields `modBreaks_breakInfo` and `modBreaks_vars` of the `ModBreaks` data structure. For a specific breakpoint this gives 2 lists of types 'Id` (`Var`) and `OccName`. They are used to create the Id's for the free variables and must be kept in sync: If we remove an element from the Names list, then we also must remove the corresponding element from the OccNames list.
Showing
- compiler/ghci/ByteCodeGen.hs 2 additions, 2 deletionscompiler/ghci/ByteCodeGen.hs
- compiler/ghci/ByteCodeTypes.hs 4 additions, 2 deletionscompiler/ghci/ByteCodeTypes.hs
- compiler/main/InteractiveEval.hs 54 additions, 9 deletionscompiler/main/InteractiveEval.hs
- testsuite/tests/ghci.debugger/scripts/T8487.hs 11 additions, 0 deletionstestsuite/tests/ghci.debugger/scripts/T8487.hs
- testsuite/tests/ghci.debugger/scripts/T8487.script 3 additions, 0 deletionstestsuite/tests/ghci.debugger/scripts/T8487.script
- testsuite/tests/ghci.debugger/scripts/T8487.stdout 4 additions, 0 deletionstestsuite/tests/ghci.debugger/scripts/T8487.stdout
- testsuite/tests/ghci.debugger/scripts/all.T 1 addition, 0 deletionstestsuite/tests/ghci.debugger/scripts/all.T
Loading
Please register or sign in to comment