Erik de Castro Lopo pushed to branch wip/fix-9809 at Glasgow Haskell Compiler / GHC Commits: 212c292f by Rajkumar Natarajan at 2026-11-11T13:54:08-05:00 document what ->>> stands for in heap profile updates the profiling section of the user's guide to explain how types are approximated when using -hy. Also adds haddocks to getTyDescription with the same information. Fixes #26754 - - - - - c64fc319 by Jonathan at 2026-11-11T13:54:55-05:00 Fix AArch64 veneer target for relocations with an addend Fixes #27807 The RTS linker would construct invalid relocation veneers on AArch64 if the addend was non-zero, which typically caused SIGILL crashes. This could be triggered by evaluating Template Haskell in a package with a large number of dependencies using a static build of GHC. - - - - - cd4dce19 by Kazu Yamamoto at 2026-11-11T13:55:45-05:00 testsuite: add a test for registerFd_ trusting the callback table (#27821) registerFd001 shows a 'threadWaitRead' that never finishes after an fd is closed with 'closeFd' rather than 'closeFdWith'. Darwin is the only platform this reaches -- one-shot registrations are implemented but not used there (#7651) -- so the test is expect_broken on Darwin only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> - - - - - 5ab442ee by Kazu Yamamoto at 2026-11-11T13:55:45-05:00 registerFd_: always tell the polling backend (#27821) Where the backend has no one-shot registrations, 'registerFd_' now tells it about every registration, rather than only when the events differ from the ones the callback table records: the table alone cannot say whether the backend still knows the fd. The 'modify' it returns is unchanged. See Note [Do not trust the callback table]. This fixes registerFd001 and clears its expect_broken. Changelog wording from Duncan Coutts in review. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> - - - - - ab8b5b06 by Vladislav Zavialov at 2026-11-11T13:56:27-05:00 Curried contexts in prefix GADT constructors (#27424) Prefix GADT constructor declarations now accept multiple consecutive contexts, equivalent to a single conjoined context: data G a where MkCurried :: C a => (D a, E a) => G a MkConjoined :: (C a, D a, E a) => G a This is a step towards GHC Proposal #402 "Stable GADT constructor syntax". To represent multiple contexts, the `con_mb_cxt` field of `ConDeclGADT` has been replaced by `con_cxts`, which stores a list instead of a Maybe: - con_mb_cxt :: Maybe (LHsContext pass) + con_cxts :: [LHsContext pass] The rest of this patch follows from this change. Note that in ConDeclH98, the optional context is still stored as a Maybe. To accommodate this difference, a few helper functions were generalised over a Foldable container `t`: hsConDeclTheta :: Foldable t => t (LHsContext ...) -> [LHsType ...] pprLHsContext :: (Foldable t, ...) => t (LHsContext ...) -> SDoc repContexts :: Foldable t => t (LHsContext GhcRn) -> MetaM (Core (M TH.Cxt)) tcHsContext :: Foldable t => t (LHsContext GhcRn) -> TcM [PredType] In practice, the instantiations of `t` are either `Maybe` or `[]`. Record-style GADT constructors continue to accept at most one context. `splitLHsGadtTy` accounts for this by splitting off only the first context if it detects record syntax, leaving the offending part of the type in the body for the renamer to reject later on. Test cases: T12087a T27424a T27424b T27424c T27424d GadtConSigs_th_dump1 - - - - - d2f135ff by Sylvain Henry at 2026-11-11T13:57:22-05:00 NCG: cache register usage in liveness annotations regUsageOfInstr allocates fresh register lists on every call, and on the linear allocator path it was called three times per instruction: in the backward liveness pass, in the forward liveness pass and in the allocator itself. Store the usage computed by the backward pass in the Liveness annotation and reuse it in the other passes (and in the graph allocator's spill passes). patchRegsLiveInstr recomputes it for the patched instruction. See Note [Cached register usage in liveness annotations]. Part of #28008. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - ff0a5d32 by Sylvain Henry at 2026-11-11T13:57:22-05:00 NCG: describe register usage with a small DSL This new register usage DSL (see Note [Register usage DSL] in GHC.CmmToAsm.RegUsage) reduces allocation compared to the previous list-based approach. Fixes #28008. Metric Decrease: ManyAlternatives T12707 T13035 T13379 T13960 T18698b T19695 T21839c T3064 T3294 T4801 T5321FD T5321Fun T783 T9198 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - 51f38f3a by Sylvain Henry at 2026-11-11T13:58:14-05:00 haddock-library: fix the build of the spec and fixtures test suites The documentation pipeline moved from String to Text (commit 202ed264141) but the two test suites of haddock-library were left behind and no longer compiled. They are not run by GHC's CI (see #16206), so this went unnoticed. The fixtures suite still has four pre-existing failures (list-blocks1, table1, table4, table5) that are not addressed here. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - 394d9d6d by Sylvain Henry at 2026-11-11T13:58:14-05:00 haddock: parse backtick spans as monospaced text A backtick span whose content is not a valid Haskell identifier, such as `foo bar`, was rendered as plain text with literal backticks. It is now parsed as monospaced text, like @foo bar@. A closed backtick span whose whole content is one identifier keeps its meaning as a hyperlinked identifier. A span such as `foldl' f z xs` is code: it is no longer read as the identifier foldl between a backtick and a single quote. The TeX-style form `foo' stays an identifier when no backtick closes the span on the same line. Code spans follow the CommonMark rules: a span opened by a run of N backticks ends at the next run of exactly N backticks on the same line, so ``x `plus` y`` is code "x `plus` y". One space is removed at each end when both are present, and an unclosed opening run is plain text. The content is literal: no markup is parsed and backslashes are kept, so `\x -> x` renders as written. See Note [Backtick code spans] in Documentation.Haddock.Parser. Fixes #28090 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 7ae41c37 by Sylvain Henry at 2026-11-11T13:58:14-05:00 Use 'T' instead of `T' in Haddock comments next to backtick spans With backtick code spans, a TeX-style quote `T' followed by a backtick on the same line opens a code span up to that backtick. Use the 'T' form in the Haddock comments where this happens. See Note [Backtick code spans] in Documentation.Haddock.Parser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - ce96f0b6 by Sylvain Henry at 2026-11-11T13:58:14-05:00 haddock: do not parse backtick spans inside @...@ Text between @...@ is already code, so backtick code spans are no longer parsed there. Thus in @x <- f -- of type `M Bool`@ the backticks stay as text. Inline markup inside @...@, such as /.../, passes this context down. See Note [Backticks in code] in Documentation.Haddock.Parser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 744b3036 by Sylvain Henry at 2026-11-11T13:58:15-05:00 haddock: keep the backticks of infix identifiers inside @...@ A backticked identifier inside @...@ was always rendered without its backticks, so @f `elem` xs@ rendered as "f elem xs". Now an identifier in an infix application or an operator section, such as @f `elem` xs@ or @(`elem` xs)@, is parsed in infix form, as if written ``elem``, and renders with its backticks and with elem linked. Elsewhere, as in @`foldlM` :: ...@, the backticks still only mark the link. See Note [Backticks in code] in Documentation.Haddock.Parser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 0d8e1f8d by Sylvain Henry at 2026-11-11T13:59:05-05:00 PPC NCG: print non-standard NaN literals in target byte order The PowerPC NCG printed a non-standard NaN literal byte by byte with floatToBytes/doubleToBytes, which use the byte order of the host. This is wrong when the host and the target have a different endianness (e.g. from x86_64 to big-endian PowerPC). Print the bits with `.long`/`.quad` instead, so that the assembler uses the target byte order. Also make `ppr_item` print its argument: some clauses printed the literal of `pprDataItem` instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 5a9db1ed by Sylvain Henry at 2026-11-11T13:59:05-05:00 Print all NaN literals as integer bits (#28101) The x86 and PowerPC NCGs printed the quiet NaNs 0x7fc00000 and 0x7ff8000000000000 as `.float NaN`/`.double NaN`. GNU as and clang encode these with all mantissa bits set, so constant-folded bit casts of these values gave 0x7fffffff/0x7fffffffffffffff. The C backend printed every NaN as `NAN`, losing its sign and payload. Now the NCGs print all NaNs with `.long`/`.quad` and the C backend with hs_bitcastword2float/hs_bitcastword642double. See Note [Printing NaN literals]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - b4ceb6a9 by mangoiv at 2026-11-11T13:59:47-05:00 ci: fix ghcup nightly script misbehaviour - download all jobs instead of just the first 100 - stop using a canary job to detect whether it's a nightly or release pipeline - - - - - aefa0c1b by Alan Zimmerman at 2026-11-11T14:00:28-05:00 EPA: Use AnnList in HsMultiIf It introduces layout, capture it - - - - - 4c7acf0e by Erik de Castro Lopo at 2026-11-12T09:04:27+11:00 TimerManager: publish only evaluated timeout queues (#9809) The issue in #9809 was triggered by many threads registering timeouts at the same time and those timeouts being stored as unevaluated thunks in the shared list. When say 100,000 timeouts are registered at the same time, the program can be slowed down considerably and the memory usage grow unacceptably large. The commit that caused the problem was 2d5eccdf1c, a 2013 change that fixed #7653. The fix is to add a modifyTimeouts function which applies an edit to a copy of the list and fully evaluates the result before replacing the shared list with a CAS operation. Performance has improved for the threaded case and not regressed for the single thread case: Forked registrations of 100k timeouts (median of 5 runs): -N4: 0.577 s, 428 MB -> 0.078 s, 39 MB -N12: 1.227 s, 479 MB -> 0.127 s, 80 MB Forked registrations of 1M timeouts on -N1 (median of 3 and 10 runs): 5.21 s (range 0.67-9.47 s), 1613 MB -> 0.67 s, 250 MB Single-thread registrations are unchanged or slightly faster, and timer latency during registration storms improves (p99 lateness of a 1 ms threadDelay during 100k forked registrations on -N4: 302-394 ms -> 3.5-4.1 ms). The registration code still runs in constant stack, so #7653 stays fixed; T7653 and the concurrent, base and ghc-internal testsuites pass. modifyTimeouts is OPAQUE so that the optimiser cannot expose the edit function's inspection of the old queue next to the compare-and-swap and replace the expected pointer with the evaluated queue, which would make the compare-and-swap keep failing when the MutVar# holds a thunk or indirection. Regression test T9809.hs included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 1635ddef by Moritz Angermann at 2026-11-12T09:04:27+11:00 testsuite: give pause_resume_via_safe_ffi_concurrent 60s on Darwin CI The 10s System.Timeout watchdog was a false deadlock: five serialized 1s pauses plus rts_pause waiting on threadDelay/timer-manager traffic overruns that budget on loaded Mac runners. Keep a watchdog so a real hang still fails. - - - - - 106 changed files: - .gitlab-ci.yml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - + changelog.d/27821 - + changelog.d/28101 - + changelog.d/T26754 - + changelog.d/T9809-timer-manager-contention - changelog.d/allow-gadt-prefix-con-parens - + changelog.d/fix-aarch64-veneer-target-16686 - + changelog.d/gadt-curried-contexts-27424 - + changelog.d/ncg-reg-usage.md - compiler/GHC/CmmToAsm/AArch64/Instr.hs - compiler/GHC/CmmToAsm/Instr.hs - compiler/GHC/CmmToAsm/LA64/Instr.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/RV64/Instr.hs - compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs - compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs - compiler/GHC/CmmToAsm/Reg/Linear.hs - compiler/GHC/CmmToAsm/Reg/Liveness.hs - + compiler/GHC/CmmToAsm/RegUsage.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/CmmToC.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/StgToCmm/Closure.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/GHC/Types/Literal/Floating.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Decls/Foreign.hs - compiler/Language/Haskell/Syntax/Type.hs - compiler/ghc.cabal.in - docs/users_guide/exts/gadt_syntax.rst - docs/users_guide/profiling.rst - libraries/base/src/Data/Foldable.hs - libraries/base/tests/.gitignore - + libraries/base/tests/T9809.hs - libraries/base/tests/all.T - libraries/ghc-internal/src/GHC/Internal/Event/Manager.hs - libraries/ghc-internal/src/GHC/Internal/Event/TimerManager.hs - rts/linker/elf_reloc_aarch64.c - + testsuite/tests/cmm/should_run/T28101.hs - + testsuite/tests/cmm/should_run/T28101.stdout - + testsuite/tests/cmm/should_run/T28101_cmm.cmm - testsuite/tests/cmm/should_run/all.T - testsuite/tests/concurrent/should_run/all.T - + testsuite/tests/concurrent/should_run/registerFd001.hs - + testsuite/tests/concurrent/should_run/registerFd001.stdout - − testsuite/tests/gadt/T12087.stderr - + testsuite/tests/gadt/T12087a.hs - testsuite/tests/gadt/T12087.hs → testsuite/tests/gadt/T12087b.hs - + testsuite/tests/gadt/T12087b.stderr - + testsuite/tests/gadt/T27424a.hs - + testsuite/tests/gadt/T27424b.hs - + testsuite/tests/gadt/T27424b.stderr - testsuite/tests/gadt/all.T - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/T15323.stderr - testsuite/tests/printer/Makefile - testsuite/tests/printer/T18791.stderr - + testsuite/tests/printer/T27424c.hs - testsuite/tests/printer/Test20297.hs - testsuite/tests/printer/Test20297.stdout - testsuite/tests/printer/all.T - testsuite/tests/rts/linker/Makefile - + testsuite/tests/rts/linker/T27807.s - + testsuite/tests/rts/linker/T27807.stdout - testsuite/tests/rts/linker/all.T - testsuite/tests/rts/pause-resume/all.T - testsuite/tests/rts/pause-resume/pause_resume_via_safe_ffi_concurrent.hs - testsuite/tests/th/GadtConSigs_th_dump1.hs - testsuite/tests/th/GadtConSigs_th_dump1.stderr - + testsuite/tests/th/T27424d.hs - + testsuite/tests/th/T27424d.stderr - testsuite/tests/th/all.T - utils/check-exact/ExactPrint.hs - utils/haddock/CHANGES.md - utils/haddock/doc/markup.rst - utils/haddock/haddock-api/haddock-api.cabal - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-library/CHANGES.md - utils/haddock/haddock-library/fixtures/Fixtures.hs - + utils/haddock/haddock-library/fixtures/examples/codeBackticks.input - + utils/haddock/haddock-library/fixtures/examples/codeBackticks.parsed - + utils/haddock/haddock-library/fixtures/examples/codeDoubleBackticks.input - + utils/haddock/haddock-library/fixtures/examples/codeDoubleBackticks.parsed - utils/haddock/haddock-library/haddock-library.cabal - utils/haddock/haddock-library/src/Documentation/Haddock/Parser.hs - utils/haddock/haddock-library/src/Documentation/Haddock/Parser/Identifier.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/3173a2606f69b6afe171e0f4e439e8c... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3173a2606f69b6afe171e0f4e439e8c... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help