-
e92adeb3
by Zubin Duggal at 2026-06-01T13:26:55+05:30
fixup! driver: don't expect nodes to exist when checking paths between them
-
88b8012b
by Zubin Duggal at 2026-06-01T13:27:13+05:30
fixup! Add optional `SrcLoc` to `StackAnnotation` class
-
5c2c77cb
by Zubin Duggal at 2026-06-01T13:27:37+05:30
fixup! Evaluate backtraces for "error" exceptions at the moment they are thrown
-
782e68f0
by Zubin Duggal at 2026-06-09T11:56:45+05:30
fixup! Introduce `-fimport-loaded-targets` GHCi flag
-
e71ce768
by Zubin Duggal at 2026-06-09T12:04:40+05:30
fixup! Avoid infinite loop in deep subsumption
-
27851522
by Zubin Duggal at 2026-06-09T12:10:39+05:30
fixup! Use home unit package db stacks in GHCi prompt and session unit
-
a94fa7cb
by sheaf at 2026-06-09T13:58:17+05:30
Improve incomplete record selector warnings
This commit stops GHC from emitting spurious incomplete record selector
warnings for bare selectors/projections such as .fld
There are two places we currently emit incomplete record selector
warnings:
1. In the desugarer, when we see a record selector or an occurrence
of 'getField'. Here, we can use pattern matching information to
ensure we don't give false positives.
2. In the typechecker, which might sometimes give false positives but
can emit warnings in cases that the pattern match checker would
otherwise miss.
This is explained in Note [Detecting incomplete record selectors]
in GHC.HsToCore.Pmc.
Now, we obviously don't want to emit the same error twice, and generally
we prefer (1), as those messages contain fewer false positives. So we
suppress (2) when we are sure we are going to emit (1); the logic for
doing so is in GHC.Tc.Instance.Class.warnIncompleteRecSel,
and works by looking at the CtOrigin.
Now, the issue was that this logic handled explicit record selectors as
well as overloaded record field selectors such as "x.r" (which turns
into a simple GetFieldOrigin CtOrigin), but it didn't properly handle
record projectors like ".fld" or ".fld1.fld2" (which result in other
CtOrigins such as 'RecordFieldProjectionOrigin').
To solve this problem, we re-use the 'isHasFieldOrigin' introduced in
fbdc623a (slightly adjusted).
On the way, we also had to update the desugarer with special handling
for the 'ExpandedThingTc' case in 'ds_app', to make sure that
'ds_app_var' sees all the type arguments to 'getField' in order for it
to indeed emit warnings like in (1).
Fixes #26686
(cherry picked from commit 52c3e6ba9f03d19a4fa85aee6a4c417b538160f7)
-
aa2b14f6
by sheaf at 2026-06-09T15:09:29+05:30
Only use active rules when simplifying rule RHSs
When we are simplifying the RHS of a rule, we make sure to only apply
rewrites from rules that are active throughout the original rule's
range of active phases.
For example, if a rule is always active, we only fire rules that are
themselves always active when simplifying the RHS. Ditto for inline
activations.
This is achieved by setting the simplifier phase to a range of phases,
using the new SimplPhaseRange constructor. Then:
1. When simplifying the RHS of a rule, or of a stable unfolding,
we set the simplifier phase to a range of phases, computed from
the activation of the RULE/unfolding activation, using the
function 'phaseFromActivation'.
The details are explained in Note [What is active in the RHS of a RULE?]
in GHC.Core.Opt.Simplify.Utils.
2. The activation check for other rules and inlinings is then:
does the activation of the other rule/inlining cover the whole
phase range set in sm_phase? This continues to use the 'isActive'
function, which now accounts for phase ranges.
On the way, this commit also moves the exact-print SourceText annotation
from the Activation datatype to the ActivationAnn type. This keeps the
main Activation datatype free of any extra cruft.
Fixes #26323
(cherry picked from commit 2da84b7a83f723dc6531cdad5ef3c7e624fda2fe)
-
98b91517
by Simon Peyton Jones at 2026-06-09T15:15:26+05:30
Include current phase in the range for rule/unfoldings
This MR fixes a bad loop in the compiler: #26826.
The fix is to add (WAR2) to
Note [What is active in the RHS of a RULE or unfolding?]
in GHC.Core.Opt.Simplify.Utils
(cherry picked from commit 269c4087979ff9d675cd1a59076157211d1c555d)
-
88eec6e6
by Zubin Duggal at 2026-06-09T15:20:13+05:30
fixup! Only use active rules when simplifying rule RHSs
-
127626c2
by Zubin Duggal at 2026-06-09T16:01:02+05:30
fixup! Include current phase in the range for rule/unfoldings
-
1f7b7eb6
by Zubin Duggal at 2026-06-09T16:44:23+05:30
fixup! Improve incomplete record selector warnings
-
dce69b47
by Simon Peyton Jones at 2026-06-09T18:13:37+05:30
QuickLook's tcInstFun should make instantiation variables directly
tcInstFun must make "instantiation variables", not regular
unification variables, when instantiating function types. That was
previously implemented by a hack: set the /ambient/ level to QLInstTyVar.
But the hack finally bit me, when I was refactoring WhatUnifications.
And it was always wrong: see the now-expunged (TCAPP2) note.
This commit does it right, by making tcInstFun call its own
instantiation functions. That entails a small bit of duplication,
but the result is much, much cleaner.
(cherry picked from commit 231adc30be97ae51650aff7a40e00e05f4876af6)
-
f5bb4c7a
by Zubin Duggal at 2026-06-09T18:15:31+05:30
Revert "docs: note #26543 in known bugs"
This reverts commit ebc6d49bd309bb843bc58e8c712ade767818e9ac.
Obsolete now that the fix from MR 14474 (commit 231adc30) is backported.
-
8bb2dbd9
by Luite Stegeman at 2026-06-09T18:50:23+05:30
Fix assert in Interpreter.c
If we skip exactly the number of words on the stack we end up on
the first word in the next chunk.
(cherry picked from commit 404b71c181bde4256565307d495cd2fa124d02f1)
-
d3d880e8
by Ben Gamari at 2026-06-10T10:05:38+05:30
rts/Interpreter: Factor out ctoi tuple info tables into data
Instead of a massive case let's put this into data which we can reuse
elsewhere.
(cherry picked from commit d2b89603425b6d08df199deb7b84cfdbd711869a)
-
983a67a7
by Luite Stegeman at 2026-06-10T10:06:23+05:30
Support arbitrary size unboxed tuples in bytecode
This stores the size (number of words on the stack) of the next
expected tuple in the TSO, ctoi_spill_size field, eliminating
the need of stg_ctoi_tN frames for each size.
Note: On 32 bit platform there is still a bytecode tuple size
limit of 255 words on the stack.
Fixes #26946
(cherry picked from commit a85bd503a480cfa31f5afa09eb38f56c85c237de)
-
55f8acd1
by Luite Stegeman at 2026-06-10T10:06:51+05:30
Add specialized frames for small tuples
Small tuples are now returned more efficiently to the interpreter.
They use one less word of stack space and don't need manipulation
of the TSO anymore.
(cherry picked from commit e2209031734770a51f04883e5b538b562449cba1)
-
89bffe08
by Luite Stegeman at 2026-06-10T10:07:19+05:30
rts: add a few missing i386 relocations in the rts linker
(cherry picked from commit 04d143c02e82e9ca03eb75849959d369d07fb81a)
-
868b341c
by Luite Stegeman at 2026-06-10T10:08:50+05:30
CodeOutput: Fix finalizers on multiple platforms
- ELF platforms: emit .fini_array section
- wasm32/Darwin: emit initializer with __cxa_atexit call
- Windows: use -Wl,--whole-archive to prevent dropping finalizer symbols
- rts linker: fix crash/assertion failure unloading objects with finalizers
fixes #27072
(cherry picked from commit 014087e7a5753687161a24a1b2bc55c7bf7273fd)
-
ddc0fb98
by Ben Gamari at 2026-06-10T11:00:27+05:30
ghc-internal: Move STM utilities out of GHC.Internal.Conc.Sync
This is necessary to avoid an import cycle on Windows when importing
`GHC.Internal.Exception.Context` in `GHC.Internal.Conc.Sync`.
On the road to address #25365.
(cherry picked from commit 039bac4cf9590a6a09aa302b99fa2a0993cc0a32)
-
5cb91d72
by Ben Gamari at 2026-06-10T11:03:13+05:30
base: Capture backtrace from throwSTM
Implements core-libraries-committee#297.
Fixes #25365.
(cherry picked from commit 8c389e8ce9a536da8e396a1df8c726583d0bcc14)
-
54353c41
by Ben Gamari at 2026-06-10T11:04:10+05:30
base: Annotate rethrown exceptions in catchSTM with WhileHandling
Implements core-libraries-committee#298
(cherry picked from commit e1ce1fc3ad38d192cd3b6a38cb42051f4b115e95)
-
10a2589e
by fendor at 2026-06-10T11:05:50+05:30
Hide implementation details from base exception stack traces
Ensure we hide the implementation details of the exception throwing mechanisms:
* `undefined`
* `throwSTM`
* `throw`
* `throwIO`
* `error`
The `HasCallStackBacktrace` should always have a length of exactly 1,
not showing internal implementation details in the stack trace, as these
are vastly distracting to end users.
CLC proposal [#387](https://github.com/haskell/core-libraries-committee/issues/387)
(cherry picked from commit 016f79d54d482de01dd396bd9bf79f958d7c4922)
-
659c4bcd
by Zubin Duggal at 2026-06-10T11:54:28+05:30
fixup! Hide implementation details from base exception stack traces
fixup\! Hide implementation details from base exception stack traces
Two test-output updates required after the \!15395 chain (rows #143-146)
lands:
- T26806b.stderr: the 2 internal-frame lines added by the workaround
fixup 88b8012b335 (collectExceptionAnnotation + toExceptionWithBacktrace)
are no longer produced now that withFrozenCallStack wraps the throw
call. Restore the original 10-line stderr matching eb4d84a8d94's
initial expected output.
- ann_frame005.stdout: the throwSTM section's IPE backtrace entries
acquire the long-form 'called at ann_frame005.hs:N:M in main:Main'
suffix because the SrcLoc-on-StringAnnotation cherry-pick eb4d84a8d94
is on the branch but the master \!15395 baseline did not yet have it.
The actual line/col numbers (52:3 and 27:5) are determined by the
ann_frame005.hs source structure on the branch.
-
1e6624c3
by sheaf at 2026-06-10T12:06:53+05:30
Relax acceptance threshold for T10421
As seen in #27289, the 1% acceptance threshold for this text was
overly narrow, resulting in spurious test failures. This commit widens
the acceptance threshold to 2%. Fixes #27289.
(cherry picked from commit b0233814d63c2802a521dfc7dae08b1ecf494c50)
-
d5cae504
by mangoiv at 2026-06-10T12:08:15+05:30
libraries/process: bump submodule to v1.6.29.0
This submodule bump resolves a segfault on macos 15.
Fixes #27144
(cherry picked from commit 277a3687c4b729e4d1ff4d4503a5673deba5eda7)
-
2a001e72
by mangoiv at 2026-06-10T12:09:25+05:30
libraries/unix: in submodule, don't pick branch 2.7
The 2.7 branch is outdated and the module has been advanced far beyond
it anyway, so remove that line.
(cherry picked from commit 6779bb0c2d2784182465337ba5e94b7cd8810f2b)
-
831a8e7d
by Luite Stegeman at 2026-06-10T12:09:55+05:30
Fixes for black holes
- suspend duplicate work for eager black holes
- detect eager black holes in checkBlockingQueues
- don't overwrite existing black holes even if they're not
in an eager blackhole frame
- don't deadlock on self when thunk is already blackholed
Fixes #26936
(cherry picked from commit 63ce5770da1712f0da54665d8755772bf38ba51e)
-
3d16a3c1
by Tom McLaughlin at 2026-06-10T12:10:18+05:30
Event/Windows.hsc: rethrow exceptions in overlapped IO
This prevents the WinIO manager from swallowing exceptions in overlapped IO. It
was added to make WinIO support possible in the `network` library. See
https://gitlab.haskell.org/ghc/ghc/-/issues/27283.
We also bump __IO_MANAGER_WINIO__ to 2 so libraries can gate on this using CPP.
(cherry picked from commit 037a80dc65d3975adf4a35d46876850e644bc80e)
-
2d4941cd
by Simon Peyton Jones at 2026-06-10T12:11:10+05:30
Add a deprecation warning for static forms
The accepted
GHC proposal 732: Simplify static forms
https://github.com/ghc-proposals/ghc-proposals/pull/732
needs a deprecation warning added to GHC 9.14, to warn about static
forms that mention nested free variables; see #26718.
This MR adds that warning, with test T26718 to check it.
There is no flag to switch the warning off.
(cherry picked from commit 6b7d6287c6ff4fd1b0d3aa2abfdaf73d43c4a9a0)
-
ad9f2143
by Simon Peyton Jones at 2026-06-10T12:13:17+05:30
Trim the continuation in mkDupableContWithDmds
When there are no remaining argument demands, it means the application
is bottoming. In this case, we can trim the continuation to avoid the
panic that was observed in #27261.
See Note [Trimming the continuation for bottoming functions] in
GHC.Core.Opt.Simplify.Iteration.
(cherry picked from commit 4a645683ee0bd4421a88cd6ec49b40c6046b041d)
-
d9745566
by Zubin Duggal at 2026-06-10T12:25:25+05:30
Update to semaphore-compat 2.0.0 using v2 of the protocol
On Linux and other POSIX platforms, GHC's -jsem jobserver client now
speaks v2 of the semaphore-compat protocol, which uses Unix domain
sockets in place of POSIX named semaphores. This avoids the libc-ABI
issues that affected the old implementation. Windows is unaffected
and continues to use the v1 protocol (Win32 named semaphores); its
reported protocol version remains v1.
When GHC receives a -jsem name whose protocol version it does not
support, it emits a -Wsemaphore-version-mismatch warning and falls
back to -j<N> rather than crashing. ghc --info exposes the supported
version in a new "Semaphore version" entry so cabal-install can detect
a mismatch before invoking GHC.
Users on a cabal-install that predates the v2 update will continue to
build successfully on Linux/POSIX, but will lose the cross-process
-jsem coordination and fall back to -j<N> per GHC invocation. Users
must upgrade to a cabal-install that supports protocol v2 to recover
full parallelism.
Also fix a leak in cleanupSem (#27253): cleanupSem used to snapshot
heldTokens and release them before killing the loop, while the loop's
in-flight acquire/release children could still be mutating it.
Cleanup now runs inside the loop's own exit handler, after draining
the active child via a new activeChild TVar, so the snapshot has no
concurrent mutator.
See also:
- GHC proposal amendment: https://github.com/ghc-proposals/ghc-proposals/pull/673
- cabal-install patch: https://github.com/haskell/cabal/pull/11628
- semaphore-compat MR: https://gitlab.haskell.org/ghc/semaphore-compat/-/merge_requests/8
Bump semaphore-compat submodule to 2.0.0
Fixes #25087 and #27253
(cherry picked from commit 8db331a381ae47ad9ad5c8613f5d3e2588d5dd55)
-
824704e8
by Zubin Duggal at 2026-06-10T12:35:51+05:30
Revert "Trim the continuation in mkDupableContWithDmds"
This reverts commit ad9f21431c61ccc3ddebd831286f895c46aa4f1c.
-
c793858d
by mangoiv at 2026-06-10T12:45:08+05:30
Trim the continuation in mkDupableContWithDmds
When there are no remaining argument demands, it means the application
is bottoming. In this case, we can trim the continuation to avoid the
panic that was observed in #27261.
See Note [Trimming the continuation for bottoming functions] in
GHC.Core.Opt.Simplify.Iteration.
This patch was rewritten to avoid pulling in a refactor.
The original patch is included in master as 4a645683
(cherry picked from commit 53f74985860b35a879bfd0dc642e7fcafffcf5e4)
-
a7b1120c
by Zubin Duggal at 2026-06-10T13:20:46+05:30
fixup! Trim the continuation in mkDupableContWithDmds
fixup\! Trim the continuation in mkDupableContWithDmds
Remove unused 'castBottomExpr' from the 'GHC.Core.Make' import in
Iteration.hs. The only call site (in the Bottoming applications case)
was replaced by 'mkBottomCont' by the previous commit; the import was
left behind by the conflict resolution, which mistakenly believed there
was a second call site.
-
6798519c
by mangoiv at 2026-06-10T14:16:22+05:30
profiling: partial backport of 2dadf3b0 to fix #27121
This backports fix and test for #27121 from 2dadf3b0 since the entirety
of the patch is not backportable without also backporting two larger
refactorings.
(cherry picked from commit 0ccecfc5b5a118c2c850f876709c21162d35d972)
-
f8369bfd
by Teo Camarasu at 2026-06-10T14:26:55+05:30
Add explicit export list to GHC.Num
Let's make clear what this module exports to allow us to easily deprecate and remove some of these in the future. Resolves https://gitlab.haskell.org/ghc/ghc/-/issues/26625
(cherry picked from commit b14bdd59202e0c32df8e5cc1923677f59c8f16e7)
-
7ba88e0d
by Teo Camarasu at 2026-06-10T14:27:27+05:30
base: deprecate GHC internals in GHC.Num
Implements CLC proposal: https://github.com/haskell/core-libraries-committee/issues/360
(cherry picked from commit 75a9053d26183e71b48de4c603b04af2fa4a732d)