Hannes Siebenhandl pushed to branch wip/fendor/backtraces-decoders at Glasgow Haskell Compiler / GHC Commits: 246b7853 by Matthew Pickering at 2025-08-07T06:58:30-04:00 level imports: Check the level of exported identifiers The level imports specification states that exported identifiers have to be at level 0. This patch adds the requird level checks that all explicitly mentioned identifiers occur at level 0. For implicit export specifications (T(..) and module B), only level 0 identifiers are selected for re-export. ghc-proposal: https://github.com/ghc-proposals/ghc-proposals/pull/705 Fixes #26090 - - - - - 358bc4fc by fendor at 2025-08-07T06:59:12-04:00 Bump GHC on darwin CI to 9.10.1 - - - - - 506bfdbb by fendor at 2025-08-07T15:10:25+02: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`). - - - - - 303af8e9 by fendor at 2025-08-07T15:44:32+02: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. - - - - - 3e446ba3 by fendor at 2025-08-07T15:44:32+02: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. - - - - - 50 changed files: - .gitlab/darwin/toolchain.nix - compiler/GHC/Tc/Gen/Export.hs - compiler/GHC/Types/Name/Reader.hs - + 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/splice-imports/DodgyLevelExport.hs - + testsuite/tests/splice-imports/DodgyLevelExport.stderr - + testsuite/tests/splice-imports/DodgyLevelExportA.hs - + testsuite/tests/splice-imports/LevelImportExports.hs - + testsuite/tests/splice-imports/LevelImportExports.stdout - + testsuite/tests/splice-imports/LevelImportExportsA.hs - testsuite/tests/splice-imports/Makefile - + testsuite/tests/splice-imports/ModuleExport.hs - + testsuite/tests/splice-imports/ModuleExport.stderr - + testsuite/tests/splice-imports/ModuleExportA.hs - + testsuite/tests/splice-imports/ModuleExportB.hs - + testsuite/tests/splice-imports/T26090.hs - + testsuite/tests/splice-imports/T26090.stderr - + testsuite/tests/splice-imports/T26090A.hs - testsuite/tests/splice-imports/all.T - 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/348b6114e17413cffba5be424acf248... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/348b6114e17413cffba5be424acf248... You're receiving this email because of your account on gitlab.haskell.org.