[Git][ghc/ghc][wip/amg/warning-categories] 10 commits: Rename () into Unit, (,,...,,) into Tuple<n> (#21294)

Adam Gundry (@adamgundry) gitlab at gitlab.haskell.org
Tue Mar 21 17:05:50 UTC 2023



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


Commits:
a13affce by Andrei Borzenkov at 2023-03-21T11:17:17-04:00
Rename () into Unit, (,,...,,) into Tuple<n> (#21294)

This patch implements a part of GHC Proposal #475.
The key change is in GHC.Tuple.Prim:

  - data () = ()
  - data (a,b) = (a,b)
  - data (a,b,c) = (a,b,c)
  ...
  + data Unit = ()
  + data Tuple2 a b = (a,b)
  + data Tuple3 a b c = (a,b,c)
  ...

And the rest of the patch makes sure that Unit and Tuple<n>
are pretty-printed as () and (,,...,,) in various contexts.

Updates the haddock submodule.

Co-authored-by: Vladislav Zavialov <vlad.z.4096 at gmail.com>

- - - - -
23642bf6 by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00
docs: fix some wrongs in the eventlog format documentation

- - - - -
90159773 by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00
docs: explain the BLOCK_MARKER event

- - - - -
ab1c25e8 by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00
docs: add BlockedOnMVarRead thread status in eventlog encodings

- - - - -
898afaef by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00
docs: add TASK_DELETE event in eventlog encodings

- - - - -
bb05b4cc by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00
docs: add WALL_CLOCK_TIME event in eventlog encodings

- - - - -
eeea0343 by Torsten Schmits at 2023-03-21T11:18:34-04:00
Add structured error messages for GHC.Tc.Utils.Env

Tracking ticket: #20119

MR: !10129

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

- - - - -
be1d4be8 by Bodigrim at 2023-03-21T11:19:13-04:00
Document pdep / pext primops

- - - - -
7f651cc5 by Adam Gundry at 2023-03-21T17:05:30+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.

- - - - -
8ed49d0d by Adam Gundry at 2023-03-21T17:05:32+00:00
Move mention of warning groups change to 9.8.1 release notes

- - - - -


30 changed files:

- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Uniques.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Driver/Config/Diagnostic.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Decls.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/Rename/Splice.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Solver/Interact.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Types.hs-boot
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Types/Error.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Name.hs


The diff was not included because it is too large.


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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b9d3fdd1b6f5339b51fe0e31ece35ef75532ad1b...8ed49d0d85fca01f05502581f483a6607ebe8560
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/20230321/7f251801/attachment-0001.html>


More information about the ghc-commits mailing list