summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2018-06-22 15:34:11 -0400
committerjoe <joe@jerkface.net>2018-06-22 15:34:11 -0400
commit59c47a9099a9fd8f9e7faed2e0f4dba34cf2cdac (patch)
treea3f50940f064784a05766b9b9402c1487f791ca6 /src
parenta4359d2c67811e71368524d17aeb3809dae657da (diff)
Forward port to base 4.11.1.0 (ghc 8.4).HEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/Data/BEncode/BDict.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Data/BEncode/BDict.hs b/src/Data/BEncode/BDict.hs
index b90f60b..2f5d7c3 100644
--- a/src/Data/BEncode/BDict.hs
+++ b/src/Data/BEncode/BDict.hs
@@ -37,6 +37,7 @@ module Data.BEncode.BDict
37import Control.DeepSeq 37import Control.DeepSeq
38import Data.ByteString as BS 38import Data.ByteString as BS
39import Data.Foldable 39import Data.Foldable
40import Data.Semigroup
40import Data.Monoid 41import Data.Monoid
41 42
42 43
@@ -70,6 +71,9 @@ instance Foldable BDictMap where
70 go (Cons _ v xs) = f v `mappend` go xs 71 go (Cons _ v xs) = f v `mappend` go xs
71 {-# INLINE foldMap #-} 72 {-# INLINE foldMap #-}
72 73
74instance Semigroup (BDictMap a) where
75 (<>) = Data.BEncode.BDict.union
76
73instance Monoid (BDictMap a) where 77instance Monoid (BDictMap a) where
74 mempty = Data.BEncode.BDict.empty 78 mempty = Data.BEncode.BDict.empty
75 mappend = Data.BEncode.BDict.union 79 mappend = Data.BEncode.BDict.union