haskell / mtl

The Monad Transformer Library
http://www.haskell.org/haskellwiki/Monad_Transformers
Other
360 stars 63 forks source link

Redundant constraint Monoid w in GHC 9.4 build #120

Closed Bodigrim closed 2 years ago

Bodigrim commented 2 years ago
$ cabal build -w ghc-9.4.0.20220501
...
[15 of 24] Compiling Control.Monad.Writer.Class

Control/Monad/Writer/Class.hs:201:3: warning: [-Wredundant-constraints]
    • Redundant constraint: Monoid w
    • In the instance declaration for ‘MonadWriter w (AccumT w m)’
    |
201 |   ( Monoid w
    |   ^^^^^^^^^^...
kozross commented 2 years ago

This appears to be a typo in any case: there's no reason why the type of the writer effect has to match that of the accumulation effect.