David Eichmann pushed to branch wip/dcoutts/foreign-label-source-refactoring at Glasgow Haskell Compiler / GHC Commits: 0423f413 by Kazu Yamamoto at 2026-11-07T08:06:59+09:00 testsuite: add tests for the IO manager lock-up of #21969 T21969a 'closeFdWith' takes every 'EventManager''s 'callbackTableVar' inside 'uninterruptibleMask_' and only puts them back on the paths that do not throw, so a throw from 'closeFd_' leaves those MVars empty for good. Afterwards every 'threadWaitRead' and 'closeFdWith' on an fd in the same bucket blocks forever. T21969b 'closeFdWith' runs the fd's callbacks while asynchronous exceptions are uninterruptibly masked, so a callback that blocks makes the thread calling it permanently unkillable. T21969c 'closeFd_' drops the registrations before telling the backend to forget the fd, so when the backend throws the fd is never closed and the threads waiting on it are never woken. T21969d the cleanup handler of 'threadWait' calls 'unregisterFd_', which throws on backend errors. It runs inside the handler for the asynchronous exception being delivered, so its exception replaces that one: 'killThread' returns but 'ThreadKilled' never arrives. T21969e an exception from re-arming an fd escapes the poll loop, and 'loop' turns it into 'cleanup mgr': the 'EventManager' of that capability is shut down and every thread using it is left blocked. This is the lock-up of #21969 itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> - - - - - 5c197e2e by Kazu Yamamoto at 2026-11-07T08:06:59+09:00 Make the IO manager cope with errors from the polling backend (#21969) Three changes in 'GHC.Internal.Event.Thread': 'closeFdWith' puts every 'callbackTableVar' back on the paths that throw too and no longer skips the callbacks when 'close' fails, those callbacks now run under the 'mask_' of 'close_loop' rather than uninterruptibly masked, and the cleanup of 'threadWait' ignores a failure from 'unregisterFd_'. This fixes T21969a, T21969b and T21969d, and clears their expect_broken. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> - - - - - cb765ded by Kazu Yamamoto at 2026-11-07T08:06:59+09:00 Do not let backend errors abandon the close of a file descriptor (#21969) 'closeFd_' and 'closeFd' now ignore errors from telling the backend to forget the fd: the registration is being torn down and the error says it is already gone. 'registerFd_' still reports them (!10643), where the caller has to learn that the registration did not happen. Both also test 'I.elEvent oldEls /= mempty' rather than 'oldEls /= mempty'. This fixes T21969c, and clears its expect_broken. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> - - - - - 9073bc43 by Kazu Yamamoto at 2026-11-07T08:06:59+09:00 Do not let a backend error take down a capability's IO manager (#21969) A failure to re-arm an fd in 'selectCallbacks' is now handled the way 'registerFd_' handles one (!10643): the registrations are taken back out of the callback table and returned, so their callbacks run and the waiting threads find out for themselves instead of hanging. Checked on aarch64 Linux (epoll) and aarch64 macOS (kqueue), 10 runs each way. This fixes T21969e, and clears its expect_broken. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> - - - - - cdff4e76 by Kazu Yamamoto at 2026-11-07T08:06:59+09:00 Do not let the deregistration of threadWaitSTM throw either (#21969) 'threadWaitReadSTM' and 'threadWaitWriteSTM' return the action that gives up interest in the fd as the second component of their pair, and it was return (waitAction, unregisterFd_ mgr reg >> return ()) 'unregisterFd_' talks to the polling backend, which throws on errors such as ENOENT and EBADF -- which is how a backend reports an fd it no longer knows, once that fd has been closed without going through 'closeFdWith'. That is the same shape as the cleanup of 'threadWait', which the rest of this series made quiet, and it is the same on both counts. There is nothing to decide: the registration is being abandoned, and "the backend does not know this fd" is the state the action is trying to reach. And it does harm: the action is what a caller uses from the cleanup of a 'bracket', where an exception out of it replaces whatever was being propagated. It now goes through 'quietUnregisterFd', as the cleanup of 'threadWait' does, and that function's comment covers both callers. T21969f covers it, and is deterministic on both backends: dropping the only registration changes the event set, so 'unregisterFd_' always reaches the backend. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> - - - - - a7ed305b by Kazu Yamamoto at 2026-11-07T08:06:59+09:00 testsuite: let T21969 run on FreeBSD, and unmark it (#21969, #25512) T21969 now carries the descriptor from 'createPipe' instead of recovering it with 'handleToFd', which rejects the 'DuplexHandle' that FreeBSD's bidirectional pipes become and killed the test in setup there (#25512). The expect_broken goes with it: with the descriptor problem out of the way the test times out on master, so it can only be unmarked on top of this series. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> - - - - - 3074ae61 by Sylvain Henry at 2026-11-08T10:21:50-05:00 rts: heap census counts every small pinned object Blocks of small pinned objects carry BF_LARGE as well as BF_PINNED but hold many objects. heapCensusChain treated every BF_LARGE block whose first object is an ARR_WORDS as holding that single object, a workaround for the slop left by shrinkMutableByteArray# (#11627). So every heap profile mode under-reported pinned byte arrays, i.e. ByteString payloads. Shrinking now writes a slop marker that skipSlop understands (#19048, #27585), so the block walk is safe for large and pinned blocks alike. The block that a capability fills with small pinned objects stays attached to the capability until it is full (see allocatePinned), so it is on no generation list and the census never saw its objects. heapCensus now walks cap->pinned_object_block too. A pinned block is kept or freed as a whole (#28005), so dead pinned objects are counted until their block is freed. T7275 gains one sample in which its dead small arrays still show. The user guide and changelog document this. T7257 retains most of its pinned blocks and takes a census at every GC (+RTS -i0 -hT), so walking every pinned object made it 7x slower and it hit the CI timeout. It now runs 1000000 iterations instead of 5000000. Metric Decrease: T7257 Fixes #28000 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - 16fd075a by Sylvain Henry at 2026-11-08T10:22:39-05:00 rts: fix GC CPU time accounting with idle GC threads (#26169) stat_endGC summed gc_end_cpu - gc_start_cpu over every GC thread, but only the threads that take part in a collection set these fields, and new_gc_thread did not initialise them. With -qn below the capability count, the first collection after setNumCapabilities added garbage to the GC CPU time. Let each participating thread add its own CPU time to an accumulator in stat_endGCWorker, and let stat_endGC take the total. This removes the loop over gc_threads, the reset from #21082 and the gc_end_cpu field. Also drop the unused gc_end_elapsed field. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - 0ef732e2 by Sylvain Henry at 2026-11-08T10:23:30-05:00 Serialized: encode numbers with LEB128 serializeWithData used the Binary instances of Data.Binary for the numbers in a ConstrRep. They have a fixed width: 8 bytes for the constructor index (an Int) and 5 bytes for a small Integer. Each element of a [Int] cost 15 bytes. Now the constructor representation is one unsigned LEB128 number that also contains the index of an algebraic constructor, and the payloads (Integer, Rational, Char) are LEB128 encoded. Most constructors take one byte, and small numbers two. See Note [Serialized encoding]. Sizes measured by the T16841 test: [1..100] :: [Int] 1509 -> 338 bytes "helloworld" 119 -> 31 bytes 2^100 :: Integer 24 -> 16 bytes Just True 18 -> 2 bytes 3.25 :: Double 11 -> 3 bytes 42 :: Int 6 -> 2 bytes A new test, SerializedRoundTrip, round-trips values at the boundaries of the encoding (negative numbers, big Integers, Rationals, Chars). Follow-up to !16841 (#28002). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - 22344fbc by Sylvain Henry at 2026-11-08T10:24:21-05:00 docs: fix duplicate label in qualified_strings.rst The file started with the label "multiline-strings", copied from multiline_strings.rst. Sphinx warned about the duplicate label on every build. Use the label "qualified-strings" instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - b7022624 by Alan Zimmerman at 2026-11-08T10:25:02-05:00 EPA: Use LHsLocalBinds instead of HsLocalBinds This reverses an earlier change, and brings processing of local binds into alignement with the exact printing principle that the LocatedA contents provide the location and extent of the enclosed item, together with any comments or context-specific trailing items like commas or semi colons. The internal TTG extension points only carry exact print annotations related to printing the item within its bounds. This change brings back the problem of EmptyLocalBinds, which by definition cannot have a location. These get a noSrcSpan location, which is ignored in the exact printing process. - - - - - bc2fae45 by Rodrigo Mesquita at 2026-11-08T18:37:40-05:00 Build EvalOpts once per exec rather than per breakpoint stop We were unnecessarily constructing `eval_opts` in `handleRunStatus` (which is run many times in a loop until we hit a breakpoint we care about, e.g. when :steplocal), despite the `eval_opts` being constant across all these runs. So, construct `eval_opts` outside `handleRunStatus` and share the value in all loop calls. The loop always uses the same eval_opts, so no point in constructing them inside `handleRunStatus` from scratch every time. I found out about the significance of this re-construction of `EvalOpts` when I added a record update of `eval_opts` *after* the construction from scratch inside `handleRunStatus` that regressed allocations significantly. This improves the performance of `interpreter_steplocal` on my machine: Baseline Test Metric value New value Change ------------------------------------------------------------------------- interpreter_steplocal(ghci) ghc/alloc 459,845,696 449,843,480 -2.2% Fixes #28068 - - - - - ba579288 by Rodrigo Mesquita at 2026-11-08T18:38:21-05:00 refactor: move and order helper functions in GHCi.Run A small refactor to the order of top-level functions in GHCi.Run - - - - - 24927752 by Luite Stegeman at 2026-11-09T09:21:24-05:00 rts: add missing nonmoving write barrier in out-of-line array copies The out-of-line entries stg_copyArrayzh/stg_copyMutableArrayzh (taken whenever the element count of copyArray#/copyMutableArray# is not a compile-time constant) didn't push the overwritten elements to the nonmoving collector's remembered set. Fixes #27376 - - - - - 6dbcca65 by Rodrigo Mesquita at 2026-11-09T09:22:06-05:00 interp: Set per-thread break flags consistently on eval/resume Currently, the per-thread flags are: - Single-step: Stop at the immediate next breakpoint in this thread - Step-out: Stop at the next continuation with a breakpoint this thread returns to. - Break-on-exception: Stop the next time a synchronous exception is raised in this thread. Originally, these flags were all set globally across all threads. More recently, these flags are set per-thread when `resume`ing that thread, but globally when starting the evaluation of a new expression (`evalStmt`). With this commit, we now use per-TSO flags in both scenarios evaluating expressions in the interpreter (`evalStmt` and `resumeStmt`). - In `resumeStmt` we set the `EvalOpts` specifically in the `ThreadId` being resumed. - In `evalStmt`, we set the `EvalOpts` exclusively on the sandbox thread we fork to evaluate the given expression - When not using the sandbox thread (i.e. -fno-ghci-sandbox), we don't support the debugger anyway, so the break flags are irrelevant. We do this by consistently calling `setBreakFlags` when starting, resuming, or killing the evaluation. See Note [Always setBreakFlags on running thread]. This slightly changes the behavior of evaluating a new expression in the debugger (resuming a thread behaves the same as before). Namely, `:step <expr>`, where <expr> forks a thread, will stop at the immediate next breakpoint in the <expr> main thread, not on a breakpoint of any forked thread. NB: the forked thread may still stop at breakpoint, if it is enabled by index specifically, and then :step-ing from that thread's breakpoint will toggle per-thread stepping for that forked thread. We will want to control stepping in "all threads, regardless of whether we control them or if they were spawned by the debuggee" separately from the commands which trigger evaluation of just an expression. Namely, we'll likely want a "break at the next immediate breakpoint hit on ANY thread" command that the user can execute before launching a debuggee which is multi-threaded. This may even be the default for GHCi. Towards #26064 Fixes #28080 - - - - - 19ff36f2 by Simon Jakobi at 2026-11-09T09:22:47-05:00 testsuite: Mark T8209 fragile for the ghci ways on FreeBSD and darwin A shutdown race in the I/O manager intermittently fails T8209(ghci) on x86_64-freebsd14-validate and aarch64-darwin-validate, recently killing several Marge batches. Mark it fragile there until the race is fixed. See #27948. Assisted-by: Claude Opus 5.5 - - - - - 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 - - - - - d72505e4 by Simon Jakobi at 2026-11-12T15:26:14-05:00 testsuite: Fix T17088 flakiness and restore bug coverage T17088 reads and prints a byte from an uninitialized array. Debug RTS ways fill allocated memory with 0xaa, so the test can fail due to an output mismatch unrelated to the pointer-tagging bug it covers. Initialize the byte to zero to make the output deterministic. The original bug requires the compacting collector and particular compiler and RTS settings. Run the test only in the compacting_gc way with -O1 and -A128k. Also disable STG lambda lifting because it removes the closure shape needed to reproduce the pointer-tagging failure. This makes the test reliable while ensuring it remains an effective reproducer for #17088. Closes #27534. Assisted-by: gpt-5.6-sol via Codex CLI - - - - - 5a7591b3 by David Eichmann at 2026-11-12T15:26:56-05:00 testsuite: Fix python type errors These errors appear when using the VSCode python extension which uses Pylance under the hood. - - - - - 52f129f8 by David Eichmann at 2026-11-12T15:26:56-05:00 Add test modifier to test over all IO Managers - - - - - 22e8b92a by David Eichmann at 2026-11-12T15:26:56-05:00 testsuite: include custom IO Manager in test name - - - - - 82c34ccd by Simon Jakobi at 2026-11-12T15:27:40-05:00 Make T2464 actually test #ifdef'd pragmas The test guarded a LANGUAGE EmptyDataDecls pragma behind #if, but EmptyDataDecls is on by default since Haskell2010, so the module compiled even when the guarded pragma was ignored. Guard MagicHash instead, which is unlikely to be included in a future default language. The test also checks that warnings from file-header pragmas are emitted only once, even though the pragmas are parsed both before and after CPP, using the -fffi deprecation warning as the canary. Use an unrecognised warning flag instead, so the test no longer depends on a deprecated flag that is about to be removed. Context: #27939 Assisted-by: Claude Fable 5.1 - - - - - 419f2a12 by Simon Jakobi at 2026-11-12T15:27:40-05:00 Remove command-line flags deprecated in GHC 8.2 or earlier Also remove the INCLUDE file-header pragma, which only expanded to the now-removed -#include. Closes #27939. Assisted-by: Claude Fable 5.1 - - - - - adc294d0 by Erik de Castro Lopo at 2026-11-12T15:28:21-05: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> - - - - - b294b82f by Moritz Angermann at 2026-11-12T15:28:21-05: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. - - - - - 1543f834 by Simon Jakobi at 2026-11-12T15:29:03-05:00 testsuite/README: Don't append new tests at the end of all.T Patches that each add a test at the end of the same all.T conflict with each other. Tests added elsewhere in the file usually merge cleanly. Context: #26285 Assisted-by: Claude Opus 5.5 - - - - - 9ad25cb2 by Sven Tennie at 2026-11-14T06:20:13-05:00 hadrian: Add Stage3 cross-compiled target bindist (#26924) Add a `binary-dist-stage3` Hadrian target that packages target executables (produced by the stage2 compiler) into a separate '_build/bindist-stage3/' folder, distinct from the stage2 regular or cross-compiler bindist in '_build/bindist/'. This allows a single CI pipeline job to produce both a cross-compiler bindist (e.g. x86_64 -> RISC-V) and a target-architecture bindist (e.g. RISC-V -> RISC-V) that can be installed and run natively on the target. To avoid issues with stale files or race-conditions on them, generate the `configure` script per stage in `_build/<stage>/distrib` directories. - - - - - ca91017d by Sven Tennie at 2026-11-14T06:20:13-05:00 ci: Build Stage3 and Stage2 bindists for cross targets in one job (#26924) Building the stage3 target bindist already produces most of the stage2 cross-compiler bindist as a byproduct, so building them in separate jobs duplicates the build efforts for no benefit. Instead of a separate CROSS_STAGE=3 job, the stage3 job now also builds and publishes the stage2 bindist. The stage3 tarball is named and versioned as if it were built natively on the target (target triple prefix, non-cross opsys), so its artifact name stays what downstream consumers already expect and no changes are needed on their side. For now, this is only enabled for the RISC-V job. Others can easily follow. - - - - - 71b41e09 by Sven Tennie at 2026-11-14T06:20:14-05:00 ci: model cross targets as structured TargetPlatform triples (#26924) Storing the cross target as a raw triple forced ad-hoc parsing at every use, and broke the single responsibility rule. Modelling it as a structured `TargetPlatform`` instead, avoids parsing and provides a clear separation of concerns. - - - - - 8067c2f9 by Sven Tennie at 2026-11-14T06:20:14-05:00 ci: extract the cross smoke tests into a separate smoke_test command (#26924) This reduces if-nesting and complexity of the main `test_hadrian` command. The decision how to test is now made by the caller. This is a fair choice, because most test cases can run under emulation - they are just very slow then. The Stage3 smoke test also checks that the target compiler does not report itself as cross-compiling and, when supported, runs a small GHCi expression. - - - - - 7ece99a7 by fendor at 2026-11-14T06:20:57-05:00 Add `-dep-json` flag to `ghc -M` Add an optional flag to `ghc -M` that allows to write the dependency information in JSON Lines format. The JSON Lines format enables us to stream the output of the dependency generation to a consumer. The output of `-dep-json` is streamed to a temporary file and then copied to the final destination to avoid partial writes. Each line contains one of two possible json objects: 1. A Home Unit Dependency * Contains the name of the home module, its unit, where it is located, whether a preprocessor is used, and all of its imports. Importantly, the imports include `-XExplicitLevelImports` information. * If requested via `-include-pkg-deps`, includes imports of external units, e.g. modules from `base`. * If requested via `-include-cpp-deps`, files included via CPP. 2. External Unit Dependency * Only if `-include-pkg-deps` is given * Contains unit-id, its package name and package id. --- This PR refactors the Makefile generation to use phases appropriately. We introduce an intermediate data structure that is generated based on the module graph nodes, and only then generate the Makefile rules. This allows the dep-json and dep-makefile generation to use the same dependency processing. - - - - - 0f6e0146 by fendor at 2026-11-14T06:20:57-05:00 Add multiple home unit support to `ghc -M` Allows to process the module graph of multiple home units at once using the same syntax as `--make` and `--interactive`: ghc -M -unit @unitA -unit @unitB The semantics are identical to `--make` and `--interactive`. Each home unit can declare individually to use `-include-cpp-deps` and `-include-pkg-deps`. However, there can only be one output file, and `-dep-json` and `-dep-makefile` can only be provided at the top of the cli invocation. We introduce a new GHC API `doMkDepend` that allows to use multiple home units conveniently. The output of `-dep-json` and `-dep-makefile` does not change, since we were careful to choose a format that supports multiple home units from the start. Single home units are still accepted like before with no changes. - - - - - 5598e6a0 by fendor at 2026-11-14T06:20:57-05:00 Deprecate `doMkDependHS` in favour of `doMkDepend` - - - - - 39f2943e by David Eichmann at 2026-11-14T06:21:41-05:00 rts: Expose getRtsSymbols() and store redirect labels and external symbols tag - - - - - aa159605 by David Eichmann at 2026-11-14T06:21:41-05:00 hadrian: when running tests, properly set have_gdb and have_readelf - - - - - ff826da4 by David Eichmann at 2026-11-14T06:21:41-05:00 testsuite: add have_ldd() test modifier - - - - - b9f0b7e2 by David Eichmann at 2026-11-14T06:21:41-05:00 testsuite driver: on windows, ensure PATH correctly contains mingw and ghc-pkg libraries - - - - - 543c108e by David Eichmann at 2026-11-14T06:21:41-05:00 testsuite: driver now sets WAY_FLAGS variable for makefile tests - - - - - 13408a2b by David Eichmann at 2026-11-14T06:21:41-05:00 Add golden test for rts/RtsSymbols.c This test compares declared symbols against symbols observed in the rts DSO (.so file). - - - - - 38d421fb by Sylvain Henry at 2026-11-16T16:02:22-05:00 CoreMap: look up a non-recursive let with the key order of the store xtE stored a `Let (NonRec b r) e` with the body e as the first key and the right-hand side r as the second key. lkE used the opposite order. When a trie level holds one entry, GenMap compares the full keys with (==), and the difference has no effect. When a trie level holds two entries, a lookup of an expression with a non-recursive let fails. A later insert of an equal expression then overwrites the first entry. Now xtE stores the key in the order that lkE uses. Effects of the bug: CSE did not share identical bindings when a module had two different bindings that hold a non-recursive let or join point (#27892). The pattern-match checker gave different representatives to equal guard or view expressions, and thus reported spurious non-exhaustive matches. Fixes #27892. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - fa5bc4c0 by Sylvain Henry at 2026-11-16T16:02:22-05:00 CoreMap: ignore the multiplicities of binders BndrMap keyed a binder on its type and on its multiplicity, and eqDeBruijnExpr compared the multiplicities of lambda binders. But the multiplicity of a let binder has no meaning (Note [Multiplicity of let binders] in GHC.Types.Var), and Core-to-core passes do not keep the multiplicities of lambda binders correct (Note [Linting linearity] in GHC.Core.Lint). Thus the trie separated terms that are equal. The key-order bug fixed in the previous commit hid this bug. With that fix, the pattern-match checker gave different representatives to two equal view expressions when one let came from the source and the other let came from the beta-reduction of a linear lambda. Now BndrMap is TypeMapG again, as before the linear types commit, and eqDeBruijnExpr ignores the multiplicities of lambda binders. The haddocks of CoreMap and eqCoreExpr state this contract. Fixes #28095. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - fa6b8c9e by Simon Peyton Jones at 2026-11-16T16:03:04-05:00 Swap visibilities in mkSymCo As #28123 showed, `mkSymCo` was failing to swap visibility flags in `ForAllCo`. Fixing that in turn showed that the change to `mkEtaForAllMCo` that allegedly fixed #27557 was utterly wrong, and should simply be un-done. I have added some comments to document the invariants. - - - - - cbe0a6bf by fendor at 2026-11-17T09:25:55-05:00 Add support for streaming `ghc -M` to stdout Adds the flags `-dep-json-stdout` and `-dep-makefile-stdout` which streams dependency information line-by-line to stdout. Each dependency generation can be redirected to separate outputs. Providing any extra `-dep-{json,makefile}[-stdout]` disables the default generation of the `Makefile` file. Allows consumers to start processing the dependency information as it comes in and not waiting for the dependency generation to finish. `DepStream` abstracts over the possible output handles, which is either a file or the stdout handle. Writing to a file requires temporary file paths, thus `DepStream` must provide a way to perform clean up when dependency processing finished or when an error is thrown for any reason. We further decouple the rendering and writing of the result from the dependency generation, localising side effects and making the code slightly more readable. The testsuite now also handles `ghc -M` writing to stdout. We add a test for each combination of writing to stdout and file, except for writing both makefile and json. While it probably works, is really undefined behaviour. Closes #27937 - - - - - fbd49db2 by Sylvain Henry at 2026-11-17T09:27:09-05:00 Link the on-demand iserv without --gc-sections GHC links an iserv program each time a session needs the external interpreter. The link is static, against the ghci library and the boot libraries. Like all executable links, it passed -Wl,--gc-sections to a GNU linker. On libraries built with -split-sections (the release bindists), the section garbage collection of ld.bfd is the largest part of that link: with binutils 2.45, the link takes 3 times longer with --gc-sections than without. The program is temporary and its size is not important. Thus the iserv link does not use --gc-sections. Other executable links do not change. In CI, each ext-interp or ghci-ext test takes 12 to 18 times longer in the x86_64-linux-fedora43-release test job (split sections) than in the x86_64-linux-deb13-validate test job (no split sections) on the same runner, while a normal-way test takes the same time in both. This link is most of that difference. See Note [No --gc-sections for the on-demand iserv] in GHC.Runtime.Interpreter.C. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - 09c965e2 by mangoiv at 2026-11-17T09:27:51-05:00 ci: make tests-primops run on marge CI test primops dispatch was disabled on the *full-ci group label to avoid dispatching for some of its configs but wasn't reenabled for marge ci runs which it ought to run Fixes #27765 - - - - - 83038fbe by David Eichmann at 2026-11-17T09:28:32-05:00 test driver refactor: replace `.format(**locals())` with f-string - - - - - 01a5b0ac by Sylvain Henry at 2026-11-22T16:35:34-05:00 NCG: List each destination of a jump table once jumpDestsOfInstr listed a block once per jump table entry that named it. The linear register allocator makes a fixup block per listed destination, so such a block got several fixup blocks. The patch of the jump sends every entry to the first one. The other fixup blocks were dead code, and the CFG had an edge to each of them. jumpDestsOfInstr now lists each destination once, in every backend. joinToTargets asserts it in debug builds. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - e4498112 by Andreas Klebinger at 2026-11-22T16:35:34-05:00 x86 ncg: Track the current block in NatM to keep the CFG in sync The x86 NCG uses a CFG for code layout. When instruction selection makes new blocks (word2Float#, cmpxchg loops, 64-bit shifts on i386), it must add them to the CFG. Some sites did not. The CFG went out of sync, the layout was bad, and the register allocator panicked when it added fixup blocks (#27694, #27915). NatM now keeps the current block in its state. Combinators update the CFG and the current block together. See Note [Updating the CFG during CodeGen] in GHC.CmmToAsm.Monad. Other changes: * -dasm-lint checks that the jumps in the code and the edges in the CFG agree in both directions. This found a second desync: the CFG did not follow the jumps that allocMoreStack retargets. The new addPreentryBlock fixes it. * The code must be emitted in generation order, because the CFG records new blocks in that order. A store now generates the code of its value before the code of its address, in the order it emits them. Atomic operations take their address from the new getNonClobberedAmode, so the code of their other operands cannot clobber it. Fixes #27694, #27915 Co-authored-by: Sylvain Henry <sylvain@haskus.fr> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - f59fb957 by Sylvain Henry at 2026-11-22T16:35:34-05:00 x86 ncg: Maintain the CFG on i386 The i386 NCG now keeps its CFG in sync with the code (see the previous commit), so backendMaintainsCfg is now True for i386. i386 gets the CFG based code layout, dead code elimination and the -dasm-lint check, like x86-64. The compiler allocates more on i386: the CFG now goes through the register allocator, branch shortcutting and optimizeCFG, which i386 skipped before. x86-64 already does this work. Metric Increase: CoOpt_Read ManyAlternatives T10421 T12425 T12707 T13056 T13253 T13253-spj T13960 T15164 T15304 T15630 T15630a T15703 T16577 T17516 T17836 T18140 T18282 T18304 T18698a T18698b T18730 T18923 T19695 T20049 T21839c T24471 T26425 T26989 T5642 T6048 T783 T9233 T9630 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 2091b89a by fendor at 2026-11-22T16:36:17-05:00 `ghc -M`: Add support for link nodes to json output `LinkNode`s are part of the module graph and indicate that a certain linking artefact is to be produced from other module graph nodes. We expose `LinkNode`s in the output of `ghc -M -dep-json`, allowing consumers to see when a linking artefact is to be produced. Only the JSON output format of `ghc -M` supports `LinkNode` as it is unclear how the Makefile output should be retrofitted to express the dependencies, and whether it would require a feature guard. Closes #28007 - - - - - cfd4fb67 by Ryan Scott at 2026-11-22T16:36:59-05:00 GHC.HsToCore.Quote: Quote \cases with the correct type Previously, `\cases` expressions inside of Template Haskell quotes would incorrectly use the `Match` type instead of `Clause` for the element type. We now use `nonEmptyCoreList` when quoting `\cases`, which infers the correct type automatically. This works because `\cases` has an invariant that the list of clauses is always non-empty. Fixes #27826. - - - - - 06e71ddf by Simon Peyton Jones at 2026-11-22T16:37:40-05:00 Better desugaring for bang patterns Ticket #27862 showed that we were desugaring bang patterns in a silly way, which led to bad code. This small fix makes it much better. I ended up refactoring `decomposeFirstPat` to be of type (LPat -> LPat) instead of (Pat -> Pat) which made it much easier to keep the locations correct. On the way I also fixed #28137, a missing warning. See Note [Tidying patterns] which has new (TP1) and (TP2) and Note [Grouping equations] especially (GE1) - - - - - cd6c2a96 by Simon Jakobi at 2026-11-22T16:38:23-05:00 Cmm: drop eliminated blocks from the graph in CBE Previously, common block elimination only made the eliminated blocks unreachable. They stayed in the graph until stack layout discarded them. Removing these blocks right away reduces the potential for confusion (e.g. #27368). It does not appear to make any significant difference to compiler allocations. Assisted-by: Claude Opus 5.5 - - - - - c0764c69 by Hannes Siebenhandl at 2026-11-22T16:39:04-05:00 Use Set operations over Foldable operations Use `O(log n)` operations over `O(n)` for all call-sites of `hsc_all_home_unit_ids`. - - - - - 242f8daf by Alan Zimmerman at 2026-11-22T16:39:46-05:00 EPA: Use AnnList in DecBrl Via updating the TTG extension point payload - - - - - 1e568190 by David Eichmann at 2026-11-22T16:40:28-05:00 Fix race condition in IOManager test - - - - - 64f821c6 by Simon Peyton Jones at 2026-11-22T16:41:09-05:00 Fix a zonking bug As #28135 showed, we were failing to zonk some type-variable binders before doing scoped-sort dependency analysis, resulting in chaos. The fix is easy. - - - - - ed5124b3 by mangoiv at 2026-11-22T16:41:50-05:00 ci: nightly push can run on any arch - - - - - 1340d255 by ARATA Mizuki at 2026-11-23T20:13:03-05:00 rts: Fix unwinding information for StgRun The unwinding rule for rsp updated in a5ec467ee3d4e77c026437a545981269acde3434 was wrong. It gave the value of rsp _after_ the call instruction (i.e. on entry to StgRun), whereas it should give the value _before_ the call instruction (i.e. the caller's rsp). Fixes #27637 - - - - - 56bb91d9 by Alan Zimmerman at 2026-11-23T20:13:44-05:00 EPA: Replace AnnListLayout / AnnListBrackets with EpLayout We have harmonised the use of `AnnListLayout` and `AnnListBrackets` to be equivalent to `EpLayout`. We now take the final step, and remove them completely in favour of `EpLayout`. The change looks bigger than it is, because a lot of golden test output gets updated. - - - - - 2349dd26 by Simon Peyton Jones at 2026-11-26T21:19:27-05:00 Use a different herald for -ddump-simpl-trace ... so that we can more easily skip the high-volume ones - - - - - 03b1faab by Simon Peyton Jones at 2026-11-26T21:19:27-05:00 Update comments and user manual This commit addresses the comment-related suggestions in #27973 - - - - - 24055252 by Simon Peyton Jones at 2026-11-26T21:19:27-05:00 Document and refactor eta-reduction documentation Triggered by #27212, this patch does several related things. * #27212 suggested that `findRhsArity` should ask for eta-expansion whenever the RHS's `manifestArity` is less than the arity it finds. That is a misconception: it deliberately compares with `exprArity`, which counts PAPs, so that we do not eta-expand PAPs (#9020). Switching to `manifestArity` makes compile time worse in T13960 and T13056. So this patch changes no code here; we continue to expand only to increase `exprArity` not `manifestArity`. Instead it documents the design in `findRhsArity`, `tryEtaExpandRhs`, `wantEtaExpansion` and Note [Do not eta-expand PAPs] (which now records the #27212 experiment). * Refactor GHC.Core.Opt.Arity.tryEtaReduce, which was hard to understand: - Accumulate an MCoercion rather than a Coercion, so the common no-cast case builds no coercions at all. - Separate equations of `go` for type and value arguments. For value arguments, the new `getTrivialHead_maybe` looks through any nesting of casts and floatable ticks, and `mkEtaReduceFunCo` builds the coercion. - Make the FunCo with `mkFunCo2` and compute its right-hand FunTyFlag from the coercion kinds. The cast can turn a Type-kinded argument into a Constraint-kinded one. New test T27212 covers this. - `mkEtaReduceForAllMCo` builds the ForAllCo for type arguments. It is tiresomely similar to `mkEtaForAllMCo`, but with the visibilities the other way round (#24014). It will go away again once !17006 lands. - New helper `mCoToCo` in GHC.Core.TyCo.Make. * Drop the checks on multiplicity in `tryEtaReduce`, which sometimes disabled eta-reduction. For example, (\x. K x) has type Int -> T, but the data constructor has type K :: Int %1 -> T, so we used to refuse to eta-reduce it to K. But Note [Linting linearity] in GHC.Core.Lint (EXAMPLE 4) already says that we do not preserve linearity under eta-reduction, so this change just puts that claim into practice. See (EtaMult) in Note [Eta reduction soundness]. Consequences in the testsuite: - T18052a: the pattern-synonym builder (\x y. (x,y)) is now just (,). - T21888a: the NOINLINE function (f x = Just x) becomes (f = Just), so f loses its CPR signature. The test is about demands, not CPR. * Tidy up the documentation of eta-reduction: - Relabel the criteria in Note [Eta reduction soundness] as (EtaA), (EtaS), (EtaR), (EtaE), (EtaT), (EtaJ), (EtaB) and (EtaW), and update all references to them. Also fix references to point (2) of Note [Eta reduction makes sense], which no longer exists. - Replace the confused "never reduce arity" bullet with an example in (EtaA), cross-referenced from Note [Arity robustness]. - Add historical notes (EtaMult) and (EtaBot). - Label the equations in Note [Eta reduction with casted arguments] (ECA1-4), and point to the code that implements them. LLM disclosure: I interacted with Claude a lot for this MR, but I wrote all the code and docs myself. - - - - - e02a40c5 by Zubin Duggal at 2026-11-26T21:20:10-05:00 linker: Remove DotA and DotDLL constructors of LinkablePart As far as I can, we have never actually used these constructors, and they have never appeared in a positive position, ever since they were introduced a long time ago. Foreign libraries aren't loaded through these either, that happens either through `loadPackages` which uses `LibrarySpec` or through 'loadCmdLineLibs' Also, a Linkable defines the build product of a single home module. DotA/DotDLL are library like things, so they don't fit into a Linkable anyway. - - - - - 56ae5186 by Zubin Duggal at 2026-11-26T21:20:10-05:00 Identify Linkable with fingerprints of their contents rather than modtimes - - - - - 3b1fe950 by Zubin Duggal at 2026-11-26T21:20:10-05:00 Linker cleanup delete a bunch of unused functions - - - - - 8f2d4513 by Zubin Duggal at 2026-11-26T21:20:10-05:00 Record constituent hashes for bytecode libraries A bytecode library now records the combined hash of its constituents, so relinking can be skipped when they haven't changed. - - - - - bd43176e by Zubin Duggal at 2026-11-26T21:20:10-05:00 bytecode: Give persistent bytecode files a fixed-size header with a hash The header of .gbc and .bytecodelib files now consists of the magic word, the compiler version and a hash, all with fixed-length encodings. The hash is the gbc_hash of a bytecode file, or the inputs hash of a bytecode library. readBinByteCodeHash and readBytecodeLibInputsHash now read only the header rather than the whole file. The version is written as its four numeric components instead of as a string. - - - - - c62000f2 by Zubin Duggal at 2026-11-26T21:20:10-05:00 driver: Refresh ms_bytecode_date when reusing a ModSummary - - - - - f979f719 by Zubin Duggal at 2026-11-26T21:20:10-05:00 bytecode: Treat persistent bytecode files with a bad header as stale - - - - - cf85181f by Zubin Duggal at 2026-11-26T21:20:10-05:00 bytecode: Record the inputs hash in BytecodeLib ------------------------- Metric Increase: MultiLayerModulesRecomp MultiLayerModulesTH_Make MultiLayerModulesTH_OneShot ------------------------- - - - - - 2948aea2 by Simon Jakobi at 2026-11-26T21:20:52-05:00 X86 NCG: use bt for single-bit tests Previously the Cmm patterns (x & (1 << i)) != 0 (x & (1 << i)) == 0 compiled to a mov/shl/and/test sequence. Now they compile to a single bt, followed directly by a jc/jae or setc/setae. As with btr/bts/btc, a literal single-bit mask that doesn't fit in an imm32, such as x & 0x10000000000, is now also tested with bt instead of being loaded into a register first. Data.Bits.testBit doesn't benefit yet when the bit index is variable: its bounds-checked shiftL wraps the shift in a mask that blocks this optimization. See Note [Bit-test instructions] in GHC.CmmToAsm.X86.CodeGen. Fixes #27688. Assisted-by: Claude Fable 5.1 - - - - - d7206efa by Simon Jakobi at 2026-11-26T21:21:33-05:00 ci: Anchor the release branch pattern Branches with `ghc-X.Y` anywhere in their name, such as wip/ghc-9.16-backports, were treated as release branches. Each push started a full-ci branch pipeline next to the merge request pipeline, and its jobs pushed perf notes. Fixes #28172. Assisted-by: Claude Fable 5.2 - - - - - c3e21ac0 by Simon Jakobi at 2026-11-26T21:21:33-05:00 ci: Fix the release branch pattern of lint-submods-branch The pattern had `[0.9]` for `[0-9]`, so the job didn't run on ghc-10.0. Also anchor the pattern (#28172). Assisted-by: Claude Fable 5.2 - - - - - 03036aef by Simon Jakobi at 2026-11-26T21:22:15-05:00 ci: Retry some failed jobs automatically Let GitLab retry a job up to twice when it fails with one of these reasons: - runner_system_failure: the runner could not run the job. This is nearly always an image pull that fails before the job starts. - stuck_or_timeout_failure: GitLab dropped the job, either because its runner stopped reporting for an hour or because no runner picked it up within a day. Assisted-by: Claude Fable 5.2 - - - - - e8139c28 by Simon Jakobi at 2026-11-26T21:22:56-05:00 Correct some comments about unreachable Cmm blocks * ContFlowOpt claimed that maybe_concat drops every block that has no predecessors left. But a block that loses its predecessors to shortcutting stays in the graph. * The linear register allocator claimed that the Cmm pipeline keeps unreachable blocks away from it. But the NCG's own Cmm optimisations can make more blocks unreachable after the Cmm pipeline has run. It is sccBlocks that discards unreachable code before register allocation (#7574). Also: * Remove a commented-out trace in the linear allocator that predates #7574. * Say in Note [unreachable blocks] that any pass in cpsTop can encounter unreachable blocks. Rename it to Note [Unreachable blocks in the Cmm pipeline], so its title no longer differs only in case from an unrelated Note in GHC.Cmm.Dataflow. Context: #27368 Assisted-by: Claude Fable 5.2 - - - - - 21abda33 by Teo Camarasu at 2026-11-26T21:23:37-05:00 Skip tests that excercise forkProcess when using non-moving GC The non-moving GC creates a persistent marker thread. This causes issues when users use forkProcess, since the child process ends up in a strange state. forkProcess is documented to not work well with the threaded Haskell runtime. So, it's not surprising that it doesn't work with the non-moving GC which is inherently threaded. We should one day add support for forkProcess, but, for now, we just disable these tests when using the non-moving GC. The underlying issue is tracked by #27547. - - - - - 79efb4a7 by Wolfgang Jeltsch at 2026-11-26T21:24:20-05:00 Switch fingerprint caches to `FastString` keys Resolves #28139. - - - - - feacb69d by mangoiv at 2026-11-26T21:25:01-05:00 ci: fix a bug where there's no runner that can pick up nightly push jobs - - - - - 1d5c87ce by Alan Zimmerman at 2026-11-26T21:25:43-05:00 EPA: Move setLayoutBoth inside markAnnListA The current refactoring aims to capture layout only in the `AnnList` exact print annotation. A consequence of this is that exact printing should only process layout when printing in the context of `AnnList`. To achieve this, this commit moves the layout printing enabler `setlayoutboth` into the `AnnList` processing. Future commits will remove the other occurrences. It also adds some tests to confirm it still works as intended, and cleans up some other unused functions. - - - - - aff1b84b by Duncan Coutts at 2026-11-30T04:10:39-05:00 Move idle GC tracking to its own file, step 1 of 2 Add a new IdleGC.{c,h} module. Move the RecentActivity type, recent_activity variable and {get,set}RecentActivity wrappers. - - - - - 1d0d3378 by Duncan Coutts at 2026-11-30T04:10:39-05:00 Move idle GC functionality to its own file, step 2 of 2 We can now fully encapsulate the recent_activity state, exposing just three hooks, and one query used in the scheduler and timer tick. This is a prelude to making changes to the implementation of tracking when to perform an idle gc. - - - - - a691243d by Duncan Coutts at 2026-11-30T04:10:39-05:00 Correct comments in idle GC code The comments still referred to stopTimer/startTimer. These were replaced recently by pauseTimer/unpauseTimer, but the comment was not updated. - - - - - fb5fde91 by Duncan Coutts at 2026-11-30T04:10:39-05:00 Make signal handling be a responsibility of the I/O manager(s) Previously it was scattered between I/O managers and the scheduler, and especially the scheduler's deadlock detection. Previously the scheduler would poll for pending signals each iteration of the scheduler loop. The scheduler also had some hairy signal functionality in the deadlock detection: in the non-threaded RTS (only) if there were still no threads running after deadlock detection then it would block waiting for signals. But signals can and (in my opinion) should be thought of as just a funny kind of I/O, and thus should be a responsibility of the I/O manager. So now we have the I/O managers poll for signals when they are polling for I/O completion (and removing the separate poll in the scheduler). And when I/O managers block waiting for I/O then they now also start signal handlers if they get interrupted by a signal. Crucially, if there is no pending I/O or timers, the awaitCompletedTimeoutsOrIO will still block waiting for signals. This patch puts us into an intermediate state: it temporarily breaks deadlock detection in the non-threaded RTS. The waiting on I/O currently happens before deadlock detection. This means we'll now wait forever on signals before doing deadlock detection. We need to move waiting after deadlock detection. We'll do that in a later patch. - - - - - 6737f45e by Duncan Coutts at 2026-11-30T04:10:39-05:00 Clean up the RTS internal signal handling API Now that the I/O manager is responsible for signals, we can simplify the API we present for signal handling. We now just need startPendingSignalHandlers, which is called from the I/O managers. We can get rid of awaitUserSignals. We also don't need RtsSignals.h to re-export the platform-specific posix/Signals.h or win32/ConsoleHandler.h We can also hide more of the implementation of signals. Less has to be exposed in posix/Signals.h or win32/ConsoleHandler.h. Indeed, posix/Signals.h becomes empty and we remove it. Partly this is because we don't need inline functions (or macros) in the interface. Also remove signal_handlers from RTS ABI exported symbols list. It does not appear to have any users in the core libs, and its really an internal implementation detail. It should not be exposed unless it's really necessary. - - - - - bd9d3d53 by Duncan Coutts at 2026-11-30T04:10:40-05:00 Remove variable n_haskell_handlers which has become write-only The previous commit removed the last read of this variable. - - - - - de8455fe by Duncan Coutts at 2026-11-30T04:10:40-05:00 Narrow the window in which signals might be missed before poll/select Any signals delivered just before poll/select block will be missed until they are woken later by unrelated events. This arbitrarily delays the delivery of signals. This is not a complete solution. It is a cheap way to narrow but not close the window. A full solution will have to come later. This issue existed already, and is documented in issue #27540. - - - - - 73381f34 by Duncan Coutts at 2026-11-30T04:10:40-05:00 In the scheduler, move I/O blocking after deadlock detection To make deadlock detection effective in the non-threaded RTS when there are deadlocked threads and other unrelated threads waiting on I/O, we need to arrange to do deadlock detection before we block in scheduler to wait on I/O. The solution is to: 1. adjust scheduleFindWork, which runs before deadlock detection, to only poll for I/O and not block; and 2. add a step after deadlock detection to wait on I/O if there are still no threads to run (and there's any I/O or timeouts outstanding) The scheduleCheckBlockedThreads is now so simple that it made more sense to inline it into scheduleFindWork. - - - - - b206520f by Duncan Coutts at 2026-11-30T04:10:40-05:00 Remove bogus anyPendingTimeoutsOrIO guard from scheduleDetectDeadlock The deadlock detection was only invoked if both of these conditions hold: 1. the run queue is empty 2. there is no pending I/O or timeouts The second condition is unnecessary. The deadlock detection mechanism can find deadlocks even if there are other threads waiting on I/O or timers. Having this extra condition means that we fail to detect blocked threads if there are any threads waiting on I/O or timers. Part of fixing issue #26408 - - - - - 49a75a4c by Duncan Coutts at 2026-11-30T04:10:40-05:00 Don't consider pending I/O for early context switch optimisation Context switches are normally initiated by the timer signal. If however the user specifies "context switch as often as possible", with +RTS -C0 then the scheduler arranges for an early context switch (when it's just about to run a Haskell thread). Context switching very often is expensive, so as an optimisation there cases where we do not arrange an early context switch: 1. if there's no other threads to run 2. if there is no pending I/O or timers This patch eliminates case 2, leaving only case 1. The rationale is as follows. The use of this was inconsistent across platforms and threaded/non-threaded RTS ways. It only worked on the non-threaded RTS and on Windows only worked for the win32-legacy I/O manager. On all other combinations anyPendingTimeoutsOrIO would always return false. The fact that nobody noticed and complained about this inconsistency suggests that the feature is not relied upon. If however it turns out that applications do rely on this, then the proper thing to do is not to restore this check, but to add a new I/O manager hint function that returns if there is any pending events that are likely to happen *soon*: for example timeouts expiring within one timeslice, or I/O waits on things likely to complete soon like disk I/O, but not for example socket/pipe I/O. The motivation to avoid this use of anyPendingTimeoutsOrIO is to allow us to eliminate anyPendingTimeoutsOrIO entirely. All other uses of this are just guards on {await,poll}CompletedTimeoutsOrIO and the guards can safely be folded into those functions. This will better cope with some I/O managers having no proper implementation of anyPendingTimeoutsOrIO. Ultimately this will let us simplify the scheduler which currently has to have special #ifdef mingw32_HOST_OS cases to cope with the lack of a working anyPendingTimeoutsOrIO for some Windows I/O managers - - - - - cf8f2888 by Duncan Coutts at 2026-11-30T04:10:40-05:00 Remove anyPendingTimeoutsOrIO guarding {poll,await}CompletedTimeoutsOrIO Previously the API of the I/O manager used a two step process: check anyPendingTimeoutsOrIO and then call {poll,await}CompletedTimeoutsOrIO. This was primarily there as a performance thing, to cheaply check if we need to do anything. And then because anyPendingTimeoutsOrIO existed, it was used for other things too. We have now eliminated the other uses, and are just left with the performance pattern. But this was problematic because not all I/O managers correctly implement anyPendingTimeoutsOrIO (specifically the win32 ones), and now that we also make I/O managers responsible for signals then we need to poll/await even if there is no pending I/O or timeouts. If there is no pending I/O or timeouts then await needs to degenerate to just waiting forever for any signals. - - - - - a1d2e786 by Duncan Coutts at 2026-11-30T04:10:40-05:00 Remove anyPendingTimeoutsOrIO, it is no longer used And this avoids the problems arising from the win32 I/O managers having had a bogus implementation. - - - - - 61769cec by Duncan Coutts at 2026-11-30T04:10:40-05:00 Remove second scheduler call to awaitCompletedTimeoutsOrIO Previously awaitCompletedTimeoutsOrIO was called both before and after deadlock detection in the scheduler. The reason for that was that the win32 I/O managers had a bogus implementation of anyPendingTimeoutsOrIO and this was used to guard the call of awaitCompletedTimeoutsOrIO prior to deadlock detection. This meant the first call site was never actually called when using the win32 I/O managers. This was the reason for the second call: the first one was never used. What a mess. So now we have a simple design in the scheduler: 1. poll for completed I/O, timers or signals 2. if no runnable threads: do deadlock detection 3. if still no runnable threads: block waiting for I/O, timers or signals. - - - - - c4de27e0 by Duncan Coutts at 2026-11-30T04:10:40-05:00 Lift emptyRunQueue guard out of scheduleDetectDeadlock this improved the clarity of the logic when reading the scheduler code. And improve the comment about scheduleDoGC that was rather unclear. - - - - - b53a9113 by Duncan Coutts at 2026-11-30T04:10:40-05:00 Make interruptIOManager work for WinIO (non-threaded) Fixes #27403 The idle GC scheme now fundamentally relies on interruptIOManager working, so it's no longer acceptable for it to be missing for WinIO. Not having it would cause lock ups. - - - - - 7eb3b4bd by Duncan Coutts at 2026-11-30T04:10:40-05:00 Make non-threaded deadlock detection also rely on idle GC Only do deadlock detection GC when idle GC kicks in. This also relies on using wakeUpRts, so now do this unconditionally. Previously wakeUpRts was for the threaded rts only. - - - - - b32b1f2a by Duncan Coutts at 2026-11-30T04:10:40-05:00 Enable idle GC by default on non-threaded RTS The behaviour is now uniform between the threaded and non-threaded RTS ways. The deadlock detection now relies on idle GC for both threaded and non-threaded ways. Previously deadlock detection did not rely on idle GC for the non-threaded way. Also tweak test T7275 to account for idle GC. This test's output is sensitive to the number of major GCs run. Since this commit enables idle GC for the non-threaded RTS, for this test that increases the number of major GCs, since the test program is frequently idle for more than 300ms. - - - - - a1939765 by Duncan Coutts at 2026-11-30T04:10:40-05:00 Fix state of idle GC control vars with +RTS -V0 Currently when the user uses +RTS -I0, then doIdleGC is set to false. But if the master tick interval -V is set to 0 then the idleGCDelayTime was being set to 0 but doIdleGC was not being set to false, which is inconsistent, and almost certainly buggy. - - - - - 90285b5c by Duncan Coutts at 2026-11-30T04:10:40-05:00 Add a long Note [Deadlock detection] It describes the historical and modern designs and their trade-offs. The point is we've now unified the code for deadlock detection between the threaded and non-threaded ways, by changing the non-threaded to follow the same design as the threaded. - - - - - 3747864c by Duncan Coutts at 2026-11-30T04:10:40-05:00 Refactor the utils providing the I/O timeout for different system APIs We have to provide a timeout in three different time formats (int milliseconds, struct timeval *, and struct timespec *). These are for platform APIs including poll, select, ppoll, pselect, epoll_wait, epoll_wait2 and in future kevent and io_uring. Previously we had one util for each format that both worked out what the timeout should be and converted it into the particular format. This duplicates some logic and it also makes it awkward to modify the timeout value (since there's no common format). Modifying the timeout value is exactly what we want to do, in a subsequent commit, where we want to adjust the timeout to take account of idle GC. - - - - - a65d0b02 by Duncan Coutts at 2026-11-30T04:10:40-05:00 Update the old select I/O manager to use the new timeout utils This will make it much easier to adjust the timeout to take account of idle GC. - - - - - 46ae539f by Duncan Coutts at 2026-11-30T04:10:40-05:00 Add opportunistic deadlock detection without idle GC Our general design is now that comprehensive deadlock detection relies on idle GC. This allows us to detect partial deadlocks that are not system deadlocks. But it's not prompt. It's a nice to have feature to be able to promptly detect the cases that are system deadlocks. There's no hope to do this in the threaded RTS with -N > 1, but it can be done for the non-threaded RTS and _could_ be done for the threaded RTS with -N1. We can integrate this feature into the general design without too many contortions. We just need the I/O managers to check before sleeping if they would be about to sleep indefinately with no I/O and no registered signal handlers. If so, they can notify the idle GC that we're deadlocked and we schedule and idle GC. - - - - - 9f964bcf by Duncan Coutts at 2026-11-30T04:10:41-05:00 Add idle GC mode for !HAVE_PREEMPTION We have to do idle GC (and thus deadlock detection) differently when we do not have the ticker and the ability to interrupt the I/O manager when it's blocking. - - - - - 257f8e57 by Duncan Coutts at 2026-11-30T04:10:41-05:00 Add and use USED_IF_PREEMPTION to avoid warnings - - - - - 5d077511 by Duncan Coutts at 2026-11-30T04:10:41-05:00 Add performDeadlockDetection and export via ghc-experimental When documenting the idle GC and deadlock detection behaviour in the user guide, it becomes obiovus that in some cases one would want manual control over deadlock detection. In particular, for applications that disable idle GC, for debugging or robustness, they may want to invoke deadlock detecting GC manually. Bind it in ghc-internal GHC.Internal.System.Mem and re-export via ghc-experimental in System.Mem.Experimental. It is clearly implementation specific behaviour, especially since in GHC the deadlock detection is tied to doing a major GC. - - - - - 7dc34c0f by Duncan Coutts at 2026-11-30T04:10:41-05:00 Add tests for deadlock detection, issue #26408 We have three tests: T26408a: make sure that we can detect a /partial deadlock/ that is not also a /system deadlock/ T26408b: make sure that we can detect a /system deadlock/ promptly without relying on idle GC T26408c: make sure that we do not falsely detect a deadlock when there is nothing to do except wait on signals T26408d: test that performDeadlockDetection works T26408e: make sure that we can detect a system deadlock with idle GC disabled, after the idle GC timeout has elapsed. T26408f: same as e but with manually invoked major GC - - - - - ed9cc1f5 by Duncan Coutts at 2026-11-30T04:10:41-05:00 Update the user guide with the revised idle GC behaviour It's now not just for the threaded RTS, but general. Add a new section in the RTS chapter: Idle GC and deadlock detection. Provide general documentation on both topics. In particular, document the behaviour of deadlock detection and how it depends on idle GC. Move the existing entries for -I and -Iw to this section. Add a changelog entry. - - - - - 75d87e51 by Simon Peyton Jones at 2026-11-30T04:11:23-05:00 Make pushCast pure, and move it to Simplify.Utils pushCast and pushCastMCo were in the SimplM monad, but no longer do anything monadic. (Historically, pushing a coercion into an argument used to simplify that argument; but now the coercion is recorded in the sc_cast field of ApplyToVal.) This patch makes them pure functions, and moves them, together with addCastMCo, optOutCoercion and Note [The sc_cast field of ApplyToVal], from GHC.Core.Opt.Simplify.Iteration to GHC.Core.Opt.Simplify.Utils, alongside the SimplCont type they manipulate. No change in behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 52207c2f by Simon Peyton Jones at 2026-11-30T04:11:23-05:00 Lambda and case binders have vanilla IdInfo (#27965) Lambda binders, case binders, and case-alternative binders should never have RULES, a (non-default) inline pragma, or a stable unfolding. See new Note [Core binder IdInfo invariants] in GHC.Core, which lays out the invariants. This patch * Makes Core Lint check the invariant, using the new predicate GHC.Types.Id.lamBndrInfoOK. * Fixes the desugarer, which violated it. For a strict binding let !x = rhs in body we generate let x = rhs in case x of x { DEFAULT -> body } re-using x (shadowed) as the case binder; see Note [Desugar Strict binds]. But the case binder inherited x's IdInfo, including, say, a NOINLINE pragma (e.g. `res1` in GHC.Internal.Control.Monad.ST.Lazy.Imp). Now GHC.HsToCore.Utils.seqVar gives the case binder vanilla IdInfo. This was not just a matter of taste. For example h fm s = let {-# NOINLINE res1 #-} !res1 = fm s !(f, s') = res1 in (f+1, s') The NOINLINE case binder becomes a NOINLINE alias `let res3 = res2`, which is never inlined, and survives (as a silly join point) into the final code. * Fixes the Simplifier, which could violate it when duplicating a StrictBind continuation, which makes a join point let x = <> in b ==> join j x = b in j <> If x has any IdInfo that isn't allowed in a lambda-binder, we now zap the IdInfo in the join point: let x = <> in b ==> join j x' = b in j <> where x' is like x (definitely the same unique) but with zapped IdInfo. See (SB3) in Note [StrictBind]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 6c168645 by Simon Peyton Jones at 2026-11-30T04:11:23-05:00 Add varIsHNF, and use it in move_transit_vars `varIsHNF v` is the same as `exprIsHNF (Var v)`, but avoids building the Var only to take it apart. The (Var v) case of exprIsHNFlike now uses the shared varIsHNFlike, so the two cannot drift apart. In GHC.Core.Opt.WorkWrap.Utils.move_transit_vars we had the guard isUnliftedType var_ty || exprIsHNF (Var var) but exprIsHNF is already True of variables of (definitely) unlifted type, so the isUnliftedType test was redundant. Now it is just (varIsHNF var). Also make `exprIsHNFlike` treat an application with no value arguments, such as `f @Int`, exactly like the bare variable `f`, by going through varIsHNFlike. Otherwise no change in behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 7519ed3c by Simon Peyton Jones at 2026-11-30T04:11:23-05:00 Use SimplClo for the argument of ApplyToVal This patch renames SimplSR to SimplClo (a "closure"), and uses it not only as the range of the Simplifier's substitution, but also as the argument of an ApplyToVal continuation. ApplyToVal used to have three fields sc_env :: StaticEnv sc_arg :: CoreExpr sc_cast :: MOutCoercion but now has just sc_dup :: DupFlag sc_arg :: SimplClo An un-simplified argument is (ContEx env arg mco), and an already-simplified one is (DoneEx arg _). See Note [The argument of ApplyToVal] in GHC.Core.Opt.Simplify.Utils. The main payoff is that, since the substitution maps an Id to a SimplClo, beta-reduction can substitute the argument for the lambda binder without further ado. Accordingly, preInlineUnconditionally is split into * preInlineLetUnconditionally, for let-bindings * preInlineBetaUnconditionally, for beta-redexes, which takes a SimplClo The latter omits some checks that cannot fire for lambda binders. Other notes * The new (ContEx env arg mco) form makes it easy to push a cast into an argument (mkCloCastMCo), whether or not it has been simplified. See Note [The MOutCoercion field of ContEx]. * `preInlineUnconditionally` gets split into two variants, one for let-bindings and one for beta-reduction (which takes a `SimplClo`). There is a little bit of duplication here, but not much. * Fixes #27962. The simplifier was previously dropping a cast when dealing with runRW#. The new `SimplClo` makes that bug much harder to allow. * Fixes #27963. contOutArgs, which supplies the arguments for Plan (BEFORE) rule matching, ignored the sc_cast field of ApplyToVal. So in (f |> co) n ==> f (n |> co1) -- co1 in sc_cast a rule for `f` saw `f n` rather than `f (n |> co1)`, and failed to match (the rule matcher checks the types of template variables). If f's unfolding is active, f may then be inlined, and the rule is lost for good. Now contOutArgs uses simplCloExpr, which includes the pending cast. Almost no change in behaviour, except for the #27963 bug-fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - e274a92b by Simon Peyton Jones at 2026-11-30T04:11:23-05:00 Add splitThunkCpr This commit adds GHC.Core.Opt.WorkWrap.splitThunkCpr, which adds a form of "thunk splitting" for strict bindings that have CPR information. See Note [Thunk splitting] in WorkWrap.hs for the details. It catches a previously-unrecognised optimisation opportunity (see #28158) but it only helps in fairly obscure cases, so I don't expect a big impact in practice. As usually I did lots of refactoring along the way. LLM disclosure: lots of interaction with Claude, but I wrote all the code and comments. - - - - - 309b7f0e by sheaf at 2026-11-30T04:12:13-05:00 Make FunDepEqns a non-empty list This avoids creating a 'FunDepEqns' with no equations. This means that consumers dealing with [FunDepEqns] can reliably use "null fun_dep_eqns" to decide whether there are any equations. - - - - - 9bb95671 by sheaf at 2026-11-30T04:12:14-05:00 tryFamEqFunDeps: (CF1) only for closed tyfams This commit makes (CF1) in Note [Exploiting closed type families] only apply to *closed* type families, not *open* type families. This allows the program reported in #28082 to continue to be accepted, fixing a regression. Fixes #28082 - - - - - 51e14298 by Sylvain Henry at 2026-11-30T04:13:04-05:00 x86-64 NCG: check that address displacements fit in 32 bits (#28105) Three clauses of getAmode put a constant in the displacement of an address without a valid check that it fits in a signed 32-bit integer, so the assembler rejected the module: - x + ((y << shift) + offset): the guard checked the offset only for shift 3, because && binds tighter than ||. - CmmRegOff x offset + (y << shift): no check. - x - lit: the guard checked lit, but the displacement is -lit, which does not fit for lit = -2^31. Each clause now checks the constant that goes in the displacement and narrows it to the target word width, as litToImm does: the Integer of a CmmInt can be out of the range of its width, and truncation with the host Int is wrong for a 64-bit host that compiles for a 32-bit target. When the constant does not fit, the clause does not match and a later clause computes it in a register. See Note [Displacements fit in 32 bits]. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - 8aca9c73 by David Eichmann at 2026-11-30T04:13:46-05:00 testsuite: fix framework failure on window for tests using all_available_io_managers_except() - - - - - 2858a265 by David Eichmann at 2026-11-30T04:13:46-05:00 testsuite: use `all_available_io_managers` for various tests Affected tests: * T10590 * T21969 * T21969a * T21969b * T21969c * T21969d * T21969e * T21969f - - - - - ef652c33 by Sylvain Henry at 2026-11-30T04:14:36-05:00 testsuite: Do not pass $(WAY_FLAGS) to GHCi in Makefile tests (#28166) Since 543c108e6a9 the driver sets WAY_FLAGS for Makefile tests. Some GHCi tests passed $(WAY_FLAGS) to ghc --interactive, where it was empty before. In the optasm and optllvm ways it now contains -O, and the byte-code backend ignores -O with a -Winconsistent-flags warning. This warning made the tests fail. Pass $(WAY_FLAGS) to the compilation steps only. GHCi reuses the object files that these steps make with -O, thus the tests stay useful in the optimised ways. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - 56abdcf4 by Alan Zimmerman at 2026-11-30T04:15:17-05:00 EPA: Introduce LayoutFrame stacks in ExactPrint state The exact print process keeps the current layout offset in its state, for use in printing and updating for makeDelta. Update it to use a stack rather than a single value, so it properly handles nested layout, in particular when the layout is introduced but the printing is empty. Also simplify the exact print repl test runner to use a relative path to the GHC libdir. - - - - - 3987cbbd by Duncan Coutts at 2026-11-30T16:15:51+00:00 Move data FunctionOrData from GHC.Types.Basic to .ForeignCall It makes more sense here, and we will soon use it in other related types in this module. Adjust all the other imports. - - - - - 4f551966 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Rename type FunctionOrData to ForeignLabelIsFunctionOrData And its constructors from IsFunction | IsData to ForeignLabelIsFunction | ForeignLabelIsData This name better fits the names of the related types that it is used with. - - - - - 198605ba by Duncan Coutts at 2026-11-30T16:15:51+00:00 Change dsCCall to take a CCallSpec and change callers as appropriate. There should be no semantic change. It's just moving the CCallSpec construction into the two callers. It is currently only used by the C & JS functions that generate code for the foreign import wrapper constructs (in the call to createAdjustor). - - - - - 189ac21b by Duncan Coutts at 2026-11-30T16:15:51+00:00 Change calls to createAdjustor to specify that it comes from the rts Previously it said TargetIsInThisUnit, meaning that createAdjustor lives in the local library. This is false since createAdjustor is defined in the RTS. In practice, this false source information did not matter because the source information is not used (yet). However in future it will be, for better Windows DLL support (which does care about such distinctions). It doesn't really matter that we say it's the RTS (though that is actually true), what's important is that it will always be external to the current shared library. - - - - - aa96cf89 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Remove unused TargetIsInThisUnit case from CCallStaticTargetUnit The CCallStaticTargetUnit infortmation in the XStaticTarget (TTG exstension point) is actually pretty dubious. Historically it was a (Maybe Unit) and the comments say that it is only used by out-of-line primop calls on Windows. Indeed it is only used on Windows for the dynamic way, when each unit is built as a separate DLL (which we currently do not support). And even in that hypothetical situation, the information that actually gets filled in is completely bogus. It _could_ be used in the windows dll case to correctly distinguish making an out-of-line call to a cmm primop that is defined in the current dll or in an external dll. But the information gets filled in in the renaming phase with the _current_ unit. This is blatently wrong. Many out-of-line primops are defined in the rts, which is obviously not the current unit. It _could_ be a reasonable default, that cmm primops are expected to be in the current dll, but we would have to have support to specify a different location, i.e. the rts. Furthermore, in addition to TargetIsInThisUnit being unused (after the previous patch) it should never be used because it uses an implicit "this" which will be wrong as soon as the information is inlined across units. Instead of an implicit unit, it should use an explicit unit which can be initialised to the defining unit and then be compared later to the current unit. This will work correctly when looking at unfoldings across unit boundaries. - - - - - 4e2d4d6b by Duncan Coutts at 2026-11-30T16:15:51+00:00 Rename CCallStaticTargetUnit to CLabelTargetLibrary And the constructor TargetIsInThat to CLabelTargetInUnit. We will end up using this type both for calls and for labels/addresses (used in core literals), so adjust the name to be about C names/labels rather than about calls specifically. Also improve related code docs. And introduce a conversion function from CLabelTargetLibrary to ForeignLabelSource. We will extend this conversion when we add more constructors to CLabelTargetLibrary. - - - - - b22a81e6 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Change data PrimOp to use a UnitId rather than Unit This simplifies the conversions slightly, but more importantly in a later change we are going to want to specify a unit where we will only have a UnitId to hand, not a Unit. - - - - - 3265547e by Duncan Coutts at 2026-11-30T16:15:51+00:00 Extend 'foreign import prim' syntax to allow specifying the source package that is: the package where the cmm entity comes from. The package name is stashed in the "header" field for the FFI call, and then the renamer resolves the package name to a unit id (with a new ghc error for the failure of the package name resolution). Fixes issue #27206 Adds test case T27206 - - - - - b756ca42 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Use new package name syntax for primops from the RTS foreign import prim "rts stg_thething" Most uses of foreign import prim in the libraries are for primops defined in .cmm files local to that library, but some import primops defined in the rts. These cases should use the new syntax to specify the package name in the ffi entity string. - - - - - ae81b8ef by Duncan Coutts at 2026-11-30T16:15:51+00:00 Change labelDynamic to labelLinkerUnit and refine the question it answers Previously asked a very vague question: -- | Does a 'CLabel' need dynamic linkage? given the plethora of platforms and linking schemes, this is not a question with a yes/no answer in general. Instead we change the question to this: -- | Does the target entity of a 'CLabel' live in the same linker unit -- as the given module? This _does_ have a clear meaning across platforms. (The notion of what a linker unit is is platform dependent it is relatively consistent). We also change the answer from Bool to a new type: data LabelLinkerUnit = LinkerUnitLocal | LinkerUnitExternal In a subsequent change we will extend this type to admit a third answer: unknown, could be either local or external. This is the case arising from all user-written FFI declarations. Update the callers: SRT generation and PIC.howToAccessLabel The latter will need more work to do nicely, which we'll do in a subsequent patch. - - - - - 9a95fe5c by Duncan Coutts at 2026-11-30T16:15:51+00:00 Extend LabelLinkerUnit with a third case: unknown For user-written FFI calls, we never know where the target of the label lives: it could live in the local linker unit or it could be external. This case was not accounted for in the old labelDynamic function. Callers need to decide if they want to know about all three cases, or just want to know for sure that something is local, or for sure that something is external and thus they can bundle the unknown case into the negative. - - - - - 98dd7997 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Update use of labelLinkerUnit in howToAccessLabel for unknown case Since "is it external or local" is not a yes/no question anymore, due to the "dunno, could be either" case, we update all the uses of labelLinkerUnit in howToAccessLabel so that should do the right thing for the unknown case. In practice, the unknown case doesn't _yet_ reach howToAccessLabel for non-win32 platforms because for the one case where it will occurr -- in foreign calls -- labelLinkerUnit defines this always to be LinkerUnitExternal for all platforms other than OSMinGW32. But nevertheless, this brings us a step closer to accuracy in howToAccessLabel, should we want to be more precise for foreign calls. - - - - - 46da63eb by Duncan Coutts at 2026-11-30T16:15:51+00:00 Extend ForeignLabelSource with ForeignLabelInUnknownPackage case Initially this is treated the same way as ForeignLabelInExternalPackage. Later we will extend this for Windows/PE to support building each Haskell unit as a separate DLL, to support this unknown case specifically. - - - - - 060157ae by Duncan Coutts at 2026-11-30T16:15:51+00:00 Extend CLabelTargetLibrary with CLabelTargetUnknown case Initially unused, but this will become the typical case, because in fact when Haskell code uses ffi imports, we do not know where the name comes from: we do not know if the named entity is defined in the current shared lib or in another one. Knowing where C entities come from is the exception rather than the rule. - - - - - 761ee263 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Extend LitLabel with CLabelTargetLibrary Bundle the three fields of LitLabel into a new data CLabelSpec, defined in GHC.Types.ForeignCall Apart from the binary format, this should not change behaviour. Behaviour changes are in the next patch - - - - - dcd2f2cb by Duncan Coutts at 2026-11-30T16:15:51+00:00 Reorder and group related declarations in ForeignCall module It was all a bit of a jumble. - - - - - 04bda2a0 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Remove redundant util ccallConvAttribute and unused defaultCCallConv Historically, the stdcall calling convention required special treatment when constructing calls in the via-C backend, to declare the C prototype with the right attributes to tell the C compiler what call convention to use. We no longer support stdcall. Now ccallConvAttribute returns empty for every calling convention, or panics. So it is no longer useful. The defaultCCallConv was unused. - - - - - 0257356d by Duncan Coutts at 2026-11-30T16:15:51+00:00 Add Note [Tracking labels' target libraries] and [Tracking labels' target type] and reference these notes elsewhere. - - - - - 236f6fcd by Duncan Coutts at 2026-11-30T16:15:51+00:00 Change FFI imports to use CLabelTargetUnknown We never know the target for normal foreign imports. Historically, this information was only actually used for "foreign import prim", and only on Windows when building with one DLL per unit (which bitrotted). The previous default of using the current package as the source was wrong, even for the limited case of Windows DLLs, because many of the imports are for primops defined in the RTS, which is certainly not the current package. - - - - - 294e6d14 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Pass through the label source in stg->cmm conversion Previously we had to hard code the (often incorrect) source ForeignLabelInThisPackage. Now the Core label literal representation carries the source, so we just convert that and pass it down. As a consequence, if the source will now be either ForeignLabelInUnknownPackage or ForeignLabelInPackage. The typical value will be ForeignLabelInUnknownPackage, since that's what we get for FFI imports of addresses. In practice is not an immediate change of behaviour, because the only user of this information is on Windows when building each Haskell unit as a separate DLl, which isn't (yet) supported. - - - - - b63c3aa5 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Fix source for generated C name for 'foreign import "wrapper"' For a 'foreign import "wrapper"' construct we generate a local wrapper C function. We need to refer to the name of this local C function. We _know_ that this function lives in the local shared lib, because it is compiled into the same library. Thus we set the label source to be CLabelTargetInUnit. - - - - - 6874e5a0 by Duncan Coutts at 2026-11-30T16:15:51+00:00 Fix source for generated C name for 'foreign import capi' For a 'foreign import capi' we generate a local wrapper function and then call that. We need to refer to the name of this local C function. We _know_ that this function lives in the local shared lib, because it is compiled into the same library. Thus we set the label source to be CLabelTargetInUnit. - - - - - f7f4083e by David Eichmann at 2026-11-30T16:15:51+00:00 Documentation: foreign imports of Cmm code must now specify source package but the current package is the default. - - - - - 608 changed files: - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - + changelog.d/21969 - + changelog.d/26169.md - + changelog.d/27694 - + changelog.d/27821 - + changelog.d/27892 - + changelog.d/28002-leb128 - + changelog.d/28080 - + changelog.d/28101 - + changelog.d/28105 - + changelog.d/T26754 - + changelog.d/T27137 - + changelog.d/T27212 - + changelog.d/T27637 - + changelog.d/T27862 - + changelog.d/T27962 - + changelog.d/T27963 - + changelog.d/T28082 - + changelog.d/T28123 - + changelog.d/T28135 - + changelog.d/T9809-timer-manager-contention - changelog.d/allow-gadt-prefix-con-parens - + changelog.d/fingerprint-caches-with-fast-string-keys - + changelog.d/fix-aarch64-veneer-target-16686 - + changelog.d/fix-copyarray-nonmoving-barrier-27376 - + changelog.d/fix-heap-census-pinned-blocks.md - + changelog.d/foreign-import-prim-with-package.md - + changelog.d/gadt-curried-contexts-27424 - + changelog.d/idle-gc-and-deadlock-detection - + changelog.d/iserv-no-gc-sections.md - + changelog.d/make-depends-deprecate-doMkDependHS - + changelog.d/make-depends-json - + changelog.d/make-depends-link-nodes - + changelog.d/make-depends-multiple-home-units - + changelog.d/make-depends-streaming-output - + changelog.d/ncg-reg-usage.md - changelog.d/ncg-x86-bit-test-instructions - + changelog.d/remove-long-deprecated-flags.md - + changelog.d/stage3-cross-bindists - compiler/GHC/Builtin/PrimOps.hs - compiler/GHC/Builtin/WiredIn/Ids.hs - compiler/GHC/ByteCode/Asm.hs - compiler/GHC/ByteCode/Binary.hs - compiler/GHC/ByteCode/Serialize.hs - compiler/GHC/Cmm.hs - compiler/GHC/Cmm/CLabel.hs - compiler/GHC/Cmm/CommonBlockElim.hs - compiler/GHC/Cmm/ContFlowOpt.hs - compiler/GHC/Cmm/Info/Build.hs - compiler/GHC/Cmm/Node.hs - compiler/GHC/Cmm/Parser.y - compiler/GHC/Cmm/Pipeline.hs - compiler/GHC/Cmm/ThreadSanitizer.hs - compiler/GHC/CmmToAsm.hs - compiler/GHC/CmmToAsm/AArch64/CodeGen.hs - compiler/GHC/CmmToAsm/AArch64/Instr.hs - compiler/GHC/CmmToAsm/BlockLayout.hs - compiler/GHC/CmmToAsm/CFG.hs - compiler/GHC/CmmToAsm/Instr.hs - compiler/GHC/CmmToAsm/LA64/CodeGen.hs - compiler/GHC/CmmToAsm/LA64/Instr.hs - compiler/GHC/CmmToAsm/Monad.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/RV64/CodeGen.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/Linear/JoinToTargets.hs - compiler/GHC/CmmToAsm/Reg/Liveness.hs - + compiler/GHC/CmmToAsm/RegUsage.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/CmmToC.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Make/Box.hs - compiler/GHC/Core/Map/Expr.hs - compiler/GHC/Core/Map/Type.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Pipeline.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Inline.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Ppr.hs - compiler/GHC/Core/TyCo/Make.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Config/Core/Opt/Simplify.hs - compiler/GHC/Driver/Downsweep.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Main/Compile.hs - compiler/GHC/Driver/Main/Passes.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Driver/Session/Units.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Arrows.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Expr.hs-boot - compiler/GHC/HsToCore/Foreign/C.hs - compiler/GHC/HsToCore/Foreign/Call.hs - compiler/GHC/HsToCore/Foreign/JavaScript.hs - compiler/GHC/HsToCore/Foreign/Wasm.hs - compiler/GHC/HsToCore/Match.hs - compiler/GHC/HsToCore/Match/Literal.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/HsToCore/Pmc.hs - compiler/GHC/HsToCore/Pmc/Desugar.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/HsToCore/Ticks.hs - compiler/GHC/HsToCore/Usage.hs - compiler/GHC/HsToCore/Utils.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Iface/Recomp.hs - compiler/GHC/Linker/ByteCode.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Linker/Executable.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Types.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/Errors/Ppr.hs - compiler/GHC/Parser/Errors/Types.hs - compiler/GHC/Parser/Header.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/Rename/Utils.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Runtime/Interpreter/C.hs - compiler/GHC/Stg/Make.hs - compiler/GHC/StgToByteCode.hs - compiler/GHC/StgToCmm/Bind.hs - compiler/GHC/StgToCmm/Closure.hs - compiler/GHC/StgToCmm/Foreign.hs - compiler/GHC/StgToCmm/Lit.hs - compiler/GHC/StgToCmm/Prim.hs - compiler/GHC/StgToJS/FFI.hs - compiler/GHC/StgToJS/Literal.hs - compiler/GHC/Tc/Deriv/Functor.hs - compiler/GHC/Tc/Deriv/Generate.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/Arrow.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Match.hs - compiler/GHC/Tc/Instance/FunDeps.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Tc/Solver.hs - compiler/GHC/Tc/Solver/FunDeps.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/TyCl/PatSyn.hs - compiler/GHC/Tc/Zonk/Type.hs - compiler/GHC/ThToHs.hs - compiler/GHC/Types/Basic.hs - compiler/GHC/Types/Cpr.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Types/ForeignCall.hs - compiler/GHC/Types/Id.hs - compiler/GHC/Types/Id/Info.hs - compiler/GHC/Types/Literal.hs - compiler/GHC/Types/Literal/Floating.hs - compiler/GHC/Types/Tickish.hs - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Finder/Types.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/Json.hs - compiler/GHC/Utils/Logger.hs - compiler/GHC/Utils/Monad.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/Expr.hs - compiler/Language/Haskell/Syntax/Type.hs - compiler/ghc.cabal.in - + distrib/configure.ac - docs/users_guide/codegens.rst - docs/users_guide/debug-info.rst - docs/users_guide/expected-undocumented-flags.txt - docs/users_guide/exts/control.rst - docs/users_guide/exts/ffi.rst - docs/users_guide/exts/gadt_syntax.rst - docs/users_guide/exts/pragmas.rst - docs/users_guide/exts/qualified_strings.rst - docs/users_guide/ghc.rst - + docs/users_guide/make-depends-json-schema-1_0.json - docs/users_guide/profiling.rst - docs/users_guide/runtime_control.rst - docs/users_guide/separate_compilation.rst - docs/users_guide/using-optimisation.rst - − docs/users_guide/what_glasgow_exts_does.rst - ghc/GHCi/UI.hs - ghc/Main.hs - hadrian/src/BindistConfig.hs - hadrian/src/Oracles/Setting.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/Generate.hs - hadrian/src/Settings/Builders/RunTest.hs - hadrian/src/Settings/Packages.hs - libraries/base/src/Data/Foldable.hs - libraries/base/tests/.gitignore - + libraries/base/tests/T9809.hs - libraries/base/tests/all.T - libraries/ghc-boot/GHC/Serialized.hs - libraries/ghc-experimental/src/System/Mem/Experimental.hs - libraries/ghc-internal/src/GHC/Internal/AllocationLimitHandler.hs - libraries/ghc-internal/src/GHC/Internal/Conc/IO.hs - libraries/ghc-internal/src/GHC/Internal/Event/Manager.hs - libraries/ghc-internal/src/GHC/Internal/Event/Thread.hs - libraries/ghc-internal/src/GHC/Internal/Event/TimerManager.hs - libraries/ghc-internal/src/GHC/Internal/Prim/Ext.hs - libraries/ghc-internal/src/GHC/Internal/Prim/Panic.hs - libraries/ghc-internal/src/GHC/Internal/System/Mem.hs - libraries/ghci/GHCi/Run.hs - rts/Capability.c - rts/IOManager.c - rts/IOManager.h - + rts/IdleGC.c - + rts/IdleGC.h - rts/Linker.c - rts/LinkerInternals.h - rts/PrimOps.cmm - rts/ProfHeap.c - rts/RtsFlags.c - rts/RtsSignals.h - rts/RtsStartup.c - rts/RtsSymbols.c - rts/RtsSymbols.h - rts/RtsUtils.c - rts/Schedule.c - rts/Schedule.h - rts/Stats.c - rts/Stats.h - rts/StgCRun.c - rts/Timer.c - rts/include/Cmm.h - rts/include/Rts.h - rts/include/rts/OSThreads.h - + rts/include/rts/RtsSymbols.h - rts/include/rts/storage/GC.h - rts/js/environment.js - rts/linker/PEi386.c - rts/linker/elf_reloc_aarch64.c - rts/posix/Poll.c - rts/posix/Poll.h - rts/posix/Select.c - rts/posix/SelectBis.c - rts/posix/SelectBis.h - rts/posix/Signals.c - − rts/posix/Signals.h - rts/posix/Timeout.c - rts/posix/Timeout.h - rts/rts.cabal - rts/sm/GC.c - rts/sm/GCThread.h - rts/sm/NonMovingMark.c - rts/win32/AsyncMIO.c - rts/win32/AsyncMIO.h - rts/win32/AsyncWinIO.c - rts/win32/AsyncWinIO.h - rts/win32/AwaitEvent.c - rts/win32/ConsoleHandler.c - rts/win32/ConsoleHandler.h - testsuite/README.md - testsuite/config/ghc - testsuite/driver/junit.py - testsuite/driver/my_typing.py - testsuite/driver/runtests.py - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/driver/testutil.py - testsuite/mk/test.mk - testsuite/tests/ado/T22483.stderr - + testsuite/tests/annotations/should_run/SerializedRoundTrip.hs - + testsuite/tests/annotations/should_run/SerializedRoundTrip.stdout - + testsuite/tests/annotations/should_run/SerializedRoundTrip.stdout-ws-32 - testsuite/tests/annotations/should_run/T16841.stdout - testsuite/tests/annotations/should_run/all.T - + 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/codeGen/should_compile/T27694.hs - + testsuite/tests/codeGen/should_compile/T27694c.hs - + testsuite/tests/codeGen/should_compile/T27694d.hs - + testsuite/tests/codeGen/should_compile/T28105.cmm - + testsuite/tests/codeGen/should_compile/T28105b.hs - testsuite/tests/codeGen/should_compile/all.T - + testsuite/tests/codeGen/should_gen_asm/T27688.asm - + testsuite/tests/codeGen/should_gen_asm/T27688.hs - + testsuite/tests/codeGen/should_gen_asm/T27688b.asm - + testsuite/tests/codeGen/should_gen_asm/T27688b.cmm - testsuite/tests/codeGen/should_gen_asm/all.T - + testsuite/tests/codeGen/should_run/T27694b.hs - + testsuite/tests/codeGen/should_run/T27694b.stdout - + testsuite/tests/codeGen/should_run/T27915.hs - + testsuite/tests/codeGen/should_run/T27915.stdout-ws-32 - + testsuite/tests/codeGen/should_run/T27915.stdout-ws-64 - testsuite/tests/codeGen/should_run/all.T - testsuite/tests/concurrent/should_run/T21969.hs - + testsuite/tests/concurrent/should_run/T21969a.hs - + testsuite/tests/concurrent/should_run/T21969a.stdout - + testsuite/tests/concurrent/should_run/T21969b.hs - + testsuite/tests/concurrent/should_run/T21969b.stdout - + testsuite/tests/concurrent/should_run/T21969c.hs - + testsuite/tests/concurrent/should_run/T21969c.stdout - + testsuite/tests/concurrent/should_run/T21969d.hs - + testsuite/tests/concurrent/should_run/T21969d.stdout - + testsuite/tests/concurrent/should_run/T21969e.hs - + testsuite/tests/concurrent/should_run/T21969e.stdout - + testsuite/tests/concurrent/should_run/T21969f.hs - + testsuite/tests/concurrent/should_run/T21969f.stdout - testsuite/tests/concurrent/should_run/all.T - + testsuite/tests/concurrent/should_run/registerFd001.hs - + testsuite/tests/concurrent/should_run/registerFd001.stdout - + testsuite/tests/deSugar/should_compile/T27862.hs - + testsuite/tests/deSugar/should_compile/T27862.stderr - + testsuite/tests/deSugar/should_compile/T27862a.hs - + testsuite/tests/deSugar/should_compile/T27862a.stderr - + testsuite/tests/deSugar/should_compile/T27862b.hs - + testsuite/tests/deSugar/should_compile/T27862b.stderr - + testsuite/tests/deSugar/should_compile/T27862c.hs - + testsuite/tests/deSugar/should_compile/T27862c.stderr - + testsuite/tests/deSugar/should_compile/T27862d.hs - + testsuite/tests/deSugar/should_compile/T27862d.stderr - + testsuite/tests/deSugar/should_compile/T28137.hs - + testsuite/tests/deSugar/should_compile/T28137.stderr - testsuite/tests/deSugar/should_compile/all.T - testsuite/tests/deSugar/should_run/dsrun008.stderr - testsuite/tests/dmdanal/sigs/T21888a.stderr - testsuite/tests/driver/Makefile - testsuite/tests/driver/T2464.hs - testsuite/tests/driver/T2464.stderr - testsuite/tests/driver/bytecode-object/Makefile - testsuite/tests/driver/bytecode-object/all.T - + testsuite/tests/driver/bytecode-object/bytecode_object27.stdout - + testsuite/tests/driver/bytecode-object/bytecode_object28.script - + testsuite/tests/driver/bytecode-object/bytecode_object28.stdout - + testsuite/tests/driver/bytecode-object/bytecode_object29.stdout - + testsuite/tests/driver/mkdepend/Makefile - + testsuite/tests/driver/mkdepend/README.md - + testsuite/tests/driver/mkdepend/T24384/A.hs - + testsuite/tests/driver/mkdepend/T24384/C.hs - + testsuite/tests/driver/mkdepend/T24384/C.hs-boot - + testsuite/tests/driver/mkdepend/T24384/D.hs - + testsuite/tests/driver/mkdepend/T24384/E.hs - + testsuite/tests/driver/mkdepend/T24384/dep-internal/DepInternal.hs - + testsuite/tests/driver/mkdepend/T24384/dep-internal/dep-internal.pkg - + testsuite/tests/driver/mkdepend/T24384/dep-public/DepPublic.hs - + testsuite/tests/driver/mkdepend/T24384/dep-public/dep-public.pkg - + testsuite/tests/driver/mkdepend/T24384/dep/Dep.hs - + testsuite/tests/driver/mkdepend/T24384/dep/dep.pkg - + testsuite/tests/driver/mkdepend/T24384/foo.h - + testsuite/tests/driver/mkdepend/T24384/lib/B.hs - + testsuite/tests/driver/mkdepend/T24384/lib/B.hs-boot - + testsuite/tests/driver/mkdepend/T24384/preproc.sh - + testsuite/tests/driver/mkdepend/T24384a.stdout - + testsuite/tests/driver/mkdepend/T24384b.stdout - + testsuite/tests/driver/mkdepend/T24384c.stdout - + testsuite/tests/driver/mkdepend/all.T - + testsuite/tests/driver/mkdepend/format_json.sh - + testsuite/tests/driver/mkdepend/format_makefile.sh - + testsuite/tests/driver/mkdepend/mhu01/a/A/Base.hs - + testsuite/tests/driver/mkdepend/mhu01/a/A/Base.hs-boot - + testsuite/tests/driver/mkdepend/mhu01/a/A/TH.hs - + testsuite/tests/driver/mkdepend/mhu01/a/Util.hs - + testsuite/tests/driver/mkdepend/mhu01/b/B/Normal.hs - + testsuite/tests/driver/mkdepend/mhu01/b/B/Splice.hs - + testsuite/tests/driver/mkdepend/mhu01/b/Util.hs - + testsuite/tests/driver/mkdepend/mhu01/c/C.hs - + testsuite/tests/driver/mkdepend/mhu01/unitA - + testsuite/tests/driver/mkdepend/mhu01/unitB - + testsuite/tests/driver/mkdepend/mhu01/unitC - + testsuite/tests/driver/mkdepend/mhu02/A.hs - + testsuite/tests/driver/mkdepend/mhu02/B.hs - + testsuite/tests/driver/mkdepend/mhu02/pp.sh - + testsuite/tests/driver/mkdepend/mhu02/unitA - + testsuite/tests/driver/mkdepend/mhu02/unitB - + testsuite/tests/driver/mkdepend/mhu03/pkg/A.hs - + testsuite/tests/driver/mkdepend/mhu03/pkg/pp.sh - + testsuite/tests/driver/mkdepend/mhu03/unitA - + testsuite/tests/driver/mkdepend/mhu04/app/Main.hs - + testsuite/tests/driver/mkdepend/mhu04/app/Utils.hs - + testsuite/tests/driver/mkdepend/mhu04/lib/Lib.hs - + testsuite/tests/driver/mkdepend/mhu04/lib/Lib/Internal.hs - + testsuite/tests/driver/mkdepend/mhu04/unitApp - + testsuite/tests/driver/mkdepend/mhu04/unitLib - + testsuite/tests/driver/mkdepend/mhu05/app/Main.hs - + testsuite/tests/driver/mkdepend/mhu05/lib/Lib.hs - + testsuite/tests/driver/mkdepend/mhu05/lib/Lib/Internal.hs - + testsuite/tests/driver/mkdepend/mhu05/test/Spec.hs - + testsuite/tests/driver/mkdepend/mhu05/unitApp - + testsuite/tests/driver/mkdepend/mhu05/unitLib - + testsuite/tests/driver/mkdepend/mhu05/unitTest - + testsuite/tests/driver/mkdepend/mkdepend01.dep-json - + testsuite/tests/driver/mkdepend/mkdepend01.dep-makefile - + testsuite/tests/driver/mkdepend/mkdepend01/A.hs - + testsuite/tests/driver/mkdepend/mkdepend02.dep-json - + testsuite/tests/driver/mkdepend/mkdepend02/Main.hs - + testsuite/tests/driver/mkdepend/mkdepend_bkp_01/bkp01.bkp - + testsuite/tests/driver/mkdepend/mkdepend_mhu01a.dep-json - + testsuite/tests/driver/mkdepend/mkdepend_mhu01a.dep-makefile - + testsuite/tests/driver/mkdepend/mkdepend_mhu01b.stderr - + testsuite/tests/driver/mkdepend/mkdepend_mhu01c.stderr - + testsuite/tests/driver/mkdepend/mkdepend_mhu01d.dep-makefile - + testsuite/tests/driver/mkdepend/mkdepend_mhu01d.stderr - + testsuite/tests/driver/mkdepend/mkdepend_mhu02.dep-json - + testsuite/tests/driver/mkdepend/mkdepend_mhu03.dep-json - + testsuite/tests/driver/mkdepend/mkdepend_mhu04.dep-json - + testsuite/tests/driver/mkdepend/mkdepend_mhu04.dep-makefile - + testsuite/tests/driver/mkdepend/mkdepend_mhu05.dep-json - + testsuite/tests/driver/mkdepend/mkdepend_mhu05.dep-makefile - + testsuite/tests/driver/recomp023/M.hs - + testsuite/tests/driver/recomp023/M2.hs - + testsuite/tests/driver/recomp023/Makefile - + testsuite/tests/driver/recomp023/all.T - + testsuite/tests/driver/recomp023/recomp023.stdout - testsuite/tests/ffi/should_run/T2594.hs - testsuite/tests/ffi/should_run/ffi015.hs - testsuite/tests/ffi/should_run/fptr01.hs - testsuite/tests/ffi/should_run/fptrfail01.hs - − 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/ghc-api/exactprint/T22919.stderr - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr - testsuite/tests/ghci.debugger/scripts/all.T - + testsuite/tests/ghci.debugger/scripts/break037.hs - + testsuite/tests/ghci.debugger/scripts/break037.script - + testsuite/tests/ghci.debugger/scripts/break037.stdout - testsuite/tests/ghci/linking/T25155_iserv_main.c - testsuite/tests/ghci/prog-mhu005/Makefile - testsuite/tests/ghci/prog-mhu006/Makefile - testsuite/tests/ghci/prog-mhu007/Makefile - testsuite/tests/ghci/prog020/Makefile - testsuite/tests/ghci/prog022/Makefile - testsuite/tests/ghci/prog025/Makefile - 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/hpc/fork/test.T - + testsuite/tests/indexed-types/should_compile/T28082.hs - testsuite/tests/indexed-types/should_compile/all.T - testsuite/tests/indexed-types/should_fail/SkolemOccursLoop.hs - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 - testsuite/tests/lib/base/all.T - testsuite/tests/module/mod185.stderr - 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.hs - 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/T20846.stderr - testsuite/tests/perf/compiler/hard_hole_fits.stderr - testsuite/tests/perf/compiler/large-project/all.T - + testsuite/tests/perf/compiler/large-project/large-project-mhu.sh - testsuite/tests/perf/should_run/T7257.hs - testsuite/tests/perf/should_run/T7257.stdout - testsuite/tests/pmcheck/should_compile/T24234.stderr - + testsuite/tests/pmcheck/should_compile/T27892a.hs - + testsuite/tests/pmcheck/should_compile/T28095.hs - testsuite/tests/pmcheck/should_compile/all.T - testsuite/tests/primops/should_run/all.T - + testsuite/tests/printer/Layout.hs - testsuite/tests/printer/Makefile - testsuite/tests/printer/T18052a.stderr - testsuite/tests/printer/T18791.stderr - + testsuite/tests/printer/T27424c.hs - testsuite/tests/printer/Test20297.hs - testsuite/tests/printer/Test20297.stdout - testsuite/tests/printer/Test24533.stdout - testsuite/tests/printer/all.T - testsuite/tests/profiling/should_run/Makefile - testsuite/tests/profiling/should_run/T7275.stdout - + testsuite/tests/rename/should_fail/T27206.hs - + testsuite/tests/rename/should_fail/T27206.stderr - testsuite/tests/rename/should_fail/all.T - testsuite/tests/rts/IOManager.hsc - testsuite/tests/rts/Makefile - testsuite/tests/rts/T17088.hs - + testsuite/tests/rts/T26169.hs - + testsuite/tests/rts/T26408a.hs - + testsuite/tests/rts/T26408a.stderr - + testsuite/tests/rts/T26408b.hs - + testsuite/tests/rts/T26408b.stderr - + testsuite/tests/rts/T26408c.hs - + testsuite/tests/rts/T26408c.stdout - + testsuite/tests/rts/T26408d.hs - + testsuite/tests/rts/T26408d.stderr - + testsuite/tests/rts/T26408e.hs - + testsuite/tests/rts/T26408e.stderr - + testsuite/tests/rts/T26408f.hs - + testsuite/tests/rts/T26408f.stderr - + testsuite/tests/rts/T27376.hs - + testsuite/tests/rts/T27376.stdout - testsuite/tests/rts/all.T - + testsuite/tests/rts/census_pinned.hs - + testsuite/tests/rts/census_pinned.stdout-ws-32 - + testsuite/tests/rts/census_pinned.stdout-ws-64 - + testsuite/tests/rts/census_pinned.stdout-ws-64-mingw32 - 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/rts/symbols/Main.hs - + testsuite/tests/rts/symbols/Makefile - + testsuite/tests/rts/symbols/all.T - + testsuite/tests/rts/symbols/dumpDeclaredSymbols.c - + testsuite/tests/rts/symbols/rts-check-symbols.sh - + testsuite/tests/rts/symbols/rts-check-symbols.stdout - testsuite/tests/simplCore/should_compile/T15445.stderr - testsuite/tests/simplCore/should_compile/T16122.stderr - testsuite/tests/simplCore/should_compile/T24726.stderr - + testsuite/tests/simplCore/should_compile/T27212.hs - + testsuite/tests/simplCore/should_compile/T27892.hs - + testsuite/tests/simplCore/should_compile/T27892.stderr - + testsuite/tests/simplCore/should_compile/T27962.hs - + testsuite/tests/simplCore/should_compile/T27963.hs - + testsuite/tests/simplCore/should_compile/T27963.stderr - + testsuite/tests/simplCore/should_compile/T27965.hs - + testsuite/tests/simplCore/should_compile/T27965a.hs - + testsuite/tests/simplCore/should_compile/T27965b.hs - + testsuite/tests/simplCore/should_compile/T28095a.hs - + testsuite/tests/simplCore/should_compile/T28095a.stderr - + testsuite/tests/simplCore/should_compile/T28158.hs - + testsuite/tests/simplCore/should_compile/T28158.stderr - testsuite/tests/simplCore/should_compile/all.T - 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/T27826.hs - testsuite/tests/th/all.T - + testsuite/tests/typecheck/should_compile/T28135.hs - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_fail/tcfail203a.stderr - + testsuite/tests/vdq-rta/should_compile/T28123.hs - testsuite/tests/vdq-rta/should_compile/all.T - utils/check-exact/ExactPrint.hs - utils/check-exact/Main.hs - utils/check-exact/Transform.hs - utils/check-exact/Utils.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/Backends/Hyperlinker/Parser.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/e5140a966ed438814293873e5c34d3e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e5140a966ed438814293873e5c34d3e... 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