recursion-ninja pushed to branch wip/fix-26971 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> - - - - - 6813f002 by Simon Jakobi at 2026-06-26T04:51:47-04:00 Reg.Linear: drop Platform argument from most FR (FreeRegs) methods The FR class has one instance per CPU architecture, so any architecture-constant information its methods derived from the Platform argument can instead be baked into the instance. This removes the now needless Platform argument from frAllocateReg, frGetFreeRegs and frReleaseReg. frInitFreeRegs keeps its Platform argument: the initial allocatable set is genuinely platform-dependent, see Note [Aarch64 Register x18 at Darwin and Windows]. Fixes #26665 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> - - - - - 3b2a9409 by Zubin Duggal at 2026-06-26T04:52:39-04:00 testsuite: Report fragile failures as skipped in JUnit output - - - - - bc16fb06 by Recursion Ninja at 2026-06-26T13:31:53-04:00 Decoupling 'L.H.S' from 'GHC.Types.SourceText' * Migrated 'IntegralLit' to 'L.H.S.Lit'. * Migrated 'FractionalLit' to 'L.H.S.Lit'. * Migrated 'StringLiteral' to 'L.H.S.Lit'. * Added TTG extension points to the types above. * Added nice export list to 'GHC.Hs.Lit'. * Added 'rnOverLitVal' and 'tcOverLitVal' functions to 'GHC.Hs.Lit'. * Added instance 'Anno (StringLiteral (GhcPass p)) = SrcSpanAnnN' * Moved [Notes] about 'SourceText' from 'L.H.S.*' to 'GHC.*'. * Removed all references to 'SourceText' from 'L.H.S'. * Removed the trailing comma record field from 'StringLiteral' * Renamed exported functions for nomenclature consistency. * Deprecated the renamed functions Fixes #26953 - - - - - 00568ff7 by Recursion Ninja at 2026-06-26T13:59:20-04:00 Monomorphising GHC pass parameters where appropriate - - - - - 71ad4e36 by Recursion Ninja at 2026-06-26T14:35:43-04:00 Decoupling 'L.H.S' from 'GHC.Hs.Doc' * Migrated 'GHC.Hs.Doc' and 'GHC.Hs.DocString' AST defintions from 'GHC.*' namespace, to new 'Language.Haskell.Syntax.Doc' module in the 'L.H.S' "namespace." * Updated 'HsDocString to be TTG-parameterised as 'HsDocString pass'. * Added 'GHC.Hs.Extension.Pass': splits 'GhcPass'/'Pass' and all 'HsDocString' TTG instances out of 'GHC.Hs.Extension', which re-exports it unchanged (this is backwards compatible and prevents the introduction of a boot file). * Deleted 'GHC.Hs.Doc.hs-boot'; removed all 'L.H.S.*' imports of 'GHC.Hs.Doc'. * Updated 'GHC.Hs.DocString' to be TTG pass-parameterised throughout; moved 'mkHsDocStringChunk'/'unpackHDSC' here (require 'GHC.Utils.Encoding'). * Split 'GHC.Rename.Doc.rnHsDoc' from 'rnHsDocIdentifiersOnly'. * Updated parser, renamer, typechecker, HIE, and exact-print for new types. * Added 'HsDocString' TTG instances for 'DocNameI' to 'Haddock.Types'. Resolves #26971 - - - - - 241 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/Builtin/Utils.hs - compiler/GHC/CmmToAsm/Reg/Linear.hs - compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs - compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs - compiler/GHC/CmmToAsm/Reg/Linear/X86.hs - compiler/GHC/CmmToAsm/Reg/Linear/X86_64.hs - compiler/GHC/CmmToAsm/X86/RegInfo.hs - compiler/GHC/CmmToAsm/X86/Regs.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.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Doc.hs - − compiler/GHC/Hs/Doc.hs-boot - compiler/GHC/Hs/DocString.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Extension.hs - + compiler/GHC/Hs/Extension/Pass.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Lit.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Docs.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Match.hs - compiler/GHC/HsToCore/Match/Literal.hs - compiler/GHC/HsToCore/Pmc/Desugar.hs - compiler/GHC/HsToCore/Pmc/Solver/Types.hs - compiler/GHC/HsToCore/Quote.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/Syntax.hs - compiler/GHC/Iface/Type.hs - compiler/GHC/Iface/Warnings.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/HaddockLex.x - compiler/GHC/Parser/Lexer.x - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/Doc.hs - compiler/GHC/Rename/Env.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Lit.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/SysTools/Tasks.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Hole.hs - compiler/GHC/Tc/Errors/Hole/FitTypes.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Bind.hs - compiler/GHC/Tc/Gen/Export.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Splice.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Tc/Types.hs - compiler/GHC/Tc/Utils/Env.hs - compiler/GHC/Tc/Utils/Instantiate.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Tc/Utils/TcMType.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/Types/PkgQual.hs - compiler/GHC/Types/SourceText.hs - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Finder/Types.hs - compiler/GHC/Unit/Module/Warnings.hs - compiler/GHC/Unit/State.hs - compiler/GHC/Utils/Outputable.hs - compiler/Language/Haskell/Syntax.hs - compiler/Language/Haskell/Syntax/Binds.hs - compiler/Language/Haskell/Syntax/Binds/InlinePragma.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Decls/Foreign.hs - + compiler/Language/Haskell/Syntax/Doc.hs - compiler/Language/Haskell/Syntax/Expr.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/Language/Haskell/Syntax/ImpExp.hs - compiler/Language/Haskell/Syntax/Lit.hs - compiler/Language/Haskell/Syntax/Type.hs - compiler/ghc.cabal.in - docs/users_guide/debugging.rst - docs/users_guide/ghci.rst - docs/users_guide/phases.rst - ghc/GHCi/UI/Exception.hs - ghc/Main.hs - 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/process - libraries/xhtml - testsuite/driver/junit.py - 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/annotations-literals/literals.stdout - testsuite/tests/ghc-api/annotations-literals/parsed.hs - testsuite/tests/ghci/prog-mhu002/prog-mhu002c.stdout - testsuite/tests/ghci/scripts/ghci024.stdout - testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 - 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/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/perf/compiler/T11068.stdout - testsuite/tests/pmcheck/should_compile/T12957.stderr - 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_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/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/Hyperlinker/Parser.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/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/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/e3db12611073a444a79e7c91047654d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e3db12611073a444a79e7c91047654d... You're receiving this email because of your account on gitlab.haskell.org.