Skip to content

Instantly share code, notes, and snippets.

View bencode.hs
-- data type
data BEncode
= BInt Int
| BStr B.ByteString
| BList [BEncode]
| BDict Dict
deriving (Show, Eq, Ord)
type Dict = [(B.ByteString, BEncode)]