diff options
author | joe <joe@jerkface.net> | 2018-06-22 15:34:11 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2018-06-22 15:34:11 -0400 |
commit | 59c47a9099a9fd8f9e7faed2e0f4dba34cf2cdac (patch) | |
tree | a3f50940f064784a05766b9b9402c1487f791ca6 /src/Data | |
parent | a4359d2c67811e71368524d17aeb3809dae657da (diff) |
Diffstat (limited to 'src/Data')
-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 |