Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class ToByteString a where
- class FromByteString a where
- newtype Hex a = Hex {
- fromHex :: a
- newtype List a = List {
- fromList :: [a]
- toByteString :: ToByteString a => a -> ByteString
- toByteString' :: ToByteString a => a -> ByteString
- runBuilder :: Builder -> ByteString
- 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 ToByteString a where Source
class FromByteString a where Source
Parse ByteString
s.
FromByteString Bool | |
FromByteString Char | UTF-8 is assumed as encoding format. |
FromByteString Double | |
FromByteString Int | |
FromByteString Int8 | |
FromByteString Int16 | |
FromByteString Int32 | |
FromByteString Int64 | |
FromByteString Integer | |
FromByteString Word | |
FromByteString Word8 | |
FromByteString Word16 | |
FromByteString Word32 | |
FromByteString Word64 | |
FromByteString ByteString | |
FromByteString ByteString | |
FromByteString Text | UTF-8 is assumed as encoding format. |
FromByteString [Char] | UTF-8 is assumed as encoding format. |
(FoldCase a, FromByteString a) => FromByteString (CI a) | |
FromByteString a => FromByteString (List a) | A (flat) comma-separated list of values without spaces. |
(Integral a, Bits a) => FromByteString (Hex a) |
Newtype wrapper to parse and produce integral numbers in hexadecimal format
Bounded a => Bounded (Hex a) | |
Enum a => Enum (Hex a) | |
Eq a => Eq (Hex a) | |
Integral a => Integral (Hex a) | |
Num a => Num (Hex a) | |
Ord a => Ord (Hex a) | |
Read a => Read (Hex a) | |
Real a => Real (Hex a) | |
Show a => Show (Hex a) | |
PrintfArg a => PrintfArg (Hex a) | |
Bits a => Bits (Hex a) | |
(Integral a, Bits a) => FromByteString (Hex a) | |
ToByteString (Hex Int) | |
ToByteString (Hex Int8) | |
ToByteString (Hex Int16) | |
ToByteString (Hex Int32) | |
ToByteString (Hex Int64) | |
ToByteString (Hex Word) | |
ToByteString (Hex Word8) | |
ToByteString (Hex Word16) | |
ToByteString (Hex Word32) | |
ToByteString (Hex Word64) |
Newtype wrapper to parse and produce a comma separated list of values.
Monad List | |
Functor List | |
Applicative List | |
Eq a => Eq (List a) | |
Show a => Show (List a) | |
FromByteString a => FromByteString (List a) | A (flat) comma-separated list of values without spaces. |
ToByteString a => ToByteString (List a) |
toByteString :: ToByteString a => a -> ByteString Source
toByteString' :: ToByteString a => a -> ByteString Source
Please note that this needs to convert from a lazy ByteString
to
a strict one which involves copying the whole string.
runBuilder :: Builder -> ByteString Source
fromByteString :: FromByteString a => ByteString -> Maybe a Source
fromByteString' :: FromByteString a => ByteString -> Maybe a Source
runParser' :: Parser a -> ByteString -> Either String a Source