Data.BEncode.Parser

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 #

#### Instances

Instances details

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

An associative binary operation