[Git][ghc/ghc][wip/amg/warning-categories] 12 commits: Allow LLVM backend to use HDoc for faster file generation.

Adam Gundry (@adamgundry) gitlab at gitlab.haskell.org
Wed Mar 22 21:01:57 UTC 2023



Adam Gundry pushed to branch wip/amg/warning-categories at Glasgow Haskell Compiler / GHC


Commits:
e8b4aac4 by Alex Mason at 2023-03-21T18:11:04-04:00
Allow LLVM backend to use HDoc for faster file generation.

Also remove the MetaStmt constructor from LlvmStatement and places the annotations into the Store statement.

Includes “Implement a workaround for -no-asm-shortcutting bug“ (https://gitlab.haskell.org/ghc/ghc/-/commit/2fda9e0df886cc551e2cd6b9c2a384192bdc3045)

- - - - -
ea24360d by Luite Stegeman at 2023-03-21T18:11:44-04:00
Compute LambdaFormInfo when using JavaScript backend.

CmmCgInfos is needed to write interface files, but the
JavaScript backend does not generate it, causing
"Name without LFInfo" warnings.

This patch adds a conservative but always correct
CmmCgInfos when the JavaScript backend is used.

Fixes #23053

- - - - -
926ad6de by Simon Peyton Jones at 2023-03-22T01:03:08-04:00
Be more careful about quantification

This MR is driven by #23051. It does several things:

* It is guided by the generalisation plan described in #20686.
  But it is still far from a complete implementation of that plan.

* Add Note [Inferred type with escaping kind] to GHC.Tc.Gen.Bind.
  This explains that we don't (yet, pending #20686) directly
  prevent generalising over escaping kinds.

* In `GHC.Tc.Utils.TcMType.defaultTyVar` we default RuntimeRep
  and Multiplicity variables, beause we don't want to quantify over
  them.  We want to do the same for a Concrete tyvar, but there is
  nothing sensible to default it to (unless it has kind RuntimeRep,
  in which case it'll be caught by an earlier case). So we promote
  instead.

* Pure refactoring in GHC.Tc.Solver:
  * Rename decideMonoTyVars to decidePromotedTyVars, since that's
    what it does.

  * Move the actual promotion of the tyvars-to-promote from
    `defaultTyVarsAndSimplify` to `decidePromotedTyVars`.  This is a
    no-op; just tidies up the code.  E.g then we don't need to
    return the promoted tyvars from `decidePromotedTyVars`.

  * A little refactoring in `defaultTyVarsAndSimplify`, but no
    change in behaviour.

* When making a TauTv unification variable into a ConcreteTv
  (in GHC.Tc.Utils.Concrete.makeTypeConcrete), preserve the occ-name
  of the type variable.  This just improves error messages.

* Kill off dead code: GHC.Tc.Utils.TcMType.newConcreteHole

- - - - -
0ab0cc11 by Sylvain Henry at 2023-03-22T01:03:48-04:00
Testsuite: use appropriate predicate for ManyUbxSums test (#22576)

- - - - -
048c881e by romes at 2023-03-22T01:04:24-04:00
fix: Incorrect @since annotations in GHC.TypeError

Fixes #23128

- - - - -
a1528b68 by Sylvain Henry at 2023-03-22T01:05:04-04:00
Testsuite: use req_interp predicate for T16318 (#22370)

- - - - -
ad765b6f by Sylvain Henry at 2023-03-22T01:05:04-04:00
Testsuite: use req_interp predicate for T20214

- - - - -
e0b8eaf3 by Simon Peyton Jones at 2023-03-22T09:50:13+00:00
Refactor the constraint solver pipeline

The big change is to put the entire type-equality solver into
GHC.Tc.Solver.Equality, rather than scattering it over Canonical
and Interact.  Other changes

* EqCt becomes its own data type, a bit like QCInst.  This is
  great because EqualCtList is then just [EqCt]

* New module GHC.Tc.Solver.Dict has come of the class-contraint
  solver.  In due course it will be all.  One step at a time.

This MR is intended to have zero change in behaviour: it is a
pure refactor.  It opens the way to subsequent tidying up, we
believe.

- - - - -
cedf9a3b by Torsten Schmits at 2023-03-22T15:31:18-04:00
Add structured error messages for GHC.Tc.Utils.TcMType

Tracking ticket: #20119

MR: !10138

This converts uses of `mkTcRnUnknownMessage` to newly added constructors
of `TcRnMessage`.

- - - - -
30d45e97 by Sylvain Henry at 2023-03-22T15:32:01-04:00
Testsuite: use js_skip for T2615 (#22374)

- - - - -
ab38b95b by Adam Gundry at 2023-03-22T21:01:21+00:00
Allow WARNING pragmas to be controlled with custom categories

Closes #17209. This implements GHC Proposal 541, allowing a WARNING
pragma to be annotated with a category like so:

    {-# WARNING in "x-partial" head "This function is undefined on empty lists." #-}

The user can then enable, disable and set the severity of such warnings
using command-line flags `-Wx-partial`, `-Werror=x-partial` and so on.  There
is a new warning group `-Wextended-warnings` containing all these warnings.
Warnings without a category are treated as if the category was `deprecations`,
and are (still) controlled by the flags `-Wdeprecations`
and `-Wwarnings-deprecations`.

Updates Haddock submodule.

- - - - -
e74100e7 by Adam Gundry at 2023-03-22T21:01:21+00:00
Move mention of warning groups change to 9.8.1 release notes

- - - - -


25 changed files:

- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/CmmToLlvm/Ppr.hs
- compiler/GHC/Data/Bag.hs
- compiler/GHC/Driver/Config/Diagnostic.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Llvm/MetaData.hs
- compiler/GHC/Llvm/Ppr.hs
- compiler/GHC/Llvm/Syntax.hs
- compiler/GHC/Llvm/Types.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/HaddockLex.x
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Bind.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Solver.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8ed49d0d85fca01f05502581f483a6607ebe8560...e74100e7d0902908b748f6cfdda7bd62d93b21c1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8ed49d0d85fca01f05502581f483a6607ebe8560...e74100e7d0902908b748f6cfdda7bd62d93b21c1
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/20230322/b97a7368/attachment.html>


More information about the ghc-commits mailing list