Reconsidering -Wall and -Wcompat

Herbert Valerio Riedel hvriedel at
Mon Feb 15 10:43:02 UTC 2016

On 2016-02-14 at 19:51:19 +0100, Sven Panne wrote:


> As stated on the Wiki, stuff in -Wcompat will often be non-actionable,
> so the only option I see if -Wcompat is included in -Wall will be
> -Wno-compat for all my projects.

This depends on what we mean by "actionable". I'm not sure I'd consider
the current -Wcompat warnings to be "non-actionable".

For instance, `aeson-0.11` happens to be free of

  -Wall -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances

warnings, which didn't require any CPP, see e.g.


Also, as an example for a larger code-base, {Cabal,cabal-install} HEAD
in Git aspire to be warning-free as well[1]; so depending on your definition,
-Wcompat *is* actionable.

> -Wcompat would be restricted to a few manual local builds to see where
> things are heading.

 [1]: See  .e.g.

         if impl(ghc >= 8.0)
            ghc-options: -Wcompat -Wnoncanonical-monad-instances

      and the Travis job enables -Werror

More information about the ghc-devs mailing list