Copyright | (c) Sam Truzjan 2013 |
---|---|
License | BSD3 |
Maintainer | pxqr.sta@gmail.com |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Types for working with bencode data.
Types
type BString = ByteString Source #
A raw bencode string.
BValue
is straightforward ADT for b-encoded values. Please
note that since dictionaries are sorted, in most cases we can
compare BEncoded values without serialization and vice versa.
Lists is not required to be sorted through.
BInteger !BInteger | bencode integers; |
BString !BString | bencode strings; |
BList BList | list of bencode values; |
BDict BDict | bencode key-value dictionary. |
Instances
Generic BValue Source # | |
Read BValue Source # | |
Show BValue Source # | |
BEncode BDict Source # | |
BEncode BValue Source # | |
NFData BValue Source # | |
Defined in Data.BEncode.Types | |
Eq BValue Source # | |
Ord BValue Source # | |
type Rep BValue Source # | |
Defined in Data.BEncode.Types type Rep BValue = D1 ('MetaData "BValue" "Data.BEncode.Types" "bencoding-0.4.5.5-LEWPPNw2oELCynG8CYG71M" 'False) ((C1 ('MetaCons "BInteger" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BInteger)) :+: C1 ('MetaCons "BString" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BString))) :+: (C1 ('MetaCons "BList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BList)) :+: C1 ('MetaCons "BDict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BDict)))) |