[GHC] #11000: Implement `-Wcompat`
GHC
ghc-devs at haskell.org
Thu Oct 22 11:05:32 UTC 2015
#11000: Implement `-Wcompat`
-------------------------------------+-------------------------------------
Reporter: hvr | Owner:
Type: feature | Status: new
request |
Priority: high | Milestone: 8.0.1
Component: Compiler | Version: 7.10.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page: Design/Warnings
-------------------------------------+-------------------------------------
Currently we have only the following generic warning "levels":
{{{
-W enable normal warnings
-w disable all warnings
-Wall enable almost all warnings (details in )
}}}
It would be useful to be able to refer collectively to all currently
implemented forward-compatibility warnings (e.g. about upcoming changes in
`base`, like `-fwarn-amp`) via a symbolic `-Wcompat` flag.
This way, users have more flexibility in opt-in or out of such warnings.
So e.g. the following settings are possible in `.cabal` files:
`ghc-options: -Wall` :: enable "almost all warnings" as before. Some
compat warnings maybe part of `-Wall`, some won't (yet).
`ghc-options: -Wall -Wcompat` :: enable "almost all warnings" as well as
all implemented warnings. E.g. if GHC 8.0 implements `-fwarn-mfp-compat`
but doesn't include it in `-Wall`, this allows users to get notified asap
about warnings to opt into that
`ghc-options: -Wall -Wno-compat` :: This enables `-Wall` **minus** any
future-compat warnings. This is for users who want to be warned at all
about any future compat warnings.
`ghc-options: -Wcompat` :: Of course, `-W(no-)compat` can be used also
w/o `-Wall`, and then is equivalent to turning on/off the respective
individual `-fwarn-*-compat` flags.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11000>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list