diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Data/BEncode/BDict.hs | 4 |
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 | |||
37 | import Control.DeepSeq | 37 | import Control.DeepSeq |
38 | import Data.ByteString as BS | 38 | import Data.ByteString as BS |
39 | import Data.Foldable | 39 | import Data.Foldable |
40 | import Data.Semigroup | ||
40 | import Data.Monoid | 41 | import 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 | ||
74 | instance Semigroup (BDictMap a) where | ||
75 | (<>) = Data.BEncode.BDict.union | ||
76 | |||
73 | instance Monoid (BDictMap a) where | 77 | instance 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 |