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

Safe HaskellNone
LanguageHaskell2010

Data.ByteString.Conversion

Synopsis

Documentation

newtype Hex a Source

Newtype wrapper to parse and produce integral numbers in hexadecimal format

Constructors

Hex 

Fields

fromHex :: a
 

newtype List a Source

Newtype wrapper to parse and produce a comma separated list of values.

Constructors

List 

Fields

fromList :: [a]
 

Instances

Monad List Source 
Functor List Source 
Applicative List Source 
Eq a => Eq (List a) Source 
Show a => Show (List a) Source 
FromByteString a => FromByteString (List a) Source

A (flat) comma-separated list of values without spaces.

ToByteString a => ToByteString (List a) 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.