[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 8 commits: lint-codes: add new modes of operation

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Sep 28 16:31:06 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
d7a80143 by sheaf at 2023-09-28T03:25:53-04:00
lint-codes: add new modes of operation

This commit adds two new modes of operation to the lint-codes
utility:

  list - list all statically used diagnostic codes
  outdated - list all outdated diagnostic codes

The previous behaviour is now:

  test - test consistency and coverage of diagnostic codes

- - - - -
477d223c by sheaf at 2023-09-28T03:25:53-04:00
lint codes: avoid using git-grep

We manually traverse through the filesystem to find the diagnostic codes
embedded in .stdout and .stderr files, to avoid any issues with old
versions of grep.

Fixes #23843

- - - - -
a38ae69a by sheaf at 2023-09-28T03:25:53-04:00
lint-codes: add Hadrian targets

This commit adds new Hadrian targets:

  codes, codes:used - list all used diagnostic codes
  codes:outdated - list outdated diagnostic codes

This allows users to easily query GHC for used and outdated
diagnostic codes, e.g.

  hadrian/build -j --flavour=<..> codes

will list all used diagnostic codes in the command line by running
the lint-codes utility in the "list codes" mode of operation.

The diagnostic code consistency and coverage test is still run as usual,
through the testsuite:

  hadrian/build test --only="codes"

- - - - -
9cdd629b by Ben Gamari at 2023-09-28T03:26:29-04:00
hadrian: Install LICENSE files in bindists

Fixes #23548.

- - - - -
b8ebf876 by Matthew Craven at 2023-09-28T03:27:05-04:00
Fix visibility when eta-reducing a type lambda

Fixes #24014.

- - - - -
0efaa90d by Simon Peyton Jones at 2023-09-28T15:15:26+01:00
Refactor to combine HsLam and HsLamCase

This MR is pure refactoring (#23916):
* Combine `HsLam` and `HsLamCase`
* Combine `HsCmdLam` and `HsCmdLamCase`

This just arranges to treat uniformly
   \x -> e
   \case pi -> ei
   \cases pis -> ie

In the exising code base the first is treated differently
to the latter two.

No change in behaviour.

More specifics:

* Combine `HsLam` and `HsLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsExpr`) into one data construtor covering
  * Lambda
  * `\case`
  * `\cases`

* The new `HsLam` has an argument of type `HsLamVariant` to distinguish the three cases.

* Similarly, combine `HsCmdLam` and `HsCmdLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsCmd` ) into one.

* Similarly, combine `mkHsLamPV` and `mkHsLamCasePV` (methods of class `DisambECP`) into one. (Thank you Alan Zimmerman.)

* Similarly, combine `LambdaExpr` and `LamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsMatchContext`) into one: `LamAlt` with a `HsLamVariant` argument.

* Similarly, combine `KappaExpr` and `ArrowLamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsArrowMatchContext`) into one: `ArrowLamAlt` with a `HsLamVariant` argument.

* Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one.

* Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one.

* In the same `PsError` data type, combine `PsErrLambdaCmdInFunAppCmd` and `PsErrLambdaCaseCmdInFunAppCmd` into one.

* In the same `PsError` data tpye, combine `PsErrLambdaInFunAppExpr` and `PsErrLambdaCaseInFunAppExpr` into one.

p* Smilarly combine `ExpectedFunTyLam` and `ExpectedFunTyLamCase` (constructors of `GHC.Tc.Types.Origin.ExpectedFunTyOrigin`) into one.

Phew!

- - - - -
2b30eb69 by Andreas Klebinger at 2023-09-28T12:31:01-04:00
Arm: Make ppr methods easier to use by not requiring NCGConfig

- - - - -
15a5be67 by Andreas Klebinger at 2023-09-28T12:31:02-04:00
AArch64: Fix broken conditional jumps for offsets >= 1MB

Rewrite conditional jump instructions with offsets >= 1MB to use unconditional jumps
to avoid overflowing the immediate.

Fixes #23746

- - - - -


30 changed files:

- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/AArch64.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Cond.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Monad.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/X86.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Pmc/Utils.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Errors/Ppr.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/Arrow.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Match.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d6d2da9e7bba5b4ecc6ef15dee794157217cd9fd...15a5be67fce92668ee962f99973497fd6ec74b70

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d6d2da9e7bba5b4ecc6ef15dee794157217cd9fd...15a5be67fce92668ee962f99973497fd6ec74b70
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230928/a3185aa3/attachment.html>


More information about the ghc-commits mailing list