[Git][ghc/ghc][master] 3 commits: Store `StackTrace` and `StackSnapshot` in `Backtraces`
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: c91e2650 by fendor at 2025-08-13T21:03:43-04:00 Store `StackTrace` and `StackSnapshot` in `Backtraces` Instead of decoding the stack traces when collecting the `Backtraces`, defer this decoding until actually showing the `Backtraces`. This allows users to customise how `Backtraces` are displayed by using a custom implementation of `displayExceptionWithInfo`, overwriting the default implementation for `Backtraces` (`displayBacktraces`). - - - - - dee28cdd by fendor at 2025-08-13T21:03:43-04:00 Allow users to customise the collection of exception annotations Add a global `CollectExceptionAnnotationMechanism` which determines how `ExceptionAnnotation`s are collected upon throwing an `Exception`. This API is exposed via `ghc-experimental`. By overriding how we collect `Backtraces`, we can control how the `Backtraces` are displayed to the user by newtyping `Backtraces` and giving a different instance for `ExceptionAnnotation`. A concrete use-case for this feature is allowing us to experiment with alternative stack decoders, without having to modify `base`, which take additional information from the stack frames. This commit does not modify how `Backtraces` are currently collected or displayed. - - - - - 66024722 by fendor at 2025-08-13T21:03:43-04:00 Expose Backtraces internals from ghc-experimental Additionally, expose the same API `base:Control.Exception.Backtrace` to make it easier to use as a drop-in replacement. - - - - - 32 changed files: - + libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs - libraries/ghc-internal/src/GHC/Internal/Exception.hs - libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs - libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs-boot - + libraries/ghc-internal/tests/Makefile - + libraries/ghc-internal/tests/all.T - + libraries/ghc-internal/tests/backtraces/Makefile - + libraries/ghc-internal/tests/backtraces/T14532a.hs - + libraries/ghc-internal/tests/backtraces/T14532a.stdout - + libraries/ghc-internal/tests/backtraces/T14532b.hs - + libraries/ghc-internal/tests/backtraces/T14532b.stdout - + libraries/ghc-internal/tests/backtraces/all.T - testsuite/tests/arrows/should_compile/T21301.stderr - testsuite/tests/deSugar/should_fail/DsStrictFail.stderr - testsuite/tests/deSugar/should_run/T20024.stderr - testsuite/tests/deSugar/should_run/dsrun005.stderr - testsuite/tests/deSugar/should_run/dsrun007.stderr - testsuite/tests/deSugar/should_run/dsrun008.stderr - testsuite/tests/deriving/should_run/T9576.stderr - testsuite/tests/ghci/scripts/Defer02.stderr - testsuite/tests/ghci/scripts/T15325.stderr - testsuite/tests/patsyn/should_run/ghci.stderr - testsuite/tests/quotes/LiftErrMsgDefer.stderr - testsuite/tests/safeHaskell/safeLanguage/SafeLang15.stderr - testsuite/tests/type-data/should_run/T22332a.stderr - testsuite/tests/typecheck/should_run/T10284.stderr - testsuite/tests/typecheck/should_run/T13838.stderr - testsuite/tests/typecheck/should_run/T9497a-run.stderr - testsuite/tests/typecheck/should_run/T9497b-run.stderr - testsuite/tests/typecheck/should_run/T9497c-run.stderr - testsuite/tests/unsatisfiable/T23816.stderr - testsuite/tests/unsatisfiable/UnsatDefer.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/50842f83f467ff54dd22470559a7af7... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/50842f83f467ff54dd22470559a7af7... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)