projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add derived instances for Dual monoid
[ghc-base.git]
/
Data
/
Monoid.hs
diff --git
a/Data/Monoid.hs
b/Data/Monoid.hs
index
8a30b73
..
c51c4ca
100644
(file)
--- a/
Data/Monoid.hs
+++ b/
Data/Monoid.hs
@@
-97,6
+97,7
@@
instance Monoid Ordering where
-- | The dual of a monoid, obtained by swapping the arguments of 'mappend'.
newtype Dual a = Dual { getDual :: a }
+ deriving (Eq, Ord, Read, Show, Bounded)
instance Monoid a => Monoid (Dual a) where
mempty = Dual mempty