Fix exception backtraces from GHCi
When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 -------------------------
Showing
- ghc/GHCi/UI/Monad.hs 9 additions, 2 deletionsghc/GHCi/UI/Monad.hs
- libraries/ghci/GHCi/Message.hs 14 additions, 3 deletionslibraries/ghci/GHCi/Message.hs
- libraries/ghci/GHCi/Run.hs 2 additions, 2 deletionslibraries/ghci/GHCi/Run.hs
- testsuite/tests/ghc-e/should_run/ghc-e005.stderr 6 additions, 2 deletionstestsuite/tests/ghc-e/should_run/ghc-e005.stderr
- testsuite/tests/ghci.debugger/scripts/break009.stdout 7 additions, 0 deletionstestsuite/tests/ghci.debugger/scripts/break009.stdout
- testsuite/tests/ghci.debugger/scripts/break011.stdout 12 additions, 0 deletionstestsuite/tests/ghci.debugger/scripts/break011.stdout
- testsuite/tests/ghci.debugger/scripts/break017.stdout 4 additions, 0 deletionstestsuite/tests/ghci.debugger/scripts/break017.stdout
- testsuite/tests/ghci.debugger/scripts/break024.stdout 4 additions, 0 deletionstestsuite/tests/ghci.debugger/scripts/break024.stdout
- testsuite/tests/ghci/scripts/Defer02.stderr 55 additions, 1 deletiontestsuite/tests/ghci/scripts/Defer02.stderr
- testsuite/tests/ghci/scripts/T10501.stderr 11 additions, 0 deletionstestsuite/tests/ghci/scripts/T10501.stderr
- testsuite/tests/ghci/scripts/T15325.stderr 7 additions, 1 deletiontestsuite/tests/ghci/scripts/T15325.stderr
- testsuite/tests/ghci/scripts/T5557.stdout 8 additions, 0 deletionstestsuite/tests/ghci/scripts/T5557.stdout
- testsuite/tests/ghci/scripts/ghci055.stdout 4 additions, 0 deletionstestsuite/tests/ghci/scripts/ghci055.stdout
- testsuite/tests/interface-stability/base-exports.stdout 2 additions, 0 deletionstestsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/patsyn/should_run/ghci.stderr 6 additions, 0 deletionstestsuite/tests/patsyn/should_run/ghci.stderr
Loading
Please register or sign in to comment