bytestring-conversion-0.3.2: Type-classes to convert values to and from ByteString.

Safe Haskell | None
Language | Haskell2010

Data.ByteString.Conversion.From

Synopsis

- class FromByteString a where
  - parser :: Parser a
- fromByteString :: FromByteString a => ByteString -> Maybe a
- fromByteString' :: FromByteString a => ByteString -> Maybe a
- runParser :: Parser a -> ByteString -> Either String a
- runParser' :: Parser a -> ByteString -> Either String a

# Documentation

class FromByteString a where Source #

Parse `ByteString`s.

Methods

parser :: Parser a Source #

#### Instances

Instances details

FromByteString ByteString Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser ByteString Source #
FromByteString ByteString Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser ByteString Source #
FromByteString Int16 Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Int16 Source #
FromByteString Int32 Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Int32 Source #
FromByteString Int64 Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Int64 Source #
FromByteString Int8 Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Int8 Source #
FromByteString Word16 Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Word16 Source #
FromByteString Word32 Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Word32 Source #
FromByteString Word64 Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Word64 Source #
FromByteString Word8 Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Word8 Source #
FromByteString Text Source # | UTF-8 is assumed as encoding format.
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Text Source #
FromByteString Text Source # | UTF-8 is assumed as encoding format.
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Text Source #
FromByteString Integer Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Integer Source #
FromByteString Bool Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Bool Source #
FromByteString Char Source # | UTF-8 is assumed as encoding format.
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Char Source #
FromByteString Double Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Double Source #
FromByteString Int Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Int Source #
FromByteString Word Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser Word Source #
(Integral a, Bits a) => FromByteString (Hex a) Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser (Hex a) Source #
FromByteString a => FromByteString (List a) Source # | A (flat) comma-separated list of values without spaces.
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser (List a) Source #
(FoldCase a, FromByteString a) => FromByteString (CI a) Source # |
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser (CI a) Source #
FromByteString [Char] Source # | UTF-8 is assumed as encoding format.
Instance details Defined in Data.ByteString.Conversion.From Methods parser :: Parser [Char] Source #

fromByteString :: FromByteString a => ByteString -> Maybe a Source #

fromByteString' :: FromByteString a => ByteString -> Maybe a Source #

runParser :: Parser a -> ByteString -> Either String a Source #

runParser' :: Parser a -> ByteString -> Either String a Source #