Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class ToXmlParentAttributes a where
toXmlParentAttributes :: a -> [(Name, Text)]
ToXmlParentAttributes a | A catch-all instance: by default objects don't have parent attributes.
The alternative solution is to write a default implementation in the class,
but it has a drawback that it requires numerous (boilerplate) empty
instances - one for each type that doesn't have parent attributes (most
types). This overlappable instance gets overriden for XML records
(described in Data.THGen.XML) because they can store parent attributes
added via the |
class ToXmlAttribute a where
toXmlAttribute :: a -> Text
toXmlAttributeIntegral :: Integral a => a -> Text