-
b18c8dd5
by Zubin Duggal at 2026-08-06T15:51:01-04:00
hie files: Dump the type table when dumping with -ddump-hie
-
f839d0fb
by Zubin Duggal at 2026-08-06T15:51:01-04:00
hie files: Take evidence for quantified constraints into account when saving evidence terms to the hie ast
Fixes #25709
-
5753ebaa
by Simon Jakobi at 2026-08-06T15:51:43-04:00
testsuite: fix stale paths for the ghc-config build artifacts
ghc-config.hs moved from testsuite/mk/ to testsuite/ghc-config/ in
6c7a49139c, but the .gitignore entry and the clean rule still referred to
the old location. As a result the compiled ghc-config binary, which
boilerplate.mk rebuilds on every make-driven test run, showed up as an
untracked file and was never cleaned.
Assisted-by: Claude Opus 5
-
246d4d72
by Simon Peyton Jones at 2026-08-06T15:52:25-04:00
Documentation only
...driven by my investigation of #27591
-
be69e9df
by Alan Zimmerman at 2026-08-06T15:53:05-04:00
EPA: Replace AnnPragma with individual types
We introduced AnnPragma as a common type for all pragma usages wrapped
in LocatedP / SrcSpanAnnP. Now that those are gone, and the AnnPragma
moved into the TTG points for the given items, we can ensure that each
carries only the annotations it needs.
So we remove AnnPragma, and in its place bring in
AnnCType
AnnWarningTxt
AnnOverlap
AnnAnnDecl
AnnPragSCC
-
0779e12c
by Simon Jakobi at 2026-08-07T12:36:11-04:00
Cmm: print unreachable blocks under -dppr-debug (#27368)
Unreachable blocks linger in a CmmGraph's block map for most of the Cmm
pipeline, but pprCmmGraph only ever printed the blocks reachable from the
entry, so dumps looked consistent while the graph was not. Issues like
#27368 were hard to debug due to this.
pprCmmGraph now appends the stored-but-unreachable blocks under a
"// unreachable blocks:" heading when -dppr-debug is on.
See Note [unreachable blocks] in GHC.Cmm.Pipeline.
Assisted-by: Claude Opus 5
-
3a0f9a51
by Simon Peyton Jones at 2026-08-07T12:36:54-04:00
Fix three bugs related to required type args and INLINE pragmas
* `GHC.Core.Opt.Arity.mkEtaForAllMCo` got the visibility flags back to front,
leading to a Lint error (#27557)
* The arity in an InlineSaturation is the VisArity not the Arity; the
two can differ when we have "required" type arguments. This made the
INLINE pragma argument counting go wrong in `makeCorePair` (#27590).
* When a simple binding has a type signature, we take special path in `tcPolyCheck`,
leading to an outer `AbsBinds` that has no dictionaries, even when the binding
is in fact overloaded. That confused the inline-arity computation in
`makeCorePair` (#27589).
The latter two are fixed using the new function `GHC.HsToCore.Binds.findSatArity`.
That actually simplifies the API of `makeCorePair`, which is nice.
The first bug is fixed by swapping the visiblity flags in
`GHC.Core.Opt.Arity.mkEtaForAllMCo`
Getting the INLINE behaviour right led to some perf changes:
* Runtime /halved/ on T7954 due to better specialisation
* Compile time increased by 6% in T21839c because a bit more inlining
happened, as it always should have done.
* For some reason compile-time max-bytes-used dropped by 30% on
T27336, but only on one build configuration; and it increased
on LinkableUsage02 by 6% on another configuration
Geometric mean effect on our compile time benchmarks is +0.1%.
Metric Decrease:
T27336
T7954
Metric Increase:
LinkableUsage02
T21839c
-
4f985108
by Vladislav Zavialov at 2026-08-07T17:49:50-04:00
Discard type arguments in tcPatToExpr (#27440, #27583)
The builder expression of an implicitly bidirectional pattern synonym must not
mention types written in the RHS:
* Invisible type arguments led to a panic (#27440)
* Required type arguments failed with out-of-scope variables (#27583)
Both are now discarded, following the precedent established by pattern
signatures (#9867).
Discarding type arguments takes some care: a type pattern cannot be told from a
value pattern by syntax alone, as the `type` keyword may be omitted. Consider:
data T a b c where
MkT :: forall a. forall b c -> a -> T a b c
pattern P :: x -> T x y z
pattern P x = MkT @a (type b) c x
In P's right-hand side, `@a` and `type b` are clearly type arguments, but what
about `c` and `x`? We can only tell by matching the patterns against MkT's
type. So tcPatToExpr now runs in TcM and matches the arguments against the
constructor's TyVarBinders using zipPatsBndrs, which is made public for this
purpose. The resulting builder is $bP x = MkT _ _ x.
See Note [Discarding types in the builder expression].
Test cases: T27440a T27440b T27440c T27440d T27440e
T27583a T27583b T27583c T27583d T27583e T27583f T27583g
Metric Increase: LinkableUsage02
Metric Decrease: T27336
Assisted-by: Claude Opus 5
-
eb1dcd4d
by sheaf at 2026-08-07T17:50:40-04:00
mkWpFun_FRR: fix ordering of coercion composition
When the subsumption machinery generates an eta-expansion, we must
perform a representation polymorphism check to ensure the lambda binder
it introduces has a fixed runtime representation.
This is done in GHC.Tc.Utils.mkWpFun_FRR.
This check involves composing quite a few coercions, arising from
representation-polymorphism checks on both the actual and expected
argument types. These coercions are then chained using HsWrapper
composition, <.>. The ordering of composition was incorrect, leading to
the Core Lint failure reported in #27639. This commit fixes that.
Fixes #27639
-
4bbe0b57
by Alan Zimmerman at 2026-08-08T12:16:42+01:00
EPA: Remove LocatedE, replace with LocatedA
This gets rid of one more LocatedXXX occurrence
-
95b7f1fe
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: Remove AnnList (EpToken "where") usages
This is moving toward removing the parameter from AnnList completely
-
bd656553
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA remove AnnList (EpToken "rec") usages
-
bf897cb1
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: Remove last parameterised AnnList usage (EpaLocation)
Also remove the parameter
-
c4b87716
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
TTG: Add extension points to BooleanFormula
They are currently unused, but will be used for exact print annotations next
-
bc3a508f
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: Remove LocatedBC / SrcSpanBF
-
c6e5509a
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: remove unused addTrailingAnnToL. Squash appropriately
-
bf2ded42
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPS: 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.
-
72e61d12
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: Some haddock processing tweaks
-
3cd8a679
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
Some haddock exactprint tests
-
b6b5e93a
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: When adding comments honour trailing anns
-
af109cd3
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: Uses Parsers.parseModule for exactprint tests
This is the advertised way to parse for use for exact printing in the
ghc-exactprint library, make sure we test using it.
-
6212bd1f
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA Fix HsCmdDo exact print with comments
TODO: add test based on proc-do-complex-four-out.hs
-
60190a10
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: Add comments about remaining Anno SrcSpan instances
-
cb285894
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: Plan for Fixing AnnList Layout Properly
-
83eefeba
by Alan Zimmerman at 2026-08-08T12:17:29+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
-
71b09537
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: HsList attempt WIP
-
21958733
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
Enable ppr test for Haddock1. It currently fails
-
2ad6d1df
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
WIP on removing NoEpAnn. Likely abandon
-
f1e9072c
by Alan Zimmerman at 2026-08-08T12:17:29+01:00
EPA: Add an overview doc for exact printing
-
a9d725e4
by Simon Peyton Jones at 2026-08-08T12:17:29+01:00
Added an intro section