diff options
-rw-r--r-- | src/Data/BEncode.hs | 7 |
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 | -- |
585 | data Assoc = Some !BKey BValue | 585 | data 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 | -- | ||
642 | newtype Get a = Get { runGet :: StateT BDict Result a } | 645 | newtype Get a = Get { runGet :: StateT BDict Result a } |
643 | deriving (Functor, Applicative, Alternative, Monad) | 646 | deriving (Functor, Applicative, Alternative, Monad) |
644 | 647 | ||