<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>


<style>img {
max-width: 100%; height: auto;
}
body {
font-size: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";'>
<div class="content">

<h3 style="margin-top: 20px; margin-bottom: 10px;">
Adam Gundry pushed to branch wip/amg/warning-categories at <a href="https://gitlab.haskell.org/ghc/ghc" style="color: #1068bf;">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
Commits:
</h4>
<ul>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/294cf3781eef40635ef1d60d1fe7199e505acee1" style="color: #1068bf;">294cf378</a></strong>
<div>
<span> by Adam Gundry </span> <i> at 2023-01-17T08:57:26+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>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 {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`.
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#c786816bca5e182a02da23ebd34ff8563b35e55a" style="color: #1068bf;">
compiler/GHC/Driver/Config/Diagnostic.hs
</a>
</li>
<li class="file-stats">
<a href="#2e5692f568fd7b67a6b172e2a60469da8392508c" style="color: #1068bf;">
compiler/GHC/Driver/Flags.hs
</a>
</li>
<li class="file-stats">
<a href="#774d88050336ef660c7a219fb06c480c2fc639bc" style="color: #1068bf;">
compiler/GHC/Driver/Session.hs
</a>
</li>
<li class="file-stats">
<a href="#75bfcd03f3ba9315d33104fcb0424c6bfeb4e334" style="color: #1068bf;">
compiler/GHC/Hs/Decls.hs
</a>
</li>
<li class="file-stats">
<a href="#bf951467d4a9aa443cb109cb4c84a2891945649b" style="color: #1068bf;">
compiler/GHC/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#bc838fed116397de81c10f0a33433e07c6d3a2d4" style="color: #1068bf;">
compiler/GHC/Parser/HaddockLex.x
</a>
</li>
<li class="file-stats">
<a href="#86d694037d496c511e28b2c09c8410f67dc19596" style="color: #1068bf;">
compiler/GHC/Rename/Env.hs
</a>
</li>
<li class="file-stats">
<a href="#7dd1cd0f6f2164a14c83d9aa564dd32bc30e447a" style="color: #1068bf;">
compiler/GHC/Rename/Module.hs
</a>
</li>
<li class="file-stats">
<a href="#e05ee69330b0f7088f11a5f3567137547489664d" style="color: #1068bf;">
compiler/GHC/Rename/Names.hs
</a>
</li>
<li class="file-stats">
<a href="#1dd9c7a6bbc222c976a6ec1c4b772232ae60f7e5" style="color: #1068bf;">
compiler/GHC/Tc/Errors/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#cdba811872892f235fe7059df1a6c538fba60816" style="color: #1068bf;">
compiler/GHC/Tc/Errors/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#73cf7ada7d008f315e18676ed83f3a566fbbe679" style="color: #1068bf;">
compiler/GHC/Tc/Gen/Export.hs
</a>
</li>
<li class="file-stats">
<a href="#c9446951223982bc58852a8f524a62b6011c482f" style="color: #1068bf;">
compiler/GHC/Types/Error.hs
</a>
</li>
<li class="file-stats">
<a href="#e2c828ee9e003df518a07b05beaa6971e5c62eb0" style="color: #1068bf;">
compiler/GHC/Types/Error/Codes.hs
</a>
</li>
<li class="file-stats">
<a href="#d6934be3ac35795f6da11fde690e36e5b0b288fb" style="color: #1068bf;">
compiler/GHC/Unit/Module/Warnings.hs
</a>
</li>
<li class="file-stats">
<a href="#74503129756c368c70bd530fb0beb4292889db5e" style="color: #1068bf;">
compiler/GHC/Utils/Error.hs
</a>
</li>
<li class="file-stats">
<a href="#093cf1ab10ea2bac043566f4a5e4a1c4a1eaf5e6" style="color: #1068bf;">
docs/users_guide/9.6.1-notes.rst
</a>
</li>
<li class="file-stats">
<a href="#878399d76e594ee2194b99baaccd7b67e9740bb1" style="color: #1068bf;">
docs/users_guide/exts/pragmas.rst
</a>
</li>
<li class="file-stats">
<a href="#e16ae6db99f98868d3603a0c7df0bb6a793a330d" style="color: #1068bf;">
docs/users_guide/using-warnings.rst
</a>
</li>
<li class="file-stats">
<a href="#88b631e84b9b763883e83b6b1303d3b7035d0b50" style="color: #1068bf;">
testsuite/tests/parser/should_compile/T3303.stderr
</a>
</li>
<li class="file-stats">
<a href="#0a89795388903ad88b6f4ff2f77a06cad47d0d96" style="color: #1068bf;">
testsuite/tests/rename/should_compile/T5867.stderr
</a>
</li>
<li class="file-stats">
<a href="#3e5b542bb887aa3876b2ba3ef4b9470c117ddd34" style="color: #1068bf;">
testsuite/tests/rename/should_compile/rn050.stderr
</a>
</li>
<li class="file-stats">
<a href="#882a83c5a0a84470516d9c6441754ac24fb6c6d5" style="color: #1068bf;">
testsuite/tests/rename/should_compile/rn066.stderr
</a>
</li>
<li class="file-stats">
<a href="#f8ab32e1ea9fd2c306459e91ce066bc092db6d75" style="color: #1068bf;">
testsuite/tests/rename/should_fail/T5281.stderr
</a>
</li>
<li class="file-stats">
<a href="#c69af939b76f6bdbee2b87e312b64b892f30075d" style="color: #1068bf;">
testsuite/tests/warnings/should_compile/DeprU.stderr
</a>
</li>
<li class="file-stats">
<a href="#73d290e3105f1a609f6349c4435715e3d3bbcb62" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/warnings/should_fail/WarningCategory1.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#1b403ea79a6a5e91eb09764c4d6a5b2de41827aa" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/warnings/should_fail/WarningCategory1.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#a768d1f0c4bb3164e0e9efb6b36b9b1e108a312a" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/warnings/should_fail/WarningCategory1_B.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#40b68037d83cce257fb2eba10dab9a277e0df8cf" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/warnings/should_fail/WarningCategory2.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#444f0cdd138ac5e3bbc71490ef1f6c77af9f5e70" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/warnings/should_fail/WarningCategory4.stderr
</span>
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: 0.875rem;">
The diff was not included because it is too large.
</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/commit/294cf3781eef40635ef1d60d1fe7199e505acee1" style="color: #1068bf;">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.haskell.org" style="color: #1068bf;">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link" style="color: #1068bf;">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link" style="color: #1068bf;">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.haskell.org/ghc/ghc/-/commit/294cf3781eef40635ef1d60d1fe7199e505acee1"}}</script>


</p>
</div>
</body>
</html>