HaskellNet-0.2.3: network related libraries such as POP3, SMTP, IMAPSource codeContentsIndex
Text.Bencode
PortabilityGHC-only
Stabilityexperimental
Maintainermukai@jmuk.org
Contents
Basic Type and Type Class
Description
Bencode Parser and Serializer and type classes, for BitTorrent.
Synopsis
class Bencodable a where
fromBencode :: BencodeNode -> a
toBencode :: a -> BencodeNode
bRead :: String -> a
bShow :: a -> String
data BencodeNode
= String !ByteString
| Number !Integer
| Dictionary !(Map ByteString BencodeNode)
| List [BencodeNode]
parse :: ByteString -> BencodeNode
parses :: ByteString -> [BencodeNode]
encode :: BencodeNode -> ByteString
Basic Type and Type Class
class Bencodable a whereSource
Methods
fromBencode :: BencodeNode -> aSource
toBencode :: a -> BencodeNodeSource
bRead :: String -> aSource
bShow :: a -> StringSource
show/hide Instances
data BencodeNode Source
Constructors
String !ByteString
Number !Integer
Dictionary !(Map ByteString BencodeNode)
List [BencodeNode]
show/hide Instances
parse :: ByteString -> BencodeNodeSource
parses :: ByteString -> [BencodeNode]Source
encode :: BencodeNode -> ByteStringSource
Produced by Haddock version 2.7.2