summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-10-01 07:10:30 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-10-01 07:10:30 +0400
commit22604ee254ff728397f76bfc3a226d4f14005257 (patch)
treed323440a63545a8738966f5a3cb7ea70b978dd32
parent108b28e0b42d99bdd398b3d530db8254e0e28c95 (diff)
Added lexicographic property note
-rw-r--r--src/Data/BEncode.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Data/BEncode.hs b/src/Data/BEncode.hs
index ca47b4a..744e9d1 100644
--- a/src/Data/BEncode.hs
+++ b/src/Data/BEncode.hs
@@ -579,8 +579,8 @@ instance (BEncode a, BEncode b, BEncode c, BEncode d, BEncode e)
579-- > .: "tags" .=? fileTags 579-- > .: "tags" .=? fileTags
580-- > .: endDict 580-- > .: endDict
581-- 581--
582-- NOTE: the list of pair SHOULD be sorted lexicographically by keys, 582-- NOTE: the list of pairs SHOULD be sorted lexicographically by
583-- so: "length" < "md5sum" < "path" < "tags". 583-- keys, so: "length" < "md5sum" < "path" < "tags".
584-- 584--
585data Assoc = Some !BKey BValue 585data Assoc = Some !BKey BValue
586 | None 586 | None
@@ -639,6 +639,9 @@ endDict = Nil
639-- The /reqKey/ is used to extract required key — if lookup is failed 639-- The /reqKey/ is used to extract required key — if lookup is failed
640-- then whole destructuring fail. 640-- then whole destructuring fail.
641-- 641--
642-- NOTE: the actions SHOULD be sorted lexicographically by keys, so:
643-- "length" < "md5sum" < "path" < "tags".
644--
642newtype Get a = Get { runGet :: StateT BDict Result a } 645newtype Get a = Get { runGet :: StateT BDict Result a }
643 deriving (Functor, Applicative, Alternative, Monad) 646 deriving (Functor, Applicative, Alternative, Monad)
644 647