... | ... | @@ -22,7 +22,7 @@ By reusing the GCC CLI convention for warning-flags, we can make GHC's CLI a bit |
|
|
|
|
|
## Changes to be implemented, and timing
|
|
|
|
|
|
**In GHC 8.0:**
|
|
|
**Already implemented in GHC 8.0:**
|
|
|
|
|
|
- ([\#11218](https://gitlab.haskell.org//ghc/ghc/issues/11218)) Keep the current `-f(no-)warn-$WARNTYPE` flags as hidden flag aliases for newly introduced -W(no-)$WARNTYPE\` flags more in line with GCC's conventions, e.g.
|
|
|
|
... | ... | @@ -37,6 +37,8 @@ By reusing the GCC CLI convention for warning-flags, we can make GHC's CLI a bit |
|
|
|
|
|
- ([\#11451](https://gitlab.haskell.org//ghc/ghc/issues/11451)) Split off `-Wunused-foralls` and `-Wunused-type-patterns` from `-Wunused-matches`. Make `-Wall` imply `-Wunused-foralls` and `-Wunused-type-patterns`, but *not* imply `-Wunused-type-patterns`
|
|
|
|
|
|
**Proposed for GHC 8.0:**
|
|
|
|
|
|
- ([ phab:D1850](https://phabricator.haskell.org/D1850)) Introduce some new warning sets, e.g.
|
|
|
|
|
|
- Define set `-Wstandard` (modulo bikeshed, maybe `-Wdefault`?) to denote the set of warnings on by default, together with its negation `-Wno-standard`
|
... | ... | @@ -73,7 +75,6 @@ Here is the proposed warning framework: |
|
|
- `-Wdefault`: the ones you get by default. This indicate things that are almost certainly wrong.
|
|
|
- `-Wall`: indicate suspicious code
|
|
|
- `-Wcompat`: indicate code that in future releases may trigger errors or `-Wdefault` warnings. Subset of `-Wall`.
|
|
|
-
|
|
|
|
|
|
- With no flags, GHC implements the "default warnings". You can get these by saying `-Wdefault` (yet to be implemented).
|
|
|
|
... | ... | @@ -81,6 +82,8 @@ Here is the proposed warning framework: |
|
|
|
|
|
- A flag should only move into `-Wall` or `-Wdefault` if there is a reasonable way for a library author to change their source code to avoid the warning. Experimental, unpredicatable, or compiler-writer-guidance warnings should not be in `-Wall`.
|
|
|
|
|
|
- Libraries on Hackage should not be distributed with `-Werror`, so that any warnings do not abort compilation. Authors may want to use `-Wall` to help encourage other contributors to improve the library to avoid the warning; but `-Wdefault` is more typical usage.
|
|
|
|
|
|
### To `-Wcompat` ⊂ `-Wall`, or not? ([\#11494](https://gitlab.haskell.org//ghc/ghc/issues/11494))
|
|
|
|
|
|
|
... | ... | |