bencode-0.6.1.1: Parsers and printers for bencoded data.

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

Data.BEncode.Parser

Description

Deprecated: Use Data.BEncode.Reader instead

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 => f a -> f a -> f a

# Documentation

data BParser a Source #

#### Instances

Instances details

Alternative BParser Source # |
Instance details Defined in Data.BEncode.Parser Methods empty :: BParser a Source # (<|>) :: BParser a -> BParser a -> BParser a Source # some :: BParser a -> BParser [a] Source # many :: BParser a -> BParser [a] Source #
Applicative BParser Source # |
Instance details Defined in Data.BEncode.Parser Methods pure :: a -> BParser a Source # (<*>) :: BParser (a -> b) -> BParser a -> BParser b Source # liftA2 :: (a -> b -> c) -> BParser a -> BParser b -> BParser c Source # (*>) :: BParser a -> BParser b -> BParser b Source # (<*) :: BParser a -> BParser b -> BParser a Source #
Functor BParser Source # |
Instance details Defined in Data.BEncode.Parser Methods fmap :: (a -> b) -> BParser a -> BParser b Source # (<$) :: a -> BParser b -> BParser a Source #
Monad BParser Source # |
Instance details Defined in Data.BEncode.Parser Methods (>>=) :: BParser a -> (a -> BParser b) -> BParser b Source # (>>) :: BParser a -> BParser b -> BParser b Source # return :: a -> BParser a Source #
MonadPlus BParser Source # |
Instance details Defined in Data.BEncode.Parser Methods mzero :: BParser a Source # mplus :: BParser a -> BParser a -> BParser a Source #
MonadFail BParser Source # |
Instance details Defined in Data.BEncode.Parser Methods fail :: String -> BParser a Source #

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

token :: BParser BEncode Source #

dict :: String -> BParser BEncode Source #

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

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

bstring :: BParser BEncode -> BParser String Source #

bbytestring :: BParser BEncode -> BParser ByteString Source #

bint :: BParser BEncode -> BParser Integer Source #

setInput :: BEncode -> BParser () Source #

(<|>) :: Alternative f => f a -> f a -> f a infixl 3 Source #

An associative binary operation