hexpat-pickle-generic-0.1.5: Picklers for de/serialising Generic data types to and from XML

Safe HaskellNone

Text.XML.Expat.Pickle.Generic

Contents

Synopsis

Class

class IsXML a whereSource

Methods

xmlPickler :: PU [Node] aSource

Functions

Data Types

data XMLPU t a Source

Constructors

XMLPU 

Fields

pickleTree :: a -> t
 
unpickleTree :: t -> Either String a
 
root :: Maybe ByteString
 

Options

data XMLOptions Source

Constructors

XMLOptions 

Fields

xmlCtorModifier :: String -> ByteString

Function applied to constructor tags.

xmlFieldModifier :: String -> ByteString

Function applied to record field labels.

xmlListElement :: ByteString

Default element name to wrap list items with.

Generics

genericXMLPickler :: (Generic x, GIsXML (Rep x)) => Options -> PU [Node] xSource

rootXMLPickler :: (Generic a, GIsXML (Rep a)) => ByteString -> XMLPU [Node] aSource

Combinators

xpWrap :: (a -> b, b -> a) -> PU [n] a -> PU [n] bSource

xpList :: PU [Node] a -> PU [Node] [a]Source

xpElemList :: ByteString -> PU [Node] a -> PU [Node] [a]Source

xpElem :: ByteString -> PU [Node] a -> PU [Node] aSource

xpSum :: PU [t] (f r) -> PU [t] (g r) -> PU [t] ((f :+: g) r)Source

xpEither :: PU [t] a -> PU [t] b -> PU [t] (Either a b)Source

xpPrim :: (Read a, Show a) => PU ByteString aSource

xpEmpty :: (Read a, Show a) => PU [Node] aSource

xpOption :: PU [n] a -> PU [n] (Maybe a)Source

xpPair :: PU [n] a -> PU [n] b -> PU [n] (a, b)Source

xpUnit :: PU [n] ()Source

xpLift :: a -> PU [n] aSource

xpContent :: PU ByteString a -> PU [Node] aSource