Incorrect redundant constraint warning from ghc 9.2.4
Minimal reproduction case attached.redundant-constraint.tgz.
Using ghc-9.2.4 I get:
• Redundant constraints: (Applicative m, Monad m)
• In the instance declaration for ‘ReportSchemaErrors m’
|
26 | instance (Applicative m, Monad m, MonadError SchemaError m) => ReportSchemaErrors m where
If I remove those constraints I get:
• Could not deduce (Applicative m)
• Could not deduce (Monad m)
To trigger this:
- the
class
declaration needs to be in a separate file - disable orphan instances warning.
- `-Weverything