Potentially unnecessary warning about missing deriving strategies
I'm not sure if this is a bug or not. I ran into it when compiling code using GHC 8.8.1 and
-Weverything. I was surprised to find that
-Wmissing-deriving-strategies fires even when there is no ambiguity about which deriving strategy should be used. In other words, with no language extensions enabled, (I think)
stock is the only valid deriving strategy. Therefore I would not expect this warning to fire. I would expect this warning to fire if I had
Steps to reproduce
$ ghc -Wmissing-deriving-strategies -e 'data T = C deriving Eq'
<interactive>:0:12: warning: [-Wmissing-deriving-strategies] No deriving strategy specified. Did you want stock, newtype, or anyclass? Use DerivingStrategies to specify a strategy.
I expected no warning because the
deriving clause is not ambiguous.
- GHC version used: 8.8.1
- Operating System: Windows 10
- System Architecture: x86_64