Allow WARNING pragmas to be controlled with custom categories
Closes #17209 (closed). This implements GHC Proposal 541, allowing a WARNING
pragma to be annotated with a category like so:
{-# WARNING in "x-partial" head "This is a partial function...." #-}
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
.
Edited by Adam Gundry