hexpat-pickle-generic-0.1.6: 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

Instances

Functions

Data Types

data XMLPU t a Source

Constructors

XMLPU 

Fields

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

Options

data XMLOptions Source

Constructors

XMLOptions 

Fields

xmlCtorModifier :: String -> NName ByteString

Function applied to constructor tags.

xmlFieldModifier :: String -> NName ByteString

Function applied to record field labels.

xmlListElement :: NName ByteString

Default element name to wrap list items with.

Generics

type XMLGeneric a = (Generic a, GIsXML (Rep a)) => PU [Node] aSource

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

Combinators

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

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

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

xpElem :: NName 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

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

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

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

xp4Tuple :: PU [n] a -> PU [n] b -> PU [n] c -> PU [n] d -> PU [n] (a, b, c, d)Source

xp5Tuple :: PU [n] a -> PU [n] b -> PU [n] c -> PU [n] d -> PU [n] e -> PU [n] (a, b, c, d, e)Source

xp6Tuple :: PU [n] a -> PU [n] b -> PU [n] c -> PU [n] d -> PU [n] e -> PU [n] f -> PU [n] (a, b, c, d, e, f)Source

xpUnit :: PU [n] ()Source

xpLift :: a -> PU [n] aSource

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

xpConst :: Show a => ByteString -> a -> XMLPU [Node] aSource

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

Re-exported Tag Helpers