List of warnings not enabled by '-Wall' is incorrect
GHC User Guide mentions list of GHC sanity checks not enabled by -Wall
:
However, this list is currently incorrect. For example, it doesn't mention the following flags:
-
-Wredundant-bang-patterns
(since GHC 9.2) -
-Woperator-whitespace
(since GHC 9.2) -
-Wredundant-strictness-flags
(since GHC 9.4)
It's also not obvious from the existing documentation that -Wall
doesn't include -Wcompat
.
On top of this, I find it confusing when -Wall
suddenly changes the style from inclusive to exclusive.
I fell too many times into the trap of wanting to know which flags are enabled by -Wall
, checking the documentation, seeing the flag mentioned in the documentation, seeing it doesn't work locally and only later realising that the -Wall
section actually mentions flags not included by -Wall
. This part of the documentation is confusing.
It would be nice if -Wall
included all the flags in addition to -W
. Especially, because this is how it's written in the code:
It would be also nice if this particular part of the documentation was automated because, I assume, it's too tedious and error-prone to keep it up to date.