From 22604ee254ff728397f76bfc3a226d4f14005257 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Tue, 1 Oct 2013 07:10:30 +0400 Subject: Added lexicographic property note --- src/Data/BEncode.hs | 7 +++++-- 1 file 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) -- > .: "tags" .=? fileTags -- > .: endDict -- --- NOTE: the list of pair SHOULD be sorted lexicographically by keys, --- so: "length" < "md5sum" < "path" < "tags". +-- NOTE: the list of pairs SHOULD be sorted lexicographically by +-- keys, so: "length" < "md5sum" < "path" < "tags". -- data Assoc = Some !BKey BValue | None @@ -639,6 +639,9 @@ endDict = Nil -- The /reqKey/ is used to extract required key — if lookup is failed -- then whole destructuring fail. -- +-- NOTE: the actions SHOULD be sorted lexicographically by keys, so: +-- "length" < "md5sum" < "path" < "tags". +-- newtype Get a = Get { runGet :: StateT BDict Result a } deriving (Functor, Applicative, Alternative, Monad) -- cgit v1.2.3