Deprecating fromIntegral

Bardur Arantsson spam at
Tue Sep 26 20:56:40 UTC 2017

On 2017-09-26 20:49, Niklas Hamb├╝chen wrote:
> Hey Edward and David,
> The fact that the 3-release-policy says that warnings cannot be added
> even for -Wall means that currently there is no flag one can use to get
> all of the "latest" warnings GHC can produce to make code safer and more
> correct.
> Perhaps a -Wextra equivalent is needed?

This is called -Weverything in Clang-land.

AFAICT it was introduced because it does imply some warnings that are
ridiculously easy to trigger accidentally, and so you don't to run it
along with e.g. -Werror. Obviously you don't want -Werror on anything
you release to the world, but it can be useful to use "-Weverything" +
"-Werror" for local development. The idea is that you get literally
every warning that the compiler developers can think of and then have to
selectively turn off individual warnings. This squares pretty well with
narrative, at least.

> (Personally I find it unfortunate to have a flag called -Wall not emit
> all warnings, or it complaining about benign topics like unused imports
> while letting data corruption pass unnoticed for long, or an
> off-by-default flag intended to produce as many warnings as possible to
> be restricted by a backwards compatibility policy, but C compilers at
> least make these a common occurrence.)

I think ship has sailed on naming, but a "-Weverything" might be very
useful, I think.

(A "-Wfuture-deprecation" or similar might be warranted too, and should
probably be included in "-Weverything".)


More information about the Libraries mailing list