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

Safe HaskellNone

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 
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 -> ByteStringSource

Please note that this needs to convert from a lazy ByteString to a strict one which involves copying the whole string.