... | ... | @@ -153,16 +153,13 @@ import Data.Monoid |
|
|
appendFoo :: Foo -> Foo -> Foo
|
|
|
appendFoo = …
|
|
|
|
|
|
emptyFoo :: Foo
|
|
|
emptyFoo = …
|
|
|
|
|
|
#if MIN_VERSION_base(4,9,0)
|
|
|
instance Sem.Semigroup Foo where
|
|
|
(<>) = appendFoo
|
|
|
#endif
|
|
|
|
|
|
instance Monoid Foo where
|
|
|
mempty = emptyFoo
|
|
|
mempty = …
|
|
|
|
|
|
#if MIN_VERSION_base(4,11,0)
|
|
|
-- starting with base-4.11, mappend definitions are redundant;
|
... | ... | @@ -172,7 +169,7 @@ instance Monoid Foo where |
|
|
#else // base < 4.9
|
|
|
-- prior to GHC 8.0 / base-4.9 where no `Semigroup` class existed
|
|
|
mappend = appendFoo
|
|
|
# endif
|
|
|
#endif
|
|
|
|
|
|
```
|
|
|
|
... | ... | |