generic-xmlpickler-0.1.0.6: Generic generation of HXT XmlPickler instances using GHC Generics

Safe HaskellNone
LanguageHaskell98

Generics.XmlPickler

Contents

Synopsis

Documentation

gxpickle :: forall a. (Generic a, GXmlPickler (Rep a), ConNames (Rep a)) => PU a Source #

The generic pickler. Uses a tag for each constructor with the lower case constructor name, and a tag for each record field with the lower case field name. Most values are pickled using their own XmlPickler instance, and Strings are pickled as possibly empty text nodes.

class GXmlPickler f where Source #

The generic XmlPickler class. This gives generic xml picklers for the functors from Regular. These are usually not used directly.

Methods

gxpicklef :: PU a -> PU (f a) Source #

Instances
GXmlPickler (U1 :: Type -> Type) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU (U1 a) Source #

GXmlPickler (K1 i Text :: Type -> Type) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU (K1 i Text a) Source #

GXmlPickler (K1 i String :: Type -> Type) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU (K1 i String a) Source #

XmlPickler a => GXmlPickler (K1 i a :: Type -> Type) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a0 -> PU (K1 i a a0) Source #

(GXmlPickler f, GXmlPickler g) => GXmlPickler (f :+: g) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU ((f :+: g) a) Source #

(GXmlPickler f, GXmlPickler g) => GXmlPickler (f :*: g) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU ((f :*: g) a) Source #

GXmlPickler f => GXmlPickler (M1 D c f) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU (M1 D c f a) Source #

(Constructor c, GXmlPickler f) => GXmlPickler (M1 C c f) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU (M1 C c f a) Source #

Selector c => GXmlPickler (M1 S c (K1 i (Maybe Text) :: Type -> Type)) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU (M1 S c (K1 i (Maybe Text)) a) Source #

Selector c => GXmlPickler (M1 S c (K1 i (Maybe String) :: Type -> Type)) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU (M1 S c (K1 i (Maybe String)) a) Source #

(XmlPickler a, Selector c) => GXmlPickler (M1 S c (K1 i (Maybe a) :: Type -> Type)) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a0 -> PU (M1 S c (K1 i (Maybe a)) a0) Source #

(Selector c, GXmlPickler f) => GXmlPickler (M1 S c f) Source # 
Instance details

Defined in Generics.XmlPickler

Methods

gxpicklef :: PU a -> PU (M1 S c f a) Source #

xpEither :: PU a -> PU b -> PU (Either a b) Source #

Combine two picklers into a pickler for Either. While pickling, check if the either is a Left or Right and use the appropriate pickler. During unpickling, first try the first, and if it fails, try the second.

Orphan instances

XmlPickler Bool Source # 
Instance details

Methods

xpickle :: PU Bool #

(XmlPickler a, XmlPickler b) => XmlPickler (Either a b) Source # 
Instance details

Methods

xpickle :: PU (Either a b) #