-
2f6a5534
by Simon Jakobi at 2026-06-23T15:46:20+02:00
Add -dstable-core-dump-order for stable Core dump ordering (#27296)
The order of top-level bindings in Core dumps (-ddump-simpl etc.) is the
compiler's Unique-sensitive internal processing order, so an unrelated
upstream change can reorder them and defeat a textual diff of two dumps.
This adds an opt-in flag -dstable-core-dump-order that reorders the
top-level bindings of dumps routed through dumpPassResult into a stable,
Unique-independent order, so two dumps line up across rebuilds. See
Note [Stable Core dump order] in GHC.Core.Ppr for the sort key and its
rationale.
Adds tests T27296 (binders GHC emits in non-source order by default,
asserted to come out stably ordered under the flag) and T27296b (an
untidied -ddump-float-out dump pinning the ordering of the anonymous lvl
floats by literal value).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
-
141986e3
by mangoiv at 2026-06-24T15:51:14-04:00
compiler: refactor error reporting code for ExplicitLevelImports
Refactors error reporting code for ExplicitLevelImports to pass in a
RdrName and a GlobalReaderElt to be able to report errors that are
faithful to the source and to more precisely distinguish between names
that are in scope from different qualifications.
Fixes #27385 and #26616
-
aa7df6b6
by Simon Hengel at 2026-06-24T15:52:18-04:00
Set GHC_VERSION when calling custom pre-processors (see #25952)
(so that pre-processors can emit backwards compatible code)
-
a9e494f2
by Simon Hengel at 2026-06-24T15:54:08-04:00
Add a flag to control GHCi specific error hints (close #27409)
-
a805b2a2
by Simon Hengel at 2026-06-24T15:55:20-04:00
Reference correct package in error messages for reexported modules
(fixes #27417)
-
f235d183
by Simon Jakobi at 2026-06-25T05:51:18-04:00
Add explicit setBit/clearBit/complementBit for instance Bits Integer (#21176)
The default setBit, clearBit, and complementBit methods allocate
intermediate Integers per call. Define them explicitly via the new
integerSetBit[#], integerClearBit[#] and integerComplementBit[#], built
on the BigNat# primitives, which avoid those allocations. Allocation is not
eliminated entirely -- the negative (IN) cases would need in-place mutation,
which is left as future work.
The default methods constant-folded on literal arguments via the
integerOr/integerAnd/integerXor rules, which fold literal Integers of any
size. The explicit functions have no such rule, so they (their Word-argument
wrappers, and the Bits Integer methods) are marked INLINE to expose the
underlying primops to the simplifier; see Note [INLINE for constant folding
of bit operations]. This restores folding only on the small-int (IS) path --
large literal Integers (IP/IN) are no longer constant-folded, a minor
regression for that case. T8832 covers the IS-path folding.
The new golden-output test T21176 checks all three operations against the
default implementations across the sign/size boundaries, recording each
result plus its integerCheck validity. The base and ghc-bignum interface-
stability export goldens gain the new functions.
The main changelog entry lives in changelog.d under a new ghc-internal
section (renamed from ghc-prim).
CLC proposal: https://github.com/haskell/core-libraries-committee/issues/423
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
-
202ed264
by Marc Scholten at 2026-06-25T05:52:21-04:00
haddock: use Text in documentation pipeline
This patch moves Haddock's documentation pipeline from String to Text
where the data is already textual. It avoids repeated conversions while
keeping the existing decoding behavior for invalid UTF-8 docstring
chunks.
The main changes are:
* Render and carry docstrings as Text in Haddock-facing paths.
* Use the Binary Text instance from GHC.Utils.Binary for Haddock
interface files, and bump the Haddock binary interface version.
* Add a FastString HTML instance so XHTML rendering avoids
intermediate String allocation.
* Keep HsDocStringChunk decoding lenient, matching the previous
unpackHDSC behavior on invalid UTF-8 input.
* Update the xhtml submodule to 3000.4.1.0, which contains the
apostrophe escaping fix used by the Haddock test output.
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Assisted-by: Codex <codex@openai.com>
-
a72ff58f
by mangoiv at 2026-06-25T05:53:07-04:00
compiler: rename ZonkAny to UnusedType and add pretty printing logic
ZonkAny is a hard to understand name for users who do not know how the
compiler works internally. Additionally, it is confusing that ZonkAny,
while being a concrete type *represents* a meta variable, espeically in
the compiler output.
This patch changes the name of ZonkAny to UnusedType which is closer to
its intended semantics and adds special pretty printing logic to display
this type in the same fashion the compiler displays meta variables in
other places, whenever they leak from the implementation to the user.
It also exports the type from ghc-internal:GHC.Internal.Types in order
to expose documentation.
Fixes #27390
Co-Authored-By: Sam Derbyshire <sam.derbyshire@gmail.com>
-
d41db1d0
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
EPA: Remove LocatedC / SrcSpanAnnC
Used for contexts
-
459ff64a
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
EPA: Harmonise HsQual/HsQualTy TTG extension annotations
-
431198a5
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
EPA Remove LocatedLC / LocatedLS
LocatedLC/LocatedLS were unused
-
caa4b77c
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
EPA: Remove LocatedLW from LStmtLR
-
3cfc4190
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
EPA: Remove LocatedLW from MatchGroup
This is the last usage of LocatedLW / SrcSpanAnnLW
-
ee575967
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
EPA: Move the 'where' annotation for PatSynBind
This allows us to move it out of the MatchGroup exact print annotation
too
-
5787a851
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
EPA: Replace AnnListItem with simply [TrailingAnn]
Remove the unnecessary wrapper around a single field.
-
6054a8b2
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
EPA: delete AnnContext. Squash this into the right place
-
b7be2945
by Alan Zimmerman at 2026-06-25T18:53:32+01:00
Keep binds and sigs together in HsValBindsLR
TBD
-
6427943c
by Alan Zimmerman at 2026-06-25T23:32:45+01:00
Keep decls together in ClassDecl
Keep binds and sigs together in HsValBindsLR
TBD
-
e0133cb3
by Alan Zimmerman at 2026-06-25T23:32:45+01:00
WTF? hadrian/cfg/system.config.{host|target}