Alan Zimmerman pushed to branch wip/az/exactprint-annotation-rationalisation at Glasgow Haskell Compiler / GHC Commits: 2f6a5534 by Simon Jakobi at 2026-06-23T15:46:20+02:00 Add -dstable-core-dump-order for stable Core dump ordering (#27296) The order of top-level bindings in Core dumps (-ddump-simpl etc.) is the compiler's Unique-sensitive internal processing order, so an unrelated upstream change can reorder them and defeat a textual diff of two dumps. This adds an opt-in flag -dstable-core-dump-order that reorders the top-level bindings of dumps routed through dumpPassResult into a stable, Unique-independent order, so two dumps line up across rebuilds. See Note [Stable Core dump order] in GHC.Core.Ppr for the sort key and its rationale. Adds tests T27296 (binders GHC emits in non-source order by default, asserted to come out stably ordered under the flag) and T27296b (an untidied -ddump-float-out dump pinning the ordering of the anonymous lvl floats by literal value). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> - - - - - 141986e3 by mangoiv at 2026-06-24T15:51:14-04:00 compiler: refactor error reporting code for ExplicitLevelImports Refactors error reporting code for ExplicitLevelImports to pass in a RdrName and a GlobalReaderElt to be able to report errors that are faithful to the source and to more precisely distinguish between names that are in scope from different qualifications. Fixes #27385 and #26616 - - - - - aa7df6b6 by Simon Hengel at 2026-06-24T15:52:18-04:00 Set GHC_VERSION when calling custom pre-processors (see #25952) (so that pre-processors can emit backwards compatible code) - - - - - a9e494f2 by Simon Hengel at 2026-06-24T15:54:08-04:00 Add a flag to control GHCi specific error hints (close #27409) - - - - - a805b2a2 by Simon Hengel at 2026-06-24T15:55:20-04:00 Reference correct package in error messages for reexported modules (fixes #27417) - - - - - f235d183 by Simon Jakobi at 2026-06-25T05:51:18-04:00 Add explicit setBit/clearBit/complementBit for instance Bits Integer (#21176) The default setBit, clearBit, and complementBit methods allocate intermediate Integers per call. Define them explicitly via the new integerSetBit[#], integerClearBit[#] and integerComplementBit[#], built on the BigNat# primitives, which avoid those allocations. Allocation is not eliminated entirely -- the negative (IN) cases would need in-place mutation, which is left as future work. The default methods constant-folded on literal arguments via the integerOr/integerAnd/integerXor rules, which fold literal Integers of any size. The explicit functions have no such rule, so they (their Word-argument wrappers, and the Bits Integer methods) are marked INLINE to expose the underlying primops to the simplifier; see Note [INLINE for constant folding of bit operations]. This restores folding only on the small-int (IS) path -- large literal Integers (IP/IN) are no longer constant-folded, a minor regression for that case. T8832 covers the IS-path folding. The new golden-output test T21176 checks all three operations against the default implementations across the sign/size boundaries, recording each result plus its integerCheck validity. The base and ghc-bignum interface- stability export goldens gain the new functions. The main changelog entry lives in changelog.d under a new ghc-internal section (renamed from ghc-prim). CLC proposal: https://github.com/haskell/core-libraries-committee/issues/423 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> - - - - - 202ed264 by Marc Scholten at 2026-06-25T05:52:21-04:00 haddock: use Text in documentation pipeline This patch moves Haddock's documentation pipeline from String to Text where the data is already textual. It avoids repeated conversions while keeping the existing decoding behavior for invalid UTF-8 docstring chunks. The main changes are: * Render and carry docstrings as Text in Haddock-facing paths. * Use the Binary Text instance from GHC.Utils.Binary for Haddock interface files, and bump the Haddock binary interface version. * Add a FastString HTML instance so XHTML rendering avoids intermediate String allocation. * Keep HsDocStringChunk decoding lenient, matching the previous unpackHDSC behavior on invalid UTF-8 input. * Update the xhtml submodule to 3000.4.1.0, which contains the apostrophe escaping fix used by the Haddock test output. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Assisted-by: Codex <codex@openai.com> - - - - - a72ff58f by mangoiv at 2026-06-25T05:53:07-04:00 compiler: rename ZonkAny to UnusedType and add pretty printing logic ZonkAny is a hard to understand name for users who do not know how the compiler works internally. Additionally, it is confusing that ZonkAny, while being a concrete type *represents* a meta variable, espeically in the compiler output. This patch changes the name of ZonkAny to UnusedType which is closer to its intended semantics and adds special pretty printing logic to display this type in the same fashion the compiler displays meta variables in other places, whenever they leak from the implementation to the user. It also exports the type from ghc-internal:GHC.Internal.Types in order to expose documentation. Fixes #27390 Co-Authored-By: Sam Derbyshire <sam.derbyshire@gmail.com> - - - - - d41db1d0 by Alan Zimmerman at 2026-06-25T18:53:32+01:00 EPA: Remove LocatedC / SrcSpanAnnC Used for contexts - - - - - 459ff64a by Alan Zimmerman at 2026-06-25T18:53:32+01:00 EPA: Harmonise HsQual/HsQualTy TTG extension annotations - - - - - 431198a5 by Alan Zimmerman at 2026-06-25T18:53:32+01:00 EPA Remove LocatedLC / LocatedLS LocatedLC/LocatedLS were unused - - - - - caa4b77c by Alan Zimmerman at 2026-06-25T18:53:32+01:00 EPA: Remove LocatedLW from LStmtLR - - - - - 3cfc4190 by Alan Zimmerman at 2026-06-25T18:53:32+01:00 EPA: Remove LocatedLW from MatchGroup This is the last usage of LocatedLW / SrcSpanAnnLW - - - - - ee575967 by Alan Zimmerman at 2026-06-25T18:53:32+01:00 EPA: Move the 'where' annotation for PatSynBind This allows us to move it out of the MatchGroup exact print annotation too - - - - - 5787a851 by Alan Zimmerman at 2026-06-25T18:53:32+01:00 EPA: Replace AnnListItem with simply [TrailingAnn] Remove the unnecessary wrapper around a single field. - - - - - 6054a8b2 by Alan Zimmerman at 2026-06-25T18:53:32+01:00 EPA: delete AnnContext. Squash this into the right place - - - - - b7be2945 by Alan Zimmerman at 2026-06-25T18:53:32+01:00 Keep binds and sigs together in HsValBindsLR TBD - - - - - 6427943c by Alan Zimmerman at 2026-06-25T23:32:45+01:00 Keep decls together in ClassDecl Keep binds and sigs together in HsValBindsLR TBD - - - - - e0133cb3 by Alan Zimmerman at 2026-06-25T23:32:45+01:00 WTF? hadrian/cfg/system.config.{host|target} - - - - - 245 changed files: - + changelog.d/26616 - + changelog.d/T21176 - changelog.d/config - + changelog.d/interactive-error-hints - + changelog.d/pp-set-ghc-version - + changelog.d/reexported-module-errors - + changelog.d/stable-core-dump-order-27296 - + changelog.d/unused-type - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Ppr.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/DocString.hs - compiler/GHC/Hs/Dump.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Stats.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Docs.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/HsToCore/Ticks.hs - compiler/GHC/Iface/Errors.hs - compiler/GHC/Iface/Errors/Ppr.hs - compiler/GHC/Iface/Errors/Types.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Type.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Parser/Types.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/Env.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Rename/Splice.hs - compiler/GHC/Rename/Splice.hs-boot - compiler/GHC/Rename/Unbound.hs - compiler/GHC/Rename/Utils.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/SysTools/Tasks.hs - compiler/GHC/Tc/Deriv.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Arrow.hs - compiler/GHC/Tc/Gen/Do.hs - compiler/GHC/Tc/Gen/Export.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Match.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/TyCl/PatSyn.hs - compiler/GHC/Tc/Types.hs - compiler/GHC/Tc/Utils/Env.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Tc/Utils/TcType.hs - compiler/GHC/Tc/Zonk/Type.hs - compiler/GHC/ThToHs.hs - compiler/GHC/Types/Hint/Ppr.hs - compiler/GHC/Types/Name/Reader.hs - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Finder/Types.hs - compiler/GHC/Unit/State.hs - compiler/GHC/Utils/Outputable.hs - compiler/Language/Haskell/Syntax/Binds.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Expr.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/debugging.rst - docs/users_guide/ghci.rst - docs/users_guide/phases.rst - ghc/GHCi/UI.hs - ghc/GHCi/UI/Exception.hs - ghc/Main.hs - + hadrian/cfg/system.config.host - + hadrian/cfg/system.config.target - libraries/base/changelog.md - libraries/base/src/GHC/Base.hs - libraries/base/src/GHC/Exts.hs - libraries/ghc-bignum/changelog.md - libraries/ghc-experimental/src/GHC/PrimOps.hs - libraries/ghc-internal/src/GHC/Internal/Bignum/Integer.hs - libraries/ghc-internal/src/GHC/Internal/Bits.hs - libraries/ghc-internal/src/GHC/Internal/Types.hs - libraries/xhtml - testsuite/tests/annotations/should_fail/annfail03.stderr - testsuite/tests/annotations/should_fail/annfail04.stderr - testsuite/tests/annotations/should_fail/annfail06.stderr - testsuite/tests/annotations/should_fail/annfail09.stderr - testsuite/tests/ghc-api/T25121_status.stdout - testsuite/tests/ghc-api/exactprint/T22919.stderr - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr - testsuite/tests/ghci/prog-mhu002/prog-mhu002c.stdout - testsuite/tests/ghci/scripts/ghci024.stdout - testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - testsuite/tests/interface-stability/ghc-bignum-exports.stdout - testsuite/tests/interface-stability/ghc-prim-exports.stdout - testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32 - testsuite/tests/module/mod185.stderr - + testsuite/tests/numeric/should_run/T21176.hs - + testsuite/tests/numeric/should_run/T21176.stdout - + testsuite/tests/numeric/should_run/T21176.stdout-ws-32 - testsuite/tests/numeric/should_run/all.T - + testsuite/tests/package/ImportReexport.hs - + testsuite/tests/package/ImportReexport.stderr - testsuite/tests/package/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T15279.stderr - testsuite/tests/parser/should_compile/T15323.stderr - testsuite/tests/parser/should_compile/T20452.stderr - testsuite/tests/parser/should_compile/T20718.stderr - testsuite/tests/parser/should_compile/T20718b.stderr - testsuite/tests/parser/should_compile/T20846.stderr - testsuite/tests/parser/should_compile/T23315/T23315.stderr - testsuite/tests/parser/should_compile/all.T - testsuite/tests/perf/compiler/T11068.stdout - testsuite/tests/pmcheck/should_compile/T12957.stderr - testsuite/tests/printer/AnnotationNoListTuplePuns.stdout - testsuite/tests/printer/T18791.stderr - testsuite/tests/printer/Test20297.stdout - testsuite/tests/printer/Test24533.stdout - testsuite/tests/profiling/should_run/staticcallstack002.stdout - testsuite/tests/quasiquotation/qq001/qq001.stderr - testsuite/tests/quasiquotation/qq002/qq002.stderr - testsuite/tests/quasiquotation/qq003/qq003.stderr - testsuite/tests/quasiquotation/qq004/qq004.stderr - testsuite/tests/quotes/LiftErrMsg.stderr - testsuite/tests/quotes/LiftErrMsgDefer.stderr - testsuite/tests/quotes/LiftErrMsgTyped.stderr - testsuite/tests/quotes/T10384.stderr - testsuite/tests/quotes/T5721.stderr - testsuite/tests/quotes/TH_localname.stderr - testsuite/tests/simplCore/should_compile/Makefile - testsuite/tests/simplCore/should_compile/T13156.stdout - testsuite/tests/simplCore/should_compile/T26615.stderr - + testsuite/tests/simplCore/should_compile/T27296.hs - + testsuite/tests/simplCore/should_compile/T27296.stdout - + testsuite/tests/simplCore/should_compile/T27296b.hs - + testsuite/tests/simplCore/should_compile/T27296b.stdout - testsuite/tests/simplCore/should_compile/T8832.hs - testsuite/tests/simplCore/should_compile/T8832.stdout - testsuite/tests/simplCore/should_compile/all.T - testsuite/tests/splice-imports/SI03.stderr - testsuite/tests/splice-imports/SI05.stderr - testsuite/tests/splice-imports/SI08.stderr - testsuite/tests/splice-imports/SI08_oneshot.stderr - testsuite/tests/splice-imports/SI16.stderr - testsuite/tests/splice-imports/SI18.stderr - testsuite/tests/splice-imports/SI20.stderr - testsuite/tests/splice-imports/SI25.stderr - testsuite/tests/splice-imports/SI28.stderr - testsuite/tests/splice-imports/SI29.stderr - testsuite/tests/splice-imports/SI31.stderr - testsuite/tests/splice-imports/SI36.stderr - testsuite/tests/splice-imports/T26088.stderr - testsuite/tests/splice-imports/T26090.stderr - + testsuite/tests/splice-imports/T26616.hs - + testsuite/tests/splice-imports/T26616.stderr - testsuite/tests/splice-imports/all.T - testsuite/tests/th/T16976z.stderr - testsuite/tests/th/T17820a.stderr - testsuite/tests/th/T17820b.stderr - testsuite/tests/th/T17820c.stderr - testsuite/tests/th/T17820d.stderr - testsuite/tests/th/T17820e.stderr - testsuite/tests/th/T21547.stderr - testsuite/tests/th/T23829_hasty.stderr - testsuite/tests/th/T23829_hasty_b.stderr - testsuite/tests/th/T23829_tardy.ghc.stderr - testsuite/tests/th/T26098_local.stderr - testsuite/tests/th/T26098_quote.stderr - testsuite/tests/th/T26098_splice.stderr - testsuite/tests/th/T26099.stderr - testsuite/tests/th/T26568.stderr - testsuite/tests/th/T5795.stderr - testsuite/tests/typecheck/should_compile/T15242.stderr - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_fail/T13292.stderr - + testsuite/tests/typecheck/should_fail/T27390-explicit-kinds.stderr - + testsuite/tests/typecheck/should_fail/T27390.hs - + testsuite/tests/typecheck/should_fail/T27390.stderr - + testsuite/tests/typecheck/should_fail/T27390a.hs - testsuite/tests/typecheck/should_fail/all.T - utils/check-exact/ExactPrint.hs - utils/check-exact/Main.hs - utils/check-exact/Transform.hs - utils/check-exact/Utils.hs - utils/haddock/haddock-api/src/Haddock.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Meta.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Names.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/Doc.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/AttachInstances.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs - utils/haddock/haddock-api/src/Haddock/Interface/Json.hs - utils/haddock/haddock-api/src/Haddock/Interface/LexParseRn.hs - utils/haddock/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Interface/RenameType.hs - utils/haddock/haddock-api/src/Haddock/InterfaceFile.hs - utils/haddock/haddock-api/src/Haddock/Options.hs - utils/haddock/haddock-api/src/Haddock/Parser.hs - utils/haddock/haddock-api/src/Haddock/Types.hs - utils/haddock/haddock-api/src/Haddock/Utils/Json.hs - utils/haddock/haddock-api/src/Haddock/Utils/Json/Parser.hs - utils/haddock/haddock-api/src/Haddock/Utils/Json/Types.hs - utils/haddock/haddock-library/src/Documentation/Haddock/Doc.hs - utils/haddock/haddock-library/src/Documentation/Haddock/Markup.hs - utils/haddock/haddock-library/src/Documentation/Haddock/Parser.hs - utils/haddock/haddock-library/src/Documentation/Haddock/Parser/Util.hs - utils/haddock/haddock-library/src/Documentation/Haddock/Types.hs - utils/haddock/haddock-library/test/Documentation/Haddock/ParserSpec.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/df26f3cd2476f34f7fc54393ebc7740... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/df26f3cd2476f34f7fc54393ebc7740... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Alan Zimmerman (@alanz)