Redundant superclass warnings being included in -Wall destroys the "3 Release Policy"
These redundant constraint warnings being in -Wall make it seemingly impossible for us to live up to the '3 Release Policy' in many situations.
Consider the AMP:
(Monad m, Functor m) gets used as a replacement for
Monad m in many situations for compatibility with code before GHC 7.8, where that wants to call both
fmap and something from
Monad, but from 7.10+ that
Functor is a redundant constraint. We have no backwards-facing 3-release-compatible constraint that someone could use in a type signature without warning to get both
return that won't trigger this warning.
Similarly if we split a class we can't advocate that folks use the subclass until the superclass is widely available or they'll get spammed with warnings. This affects splitting out
A similar issue arises with the
MonadFail proposal as there is a stage around 8.4 where the 3-release-compatible advice would be to incur a
MonadFail constraint, even when the active desguaring will be through
I don't actually have a fix from the libraries side for the fact that with these showing up in -Wall, the 3 release policy doesn't work.
Every single proposal the core libraries committee currently has in the works (except for adding
expm1, etc. to Floating) is affected by this concern.
One possible fix is to demote the redundant superclass warnings out of
This would resolve #11369 as well.