[Git][ghc/ghc][wip/amg/warning-categories] 2 commits: Allow WARNING pragmas to be controlled with custom categories

Adam Gundry (@adamgundry) gitlab at gitlab.haskell.org
Thu Mar 23 08:51:24 UTC 2023



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


Commits:
6928d7c2 by Adam Gundry at 2023-03-23T08:51:13+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.

- - - - -
07e0a5ca by Adam Gundry at 2023-03-23T08:51:13+00:00
Move mention of warning groups change to 9.8.1 release notes

- - - - -


30 changed files:

- 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/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Types/Error.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Unit/Module/Warnings.hs
- compiler/GHC/Utils/Error.hs
- docs/users_guide/9.6.1-notes.rst
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/exts/pragmas.rst
- docs/users_guide/using-warnings.rst
- testsuite/tests/parser/should_compile/T3303.stderr
- testsuite/tests/rename/should_compile/T5867.stderr
- testsuite/tests/rename/should_compile/rn050.stderr
- testsuite/tests/rename/should_compile/rn066.stderr
- testsuite/tests/rename/should_fail/T5281.stderr
- testsuite/tests/warnings/should_compile/DeprU.stderr
- + testsuite/tests/warnings/should_fail/WarningCategory1.hs
- + testsuite/tests/warnings/should_fail/WarningCategory1.stderr
- + testsuite/tests/warnings/should_fail/WarningCategory1_B.hs
- + testsuite/tests/warnings/should_fail/WarningCategory2.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4e751ae58e5ee71ccef3c411fb50c91e5bd90eca...07e0a5cadb9daad97815ba587b7a105925c978fc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4e751ae58e5ee71ccef3c411fb50c91e5bd90eca...07e0a5cadb9daad97815ba587b7a105925c978fc
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/20230323/d1f7e920/attachment.html>


More information about the ghc-commits mailing list