Closed hasufell closed 6 years ago
There are potentially many more cases where the Monid/Semigroup change will need to be fixed. I haven't looked through the entire codebase, because we just use a fraction.
CPP
is not required if there is a dependency upon semigroups
with the following instances:
instance Semigroup Foo where
(<>) = ...
instance Monoid Foo where
mempty = ...
mappend = (<>)
There will be a minor warning in newer GHCs about a non-canonical instance since Semigroup
is now a superclass of Monoid
, but I'd rather supress that than use CPP
, if possible.
You don't mind build not being compatible with -Werror
?
I believe it won't warn in GHC <= 8.4.3
with both -Wall
and -Wcompat
. If it does either now or in the future I think {-# LANGUAGE -fno-warn-... #-}
per affected module is still preferable.
Messed up branches a bit, please see new PR: https://github.com/brendanhay/gogol/pull/116
This is backwards-compatible and although there is no full ghc-8.4.3 and lts-12.9 support yet, this is useful for projects that mix in gogol.