úÎ!M6      !"#$%&'()*+,-./012345portable experimental*Niklas Broberg, niklas.broberg@chalmers.seNone?Transform away occurences of regular patterns from an abstract ' Haskell module, preserving semantics. .Transform expressions by traversing subterms. H Of special interest are expressions that contain patterns as subterms,  i.e. let, case6 and lambda expressions, and also list comprehensions  and do;-expressions. All other expressions simply transform their  sub-expressions, if any. = Of special interest are of course also any xml expressions. 6789:;6789:;0requires newtype deriving and MPTCs with fundeps experimental*Niklas Broberg, niklas.broberg@chalmers.seNone HNames can be simple or qualified with a domain. We want to conveniently ? use both simple strings or pairs wherever a Name is expected. Set attributes on XML elements 8Similarly embed values as attributes of an XML element. MEmbed values as child nodes of an XML element. The parent type will be clear * from the context so it is not mentioned. "=Type synonyms to avoid writing out the XMLnGenT all the time #0Generate XML values in some XMLGenerator monad. ,BThe monad transformer that allows a monad to generate XML values. . un-lift. /map the inner monad <NPairs of strings can represent names, meaning a name qualified with a domain. =CStrings can represent names, meaning a simple name with no domain. >&Names can represent names, of course. J  !"#$%&'()*+,-./012345?@ABCD<=>EFGHIJKLMNOPQ4  !"#$%&'()*+,-./0123454,-./+#$%&'()*"! 102435  4    !"#$%&'()*+,-./012345?@ABCD<=>EFGHIJKLMNOPQR      !"#$%&'()*+,-.//0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST hsx-0.10.0 HSX.TransformHSX.XMLGenerator transform transformExp TypeCastM'' typeCastM'' TypeCastM' typeCastM' TypeCastM typeCastM TypeCast'' typeCast'' TypeCast' typeCast'TypeCasttypeCastIsNametoName AppendChildappChildappAllSetAttrsetAttrsetAllAttr:= XMLGenerator EmbedAsAttrasAttr EmbedAsChildasChildGenAttributeList GenAttribute GenChildListGenChild GenXMLListGenXMLXMLGenXMLType ChildType AttributeType genElement genEElement xmlToChild pcdataToChildNameXMLGenT unXMLGenT mapXMLGenTset<@<<@app<:<<: $fFunctorTr $fMonadTr $fFunctorRN $fMonadRN $fFunctorHsxM $fMonadHsxM $fIsName(,) $fIsName[] $fIsName(,)0$fTypeCastM''()mama$fTypeCastM'tmamb$fTypeCastMmamb$fTypeCast''()aa$fTypeCast'tab $fTypeCastab$fAppendChildmXMLGenT$fSetAttrmXMLGenT$fEmbedAsAttrm[]$fEmbedAsAttrmAttributeType$fEmbedAsAttrmAttr$fEmbedAsAttrmXMLGenT$fEmbedAsChildm()$fEmbedAsChildm[]$fEmbedAsChildmx$fEmbedAsChildmChildType$fEmbedAsChildm[]0$fEmbedAsChildmXMLGenT$fMonadTransXMLGenT