-
93a2b20f
by Andreas Klebinger at 2026-08-18T04:31:04-04:00
Fix a number of incorrect module references:
Fix module reference in Note [DataCon wrappers are conlike].
Fix module reference in Note [Detailed InertCans Invariants].
Fix module reference in Note [GHC's data format representations].
Fix module reference in Note [Grand plan for static forms].
Fix module reference in Note [How tuples work].
Fix module reference in Note [Solved dictionaries].
Fix module reference in Note [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)].
Fix module reference in Note [The VarBndr type and its uses].
Found the incorrect references with a llm.
-
eb0dfb01
by Simon Jakobi at 2026-08-18T04:31:44-04:00
ci: Run stack-hadrian-build only in full-ci pipelines
The job exists to catch changes that break hadrian/build-stack (#18726),
but nothing in the pipeline depends on it, and it can only break when
hadrian's dependencies change. Restricting it to full-ci (like
hadrian-multi) still covers marge-bot merge batches, so such breakage
cannot reach master unnoticed, while ordinary validate pipelines skip
the job.
Assisted-by: Claude Fable 5
-
b9160962
by Simon Jakobi at 2026-08-20T14:57:52-04:00
testsuite: Show baseline sample count and range in perf failures
A perf baseline is the mean of all samples recorded for a commit, and
it prints as a single number, hiding how far the samples spread. When
the spread is wide, this can indicate an unstable metric that isn't
actually useful as a signal for the perf tests.
For example, in #27602, T27336's peak_megabytes_allocated baseline
showed as 757 when the underlying samples were 605 and 909.
When the baseline is averaged from more than one sample, say so in the
failure output: the one-line stat-failure reason shows the sample
range, and the detail block lists the raw samples. Single-sample
baselines print exactly as before.
Context: #27602
Assisted-by: Claude Fable 5
-
a4979877
by Simon Jakobi at 2026-08-20T14:57:52-04:00
testsuite: Fold Baseline into CommitMetric
A Baseline was just a CommitMetric plus the commit it came from, built
by copying fields across. Since get_commit_metric already knows that
commit, record it on CommitMetric itself and drop Baseline. This also
collapses both branches of find_baseline into plain returns.
Assisted-by: Claude Fable 5
-
99fb8d68
by Simon Jakobi at 2026-08-20T14:57:52-04:00
ci: Clarify comment on pushing perf notes after failures
Context: #27602
Assisted-by: Claude Fable 5
-
2ca87972
by Alan Zimmerman at 2026-08-20T14:58:36-04:00
EPA: Remove LocatedBC / SrcSpanBF
The custom annotations are now in the BooleanFormula TTG extension
points, so LBooleanFormula can now use the standard LocatedA.
-
d2bc32aa
by Simon Peyton Jones at 2026-08-21T12:59:26-04:00
Better handling of serialisation of wired-in names
Fixes #27501
-
d2795ffc
by Alan Zimmerman at 2026-08-21T13:00:05-04:00
EPA: Remove NoEpTok/NoEpUniTok, using an unhelpful SrcSpan instead
Also introduce helper functions noEpTok and noEpUniTok to serve
as simple replacements in code inserting an token annotation without
location information.
-
b5d29ab8
by Brandon Chinn at 2026-08-25T18:42:08-04:00
Add Data.RealFloat and Infinity/NegInfinity/NaN pattern synonyms (#26961)
-
e60eb3bc
by Andreas Klebinger at 2026-08-25T18:42:59-04:00
rts linker: Fix pointer arithmetic issue in flushInstructionCacheRISCV64
We accidentally operated over `uint64_t*` when we should use `uint8_t`.
Fixes #27569
-
e9bbe8f9
by Andreas Klebinger at 2026-08-26T15:09:23-04:00
cmm dumps: Add machop width info with -dppr-debug for infix ops.
-
86e3a9d8
by Andreas Klebinger at 2026-08-26T15:09:24-04:00
CmmLint: Check for unsupported MachOp widths
machOpArgReps now maps MachOp + Width to a list of supported
argument widths or Nothing if the given operation is not supported
at the given width.
This allows us to check for nonsensical combinations like FloatToInt
at Word16.
Similarly we now check that every address is actually wordwidth.
-
13781cca
by Andreas Klebinger at 2026-08-26T15:09:24-04:00
arm64 ncg: The big subword truncation fix.
A set of slightly related fixes to arm subword handling:
Bitmask immediates:
Don't produce overflowing assembly literals.
There is still another bug here that causes us to miss some valid
literals but we will fix that later.
Improve subword truncation handling:
We now use a small set of helpers to truncate `Register` values rather
than truncating immediate `Reg` values which greatly simplifies the code
structure. This fixes a great many bugs to do with sign/zero extending subwords
or the lack thereof.
We now establish the invariant that subword values are zero-extended at
every site at which they come into "scope" of the ncg, and rely on the
invariant throughout rather than pessimistically inserting redundant
extensions in a hodgepodge manner at the use sites of these values.
This fixes at least the bugs described in issues #27533, #27430
#27537, #27538, #27539, and #27550. But likely more bugs yet not
found.
Subword ffi results:
Apply truncations when calling functions returning
subword values.
genCondJump:
Don't sign extend signed values in the input register as
it might map to a local variable, corrupting the value stored within.
Fix subword store/load instructions.:
We used to read those at 32bit width even for smaller values possibly
resulting in invalid memory access. Now we construct the suffix for
subword variants based on the instruction format for these.
-
d8fa5d7c
by Andreas Klebinger at 2026-08-26T15:09:24-04:00
arm64 ncg: Fix MO_V_Broadcast for non-literals.
We now use OpReg instead of OpScalarAsVec as required since we broadcast a gp register.
Also adds a test. Fixes #27565.
-
94822c95
by Andreas Klebinger at 2026-08-26T15:09:24-04:00
Add some test cases covering bugs in the arm ncg.
* Test for #27430 (subword ffi results)
* #27537 - subword conversions
* #27538 - subwords used in conditional
* #27533 - single byte read
-
dd1ba88a
by Andreas Klebinger at 2026-08-26T15:09:24-04:00
cmmLint: Lint against MO_FS_Truncate subword use.
-
fd22f71e
by Zubin Duggal at 2026-08-26T15:10:20-04:00
ghc-internal: annotateSTM should use catchSTM# rather than catch#
A catch# frame inside a transaction breaks retry and async exception
delivery.
Fixes #27657
-
bb324171
by Rodrigo Mesquita at 2026-08-26T15:10:59-04:00
rts: refactor to reduce THREADED_RTS in MSG_UPD_TSO_FLAGS
- No behavior change in this commit (well, a small optimization here
makes us do less work if the target TSO owned by the curr. capability)
- Move all THREADED_RTS CPP needed into `updThreadFlag`
- Merge MSG_SET_TSO_FLAGS and MSG_UNSET_TSO_FLAGS into MSG_UPD_TSO_FLAGS
plus a `set` bool field in the MessageUpdTSOFlag struct
Towards #27729
-
ed99b7b7
by Rodrigo Mesquita at 2026-08-26T15:10:59-04:00
rts: Fix race condition in MSG_UPD_TSO_FLAGS execution
The code for processing the MSG_UPD_TSO_FLAGS message was not taking
into consideration that the TSO's owner might have moved in between that
capability receiving the message (since it was its previous owner) and
starting to process its inbox (a point at which it was no longer the
owner)
Added Note [TSO owner may change in between Msg being sent and received]
to explain this race and the pattern used to fix this, where we just
forward the message to the new owner.
Fixes #27729
-
cd653714
by Alan Zimmerman at 2026-08-26T15:11:49-04:00
EPA: Uses Parsers.parseModule for exactprint tests
Parsers.parseModule is the advertised way to parse for use for exact
printing in the ghc-exactprint library. This commit updates the GHC
exact print testing to use it.
This requires moving the comment balancing that was occurring
only in the test path into the advertising parser path, so it moves
from Transforms.hs to Utils.hs.
Also update the comment adding to honour trailing annotations
-
b00b30d8
by Alan Zimmerman at 2026-08-26T20:18:38+01:00
EPA: Some Haddock processing tweaks
These changes to the Haddock postprocessing should not change
behaviour, but just bring it more closely in line with the
original, changed at 44309cd377f
And add some haddock exactprint tests to show they work.
-
3eecccf1
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA Fix HsCmdDo exact print with comments
TODO: add test based on proc-do-complex-four-out.hs
-
7c2ea8fd
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Add comments about remaining Anno SrcSpan instances
-
226b4a7f
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Plan for Fixing AnnList Layout Properly
-
a066a05e
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Remove ListBanana / ListParens from AnnListBrackets
-
bffc7fec
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Tidy up mkHsDoPv, take AnnList directly
And some extra stuff by accident.
The main goal is to slim down AnnListBrackets to just have braces or
none.
This makes it clear that it serves only for lists which may have layout,
and opens the route to use EpLayout instead of AnnListBrackets
-
ebd47d5d
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Add specific layout field to AnnList
-
0c54729b
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Use EpaLocation in EpVirtualBraces
reword:
EPA Use vocurly as basis for AnnListLayout
For the existing cases that populate AnnList.
This also shows up AnnList usages that can never capture layout.
-
492a1427
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA Use vocurly as basis for AnnListLayout
For the existing cases that populate AnnList.
This also shows up AnnList usages that can never capture layout.
-
5f7875aa
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: AnnList clean up patch for empty where clause
-
8f931a22
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Add TTG fields to FamilyInfo
This commit is a simple add, with unused extension fields.
It lays the groundwork for using them for exact print annotations
-
b22c0ce6
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
WIP annclassdecl
-
a9b09c5f
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Update AnnClsInstDecl to contain AnnList
It was already separately tracking the '{', '}' and leading ';' values.
This aligns it with layout-introducing parser productions ('vocurly'),
so the layout processing can be handled uniformly
-
c4ffa1ba
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Tidy up markAnnListA'
It takes an action which can modify the AnnList, but this
is never used. So remove it.
-
01033710
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Use AnnList for GADT declarations
-
bc716c7d
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Use AnnList in AnnClassDecl
-
1fc47030
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Make local binds located
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.
-
ad929ece
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Use AnnList in HsMultiIf
It introduces layout, capture it
-
cfcf26e9
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Use AnnList in DecBrl
-
efeaaac0
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Replace AnnListLayout / AnnListBrackets with EpLayout
-
7d076084
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
WIP: setLayoutBoth inside markAnnListA
Current problem is it is a global one-shot, and MG has one too
Check: is it needed?
if so, honouring EpLayout may be needed
-
dfdd1482
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA some tests for layout. WIP
-
36f6525b
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
Exactprint layout scope plan. Do not commit
-
5ee4400d
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: tidy up a bit. Combine somewhere else
-
6bf7e25b
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Introduce LayoutFrame stacks in ExactPrint state
-
f05c0bbb
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
Align with ghc-exactprint
-
696ca359
by Alan Zimmerman at 2026-08-26T21:25:13+01:00
EPA: Fix AnnList leading semis when layout
When there is layout, anything printed triggers it, including leading
semis.
Add some test case examples too
-
d676bd83
by Alan Zimmerman at 2026-08-26T21:56:19+01:00
Exactprint: tidy up layout capturing
-
3c6160ac
by Alan Zimmerman at 2026-08-27T18:41:25+01:00
Exactprint Tweaks. Squash
-
6c49fdf1
by Alan Zimmerman at 2026-08-27T18:41:39+01:00
EPA: Make ValBinds LocatedA in HsLocalBindsLR
If we have items with an AnnList Annotation, as part of another, which
has different content, it must be LocatedA. This is a technical requirement
due to the way comment allocation happens during the makeDelta processing.
Comments are queued for printing, and as soon as any non-comment is to
be printed, the pending comments before that position are printed, and
in makeDelta processing these attached as preceding comments to the thing
just printed.
The means they end up captured inside the layout region of the AnnList item.
So for
foo = x
where -- comment
x = 3
the comment ends up as a preceding comment of `x = 3`, inside the
layout, and prints as
foo = x
where
-- comment
x = 3
-
2be12e21
by Alan Zimmerman at 2026-08-27T18:41:39+01:00
Extend Test20297 for additional occurrences
-
d6ab4c85
by Alan Zimmerman at 2026-08-27T18:41:39+01:00
Plan update DO NOT COMMIT
-
accf0c3c
by Alan Zimmerman at 2026-08-27T18:41:39+01:00
EPA: First pass implementation of HsList, for ClassDecls
Just as a straight list replacement to start with, no payload.
This shows the scope and invasiveness of the initial change
-
20f89aa4
by Alan Zimmerman at 2026-08-27T18:41:39+01:00
EPA: HsList attempt WIP
-
6f91f511
by Alan Zimmerman at 2026-08-27T18:41:39+01:00
Enable ppr test for Haddock1. It currently fails
-
7ab853f9
by Alan Zimmerman at 2026-08-27T18:41:39+01:00
WIP on removing NoEpAnn. Likely abandon
-
6b99a98f
by Alan Zimmerman at 2026-08-27T18:41:39+01:00
EPA: Add an overview doc for exact printing
-
b2b661a3
by Simon Peyton Jones at 2026-08-27T18:41:39+01:00
Added an intro section