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.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Data/BEncode/BDict.hs b/src/Data/BEncode/BDict.hs
index 925027b..8ef6d20 100644
--- a/src/Data/BEncode/BDict.hs
+++ b/src/Data/BEncode/BDict.hs
@@ -89,7 +89,11 @@ lookup x = go
89{-# INLINE lookup #-} 89{-# INLINE lookup #-}
90 90
91union :: BDictMap a -> BDictMap a -> BDictMap a 91union :: BDictMap a -> BDictMap a -> BDictMap a
92union = undefined 92union Nil xs = xs
93union xs Nil = xs
94union bd @ (Cons k v xs) bd' @ (Cons k' v' xs')
95 | k < k' = Cons k v (union xs bd')
96 | otherwise = Cons k' v' (union bd xs')
93 97
94map :: (a -> b) -> BDictMap a -> BDictMap b 98map :: (a -> b) -> BDictMap a -> BDictMap b
95map f = go 99map f = go