- Nov 08, 2024
-
-
The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all.
-
This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed.
-
Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup.
- Nov 07, 2024
-
-
GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851
-
See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180b but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`.
-
- Nov 05, 2024
-
-
-
Use utility functions instead of selectors to read partial attributes. Part of fixing #25380.
-
- Nov 04, 2024
-
-
There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot -------------------------
-
- Nov 02, 2024
-
-
This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct.
-
Helps avoid them being utterly broken. Fixes #25341
-
This should make them slightly clearer. Fixes #24844 Co-authored-by:
Sylvain Henry <sylvain@haskus.fr>
-
- Nov 01, 2024
-
-
-
- closes: #20449 - See CLC proposal: #55
-
- Oct 31, 2024
-
-
For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan.
-
The offset of the CC field was not updated after the encoding change in b85b1199. Fix this. Fixes #25374.
- Oct 30, 2024
-
-
-
-
Partial fix for #25395
-
This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414.
-
This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit.
-
This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci.
-
Based on ghc/ghc!10588 Co-authored-by:
Sylvain Henry <sylvain@haskus.fr> Co-authored-by:
Andrei Borzenkov <root@sandwitch.dev> Co-authored-by:
Danil Berestov <goosedb@yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip -------------------------
-
- Oct 28, 2024
-
-
Alan Zimmerman authored
This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file.
-
- Oct 27, 2024
-
-
Alan Zimmerman authored
EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure
-
We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed.
-
This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13.
-
-
- Oct 26, 2024
-
-
It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.)
-
- Oct 25, 2024
-
-
Alan Zimmerman authored
EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp
-
See Note [Inferred contexts from method constraints] Co-authored-by:
Simon Peyton Jones <simon.peytonjones@gmail.com>
-
This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better.
-
This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By:
Jaro Reinders <jaro.reinders@gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot
-
See `Note [Pin evaluatedness on floats]`.
-