bytestring-conversion-0.1.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 
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

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