fpco / unliftio

The MonadUnliftIO typeclass for unlifting monads to IO
Other
151 stars 51 forks source link

`Monoid (Conc m a)` has noncanonical mappend instance #99

Open philderbeast opened 2 years ago

philderbeast commented 2 years ago

When compiling with ghc-9.2.3:

unliftio          > /.../UnliftIO/Internals/Async.hs:513:3: warning: [-Wnoncanonical-monoid-instances]
unliftio          >     Noncanonical ‘mappend’ definition detected
unliftio          >     in the instance declaration for ‘Monoid (Conc m a)’.
unliftio          >     ‘mappend’ will eventually be removed in favour of ‘(<>)’
unliftio          >     Either remove definition for ‘mappend’ (recommended) or define as ‘mappend = (<>)’
unliftio          >     See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/semigroup-monoid
unliftio          >     |
unliftio          > 513 |   mappend = liftA2 mappend

https://github.com/fpco/unliftio/blob/de13c448e4b77e8ce318b78445e17f6c20003325/unliftio/src/UnliftIO/Internals/Async.hs#L510-L514