summaryrefslogtreecommitdiff
path: root/src/Data/BEncode/BDict.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/BEncode/BDict.hs')
-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