|
|
|
|
Synopsis |
|
| | dataType[a9ck] :: DataType | | constr[a9cn] :: Constr | | constr[a9cm] :: Constr | | constr[a9cl] :: Constr | | insEl :: (Data XmlD a, Default a, Data NormalizeD a, Data XmlD b, Default b, Data NormalizeD b) => a -> b -> Element | | fromXml :: forall m a. (Monad m, Xml a) => Rigidity m -> [Element] -> m a | | | | toPublicXml :: Xml a => a -> [Element] | | | | class (Data XmlD a, Default a, Normalize a) => Xml a where | | | data XmlD a = XmlD {} | | xmlProxy :: Proxy XmlD | | first :: (a -> a) -> [a] -> [a] | | defaultToXml :: Xml t => t -> [Element] | | transparentToXml :: Xml t => t -> [Element] | | transparentReadXml :: forall m t. (Monad m, Xml t) => Rigidity m -> [Element] -> Maybe ([Element], t) | | transparentXml :: Name -> Q [Dec] | | defaultReadXml :: (Monad m, Xml t) => Rigidity m -> [Element] -> Maybe ([Element], t) | | defaultReadXml' :: (Monad m, Xml t) => Rigidity m -> [Element] -> Maybe ([Element], t) | | readXmlWith :: Xml t => (Rigidity m -> Element -> Maybe t) -> Rigidity m -> [Element] -> Maybe ([Element], t) | | readVersionedElement :: forall m t. (Monad m, Xml t) => Rigidity m -> Element -> Maybe t | | isTheAttr :: String -> Element -> Bool | | getAttr :: String -> [Element] -> Maybe (String, [Element]) | | versionAttr :: String | | typeAttr :: String | | readElement :: forall m t. (Monad m, Xml t) => Rigidity m -> Element -> Maybe t | | aConstrFromElements :: forall m t. (Monad m, Xml t) => Rigidity m -> [Constr] -> [Element] -> Maybe ([Element], t) | | constrFromElementsNoRootDefault :: forall m t. (Monad m, Xml t) => Rigidity m -> Constr -> [Element] -> Maybe ([Element], t) | | constrFromElements :: forall m t. (Monad m, Xml t) => Rigidity m -> Constr -> [Element] -> m ([Element], t) | | type ReadM m = StateT ReadState m | | data ReadState = ReadState {} | | getXmls :: Monad m => ReadM m [Element] | | putXmls :: Monad m => [Element] -> ReadM m () | | readMXml :: (Monad m, Xml a) => Rigidity m -> ReadM m a | | readMXmlNoRootDefault :: (Monad m, Xml a) => Rigidity m -> ReadM Maybe a | | xmlAttr :: Name -> Q [Dec] | | xmlShowCDatas :: [Name] -> Q [Dec] | | xmlShowCData :: Name -> Q [Dec] | | xmlCDataLists :: [Name] -> Q [Dec] | | xmlCDataList :: Name -> Q [Dec] | | noCommas :: String -> String | | typeNotValue :: Xml a => a -> a | | data K = K String | | data W = W [K] | | dataType[alRC] :: DataType | | constr[alRD] :: Constr | | dataType[alRs] :: DataType | | constr[alRt] :: Constr | | class ToString a where | | | class FromString a where | |
|
|
Documentation |
|
|
Element recursively represents XML data.
Elem n elems -> XML element with name n and described by elems. Note that elems contains sub-elements as well as the attributes or literal data of the element.
CData d -> Literal string data
Attr key val -> Key/Value pair of the element attribute.
| Constructors | | Instances | |
|
|
|
|
|
|
|
|
|
|
|
insEl a b will convert a to xml and insert it into the
xml of b if b results in an Elem constructor.
|
|
|
Wrapper around the Xml class method readXml.
The Rigidity will determine the behavior in the case of a failed parsing: Rigid will return Nothing and Flexible will return Identity (defaultValue)
|
|
|
|
|
|
Identical to toXml from Xml class except that it will remove attributes named haskellType or haskellTypeVersion
|
|
|
Rigidity is used to designate the result of a failed Xml parsing.
| Constructors | | Instances | |
|
|
|
| Methods | | | Instances | Xml Bool | Xml Char | Xml Double | Xml Float | Xml Int | Xml Integer | Xml String | Xml () | (Data XmlD t, Default t, Normalize t) => Xml t | Xml ByteString | Xml Element | Xml [Double] | Xml [Float] | Xml [Int] | Xml [Integer] | Xml [String] | (Xml a, Xml [a]) => Xml [a] | Xml a => Xml (Maybe a) | (Xml a[ap7W], Xml a[ap7X]) => Xml (Either a[ap7W] a[ap7X]) | (Xml a[apcq], Xml a[apcr]) => Xml (a[apcq], a[apcr]) | (Xml a[apfF], Xml a[apfG], Xml a[apfH]) => Xml (a[apfF], a[apfG], a[apfH]) | (Xml a[apjO], Xml a[apjP], Xml a[apjQ], Xml a[apjR]) => Xml (a[apjO], a[apjP], a[apjQ], a[apjR]) |
|
|
|
|
Constructors | | Instances | |
|
|
|
Used as a type witness for usage with syb-with-class Data class.
|
|
first :: (a -> a) -> [a] -> [a] | Source |
|
Applies function to only first element of the list. Safe on empty lists.
|
|
|
Converts the argument to an Xml element with the constructor
name as the root of the Elem and the additional attributes corresponding
to haskellType and haskellTypeVersion added
|
|
|
Generically traverses an instance of Xml and converts it into a list of elements
|
|
|
Attempts to parse the set of elements and return the first constructor it
can successfully parse of the inferred type.
|
|
|
Create an Xml instance using transparentToXml and transparentReadXml
|
|
|
|
|
|
|
|
|
|
|
Matches the provided string to the key of an attribute. Returns False if any other Element constructor is given.
|
|
|
Fetch the value of the given attribute if present, if not present will return Nothing
|
|
|
Attribute used for Xml class version information
|
|
|
Attribute used for recording the actual Haskell type in the xml serialization
|
|
|
|
|
aConstrFromElements will return the results of the first constructor
that parses correctly.
|
|
|
Like constrFromElements but does not allow defaulting in case of
a parse error.
|
|
|
Attempts to parse the given elements to build the particular type
given by the constructor argument.
|
|
|
|
|
|
|
|
Returns the elements currently in the state
|
|
|
Sets the state of the xml parsing to the given value
|
|
|
Attempts to parse the current set of elements. If it fails the behavior
is dependent on the Rigidity. If it is Rigid, then it will return Nothing
but if it is Flexible it will return the defaultValue.
If the parsing succeeds, it will return the value and store the remaining
XML elements in the parser state.
|
|
|
Identical to readMXml except that in the case of a failed parsing it will not use defaultValue.
|
|
|
|
|
xmlShowCData lifted to act on lists
|
|
|
automatically creates an Xml definition for a type that is an instance
of Show and Read. This will result in an instance that converts the type to and from CData.
|
|
|
xmlCDataLists lifted to act on lists
|
|
|
Creates an instance similar to xmlShowCData except for lists of the
provided type
|
|
|
Replaces commas in the string with single spaces
|
|
|
Throws an error when called
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
|
|
|
|
|
|
|
|
| Methods | | | Instances | |
|
|
class FromString a where | Source |
|
| Methods | | | Instances | |
|
|
Produced by Haddock version 2.6.1 |