snap-core-0.9.3.1: Snap: A Haskell Web Framework (core interfaces and types)

Safe Haskell | None

Snap.Internal.Parsing

Synopsis

- fullyParse :: ByteString -> Parser a -> Either String a
- parseNum :: Parser Int64
- sp :: Parser Char
- letter :: Parser Char
- digit :: Parser Char
- untilEOL :: Parser ByteString
- crlf :: Parser ByteString
- generateFS :: (Word8 -> Bool) -> FastSet
- spaces :: Parser [Char]
- pSpaces :: Parser ByteString
- fieldChars :: Parser ByteString
- fieldCharSet :: FastSet
- pHeaders :: Parser [(ByteString, ByteString)]
- pWord :: Parser ByteString
- pQuotedString :: Parser ByteString
- isRFCText :: Char -> Bool
- matchAll :: [Char -> Bool] -> Char -> Bool
- pAvPairs :: Parser [(ByteString, ByteString)]
- pAvPair :: Parser (ByteString, ByteString)
- pParameter :: Parser (ByteString, ByteString)
- trim :: ByteString -> ByteString
- pValueWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])
- pContentTypeWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])
- pToken :: Parser ByteString
- isToken :: Char -> Bool
- tokenTable :: FastSet
- parseToCompletion :: Parser a -> ByteString -> Maybe a
- type DList a = [a] -> [a]
- pUrlEscaped :: Parser ByteString
- urlDecode :: ByteString -> Maybe ByteString
- urlEncode :: ByteString -> ByteString
- urlEncodeBuilder :: ByteString -> Builder
- urlEncodeTable :: FastSet
- hexd :: Char -> Builder
- finish :: Result a -> Result a
- parseUrlEncoded :: ByteString -> Map ByteString [ByteString]
- buildUrlEncoded :: Map ByteString [ByteString] -> Builder
- printUrlEncoded :: Map ByteString [ByteString] -> ByteString
- pCookies :: Parser [Cookie]
- parseCookie :: ByteString -> Maybe [Cookie]
- strictize :: ByteString -> ByteString
- unsafeFromHex :: (Enum a, Num a, Bits a) => ByteString -> a
- unsafeFromInt :: (Enum a, Num a, Bits a) => ByteString -> a

# Documentation

fullyParse :: ByteString -> Parser a -> Either String a

parseNum :: Parser Int64

sp :: Parser Char

Parsers for different tokens in an HTTP request.

letter :: Parser Char

Parsers for different tokens in an HTTP request.

digit :: Parser Char

Parsers for different tokens in an HTTP request.

untilEOL :: Parser ByteString

crlf :: Parser ByteString

generateFS :: (Word8 -> Bool) -> FastSet

spaces :: Parser [Char]

Parser for zero or more spaces.

pSpaces :: Parser ByteString

fieldChars :: Parser ByteString

fieldCharSet :: FastSet

pHeaders :: Parser [(ByteString, ByteString)]

Parser for request headers.

pWord :: Parser ByteString

pQuotedString :: Parser ByteString

isRFCText :: Char -> Bool

matchAll :: [Char -> Bool] -> Char -> Bool

pAvPairs :: Parser [(ByteString, ByteString)]

pAvPair :: Parser (ByteString, ByteString)

pParameter :: Parser (ByteString, ByteString)

trim :: ByteString -> ByteString

pValueWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])

pContentTypeWithParameters :: Parser (ByteString, [(CI ByteString, ByteString)])

pToken :: Parser ByteString

isToken :: Char -> Bool

tokenTable :: FastSet

parseToCompletion :: Parser a -> ByteString -> Maybe a

type DList a = [a] -> [a]

pUrlEscaped :: Parser ByteString

urlDecode :: ByteString -> Maybe ByteString

Decodes an URL-escaped string (see http://tools.ietf.org/html/rfc2396.html#section-2.4)

urlEncode :: ByteString -> ByteString

URL-escapes a string (see http://tools.ietf.org/html/rfc2396.html#section-2.4)

urlEncodeBuilder :: ByteString -> Builder

URL-escapes a string (see http://tools.ietf.org/html/rfc2396.html#section-2.4) into a `Builder`.

urlEncodeTable :: FastSet

hexd :: Char -> Builder

finish :: Result a -> Result a

parseUrlEncoded :: ByteString -> Map ByteString [ByteString]

Parses a string encoded in `application/x-www-form-urlencoded` format.

buildUrlEncoded :: Map ByteString [ByteString] -> Builder

printUrlEncoded :: Map ByteString [ByteString] -> ByteString

pCookies :: Parser [Cookie]

parseCookie :: ByteString -> Maybe [Cookie]

strictize :: ByteString -> ByteString

unsafeFromHex :: (Enum a, Num a, Bits a) => ByteString -> a

unsafeFromInt :: (Enum a, Num a, Bits a) => ByteString -> a