Data.BEncode.Parser

bencode-0.6.0.0: Parser and printer for bencoded data.

Copyright | (c) 2005 Lemmih <lemmih@gmail.com>
License | BSD3
Maintainer | lemmih@gmail.com
Stability | stable
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Data.BEncode.Parser

Description

A parsec style parser for BEncoded data

Synopsis

- data BParser a
- runParser :: BParser a -> BEncode -> Either String a
- token :: BParser BEncode
- dict :: String -> BParser BEncode
- list :: String -> BParser a -> BParser [a]
- optional :: BParser a -> BParser (Maybe a)
- bstring :: BParser BEncode -> BParser String
- bbytestring :: BParser BEncode -> BParser ByteString
- bint :: BParser BEncode -> BParser Integer
- setInput :: BEncode -> BParser ()
- (<|>) :: Alternative f => forall a. f a -> f a -> f a

# Documentation

data BParser a

Instances

Monad BParser |
Functor BParser |
Applicative BParser |
Alternative BParser |
MonadPlus BParser |

runParser :: BParser a -> BEncode -> Either String a

token :: BParser BEncode

dict :: String -> BParser BEncode

list :: String -> BParser a -> BParser [a]

optional :: BParser a -> BParser (Maybe a)

bstring :: BParser BEncode -> BParser String

bbytestring :: BParser BEncode -> BParser ByteString

bint :: BParser BEncode -> BParser Integer

setInput :: BEncode -> BParser ()

(<|>) :: Alternative f => forall a. f a -> f a -> f a

An associative binary operation