summaryrefslogtreecommitdiff
path: root/src/Data/BEncode.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-09-29 06:38:04 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-09-29 06:38:04 +0400
commit9218d2a0e82ba3a086c31c780174d7f1c3c4a7c8 (patch)
tree3e080446c2d0f0eaaf061eb6fc51ef2f6a59f399 /src/Data/BEncode.hs
parentf314e3ca292c3a25241c8752ec9f067a95c1eb39 (diff)
Eliminate toAscList in builder
Diffstat (limited to 'src/Data/BEncode.hs')
-rw-r--r--src/Data/BEncode.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/BEncode.hs b/src/Data/BEncode.hs
index 6b26ee5..a7c766d 100644
--- a/src/Data/BEncode.hs
+++ b/src/Data/BEncode.hs
@@ -763,10 +763,10 @@ builder = go
763 foldMap go l <> 763 foldMap go l <>
764 B.word8 (c2w 'e') 764 B.word8 (c2w 'e')
765 go (BDict d) = B.word8 (c2w 'd') <> 765 go (BDict d) = B.word8 (c2w 'd') <>
766 foldMap mkKV (BD.toAscList d) <> 766 bifoldMap mkKV d <>
767 B.word8 (c2w 'e') 767 B.word8 (c2w 'e')
768 where 768 where
769 mkKV (k, v) = buildString k <> go v 769 mkKV k v = buildString k <> go v
770 770
771 buildString s = B.intDec (B.length s) <> 771 buildString s = B.intDec (B.length s) <>
772 B.word8 (c2w ':') <> 772 B.word8 (c2w ':') <>