diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-09-29 08:07:17 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-09-29 08:07:17 +0400 |
commit | ca1068d8b24906c4e2fcaa637937f021567471d6 (patch) | |
tree | fc6a35f33e226c0be05e12a581087e28cdabb0f6 | |
parent | e7a93379de8af8567d052e71c6f728a4665bc102 (diff) |
Add documentation
-rw-r--r-- | src/Data/BEncode/Types.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Data/BEncode/Types.hs b/src/Data/BEncode/Types.hs index e505249..fae90fe 100644 --- a/src/Data/BEncode/Types.hs +++ b/src/Data/BEncode/Types.hs | |||
@@ -20,13 +20,19 @@ import Data.ByteString | |||
20 | 20 | ||
21 | import Data.BEncode.BDict | 21 | import Data.BEncode.BDict |
22 | 22 | ||
23 | 23 | -- | A bencode "integer". | |
24 | type BInteger = Integer | 24 | type BInteger = Integer |
25 | |||
26 | -- | A raw bencode string. | ||
25 | type BString = ByteString | 27 | type BString = ByteString |
28 | |||
29 | -- | A plain bencode list. | ||
26 | type BList = [BValue] | 30 | type BList = [BValue] |
31 | |||
32 | -- | A bencode dictionary. | ||
27 | type BDict = BDictMap BValue | 33 | type BDict = BDictMap BValue |
28 | 34 | ||
29 | -- | 'BEncode' is straightforward ADT for b-encoded values. Please | 35 | -- | 'BValue' is straightforward ADT for b-encoded values. Please |
30 | -- note that since dictionaries are sorted, in most cases we can | 36 | -- note that since dictionaries are sorted, in most cases we can |
31 | -- compare BEncoded values without serialization and vice versa. | 37 | -- compare BEncoded values without serialization and vice versa. |
32 | -- Lists is not required to be sorted through. | 38 | -- Lists is not required to be sorted through. |