Improved warning for redundant-constraints
foo :: (Num a, Integral a) => a -> a foo = id
produces the warning
Main.hs:1:1: warning: [-Wredundant-constraints] • Redundant constraints: (Num a, Integral a) • In the type signature for: foo :: (Num a, Integral a) => a -> a
Since GHC can detect there is a redundancy, it would be nice it also told me which constraint was redundant. In #9939 (closed), I suggested that the warning include something to the effect of
(Num a) is implied by (Integral a). Lets make this as easy for the user as possible.