Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- 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 #
Instances
class FromByteString a where Source #
Parse ByteString
s.
Instances
Newtype wrapper to parse and produce integral numbers in hexadecimal format
Instances
Newtype wrapper to parse and produce a comma separated list of values.
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 #