projects
/
functorrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b3b775
)
lists: more tests
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Wed, 4 Feb 2015 11:56:12 +0000
(17:26 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Wed, 4 Feb 2015 11:56:12 +0000
(17:26 +0530)
src/Bencode.hs
patch
|
blob
|
history
diff --git
a/src/Bencode.hs
b/src/Bencode.hs
index e1f6dd33d802652b56d78d4d3375124d659fd8fe..7fbea96e386800e9591a8f690ed5c407b7adc94d 100644
(file)
--- a/
src/Bencode.hs
+++ b/
src/Bencode.hs
@@
-75,7
+75,10
@@
bencInt = do _ <- spaces
-- Right []
-- >>> parse bencList "Blist" (BC.pack "l4:spam4:eggse")
-- Right ["spam","eggs"]
-
+-- >>> parse bencList "Blist" (BC.pack "l4:spami42ee")
+-- Right ["spam",42]
+-- >>> parse bencList "Blist" (BC.pack "l4:spam4:eggsli42eee")
+-- Right ["spam","eggs",[42]]
bencList :: ParsecBS.Parser [BVal]
bencList = do _ <- spaces
between (char 'l') (char 'e') (many bencVal)