fadno-xml-1.1.0: XML/XSD combinators/schemas/codegen

Safe HaskellSafe
LanguageHaskell2010

Fadno.Xml.EmitXml

Contents

Description

Emit an xml-like AST with renderers to String and Element. Intended for use with generated code.

Synopsis

Rendering functions

renderString :: XmlRep -> String Source #

render AST to String.

renderElement :: XmlRep -> Element Source #

render AST to Element.

renderFile :: EmitXml a => FilePath -> a -> IO () Source #

API types

class EmitXml a where Source #

Emit AST.

Minimal complete definition

emitXml

Methods

emitXml :: a -> XmlRep Source #

Instances

EmitXml Bool Source # 

Methods

emitXml :: Bool -> XmlRep Source #

EmitXml Double Source # 
EmitXml Float Source # 

Methods

emitXml :: Float -> XmlRep Source #

EmitXml Int Source # 

Methods

emitXml :: Int -> XmlRep Source #

EmitXml Decimal Source # 
EmitXml String Source # 
EmitXml Voice Source # 

Methods

emitXml :: Voice -> XmlRep Source #

EmitXml Tuning Source # 
EmitXml TraditionalKey Source # 
EmitXml Staff Source # 

Methods

emitXml :: Staff -> XmlRep Source #

EmitXml Slash Source # 

Methods

emitXml :: Slash -> XmlRep Source #

EmitXml ScorePart Source # 
EmitXml ScoreHeader Source # 
EmitXml GrpPartGroup Source # 
EmitXml NonTraditionalKey Source # 
EmitXml MusicData Source # 
EmitXml GrpLevel Source # 
EmitXml LeftRightMargins Source # 
EmitXml Layout Source # 
EmitXml HarmonyChord Source # 
EmitXml GrpFullNote Source # 
EmitXml Footnote Source # 
EmitXml EditorialVoiceDirection Source # 
EmitXml EditorialVoice Source # 
EmitXml Editorial Source # 
EmitXml Duration Source # 
EmitXml BeatUnit Source # 
EmitXml AllMargins Source # 
EmitXml SeqTimeModification Source # 
EmitXml SeqTime Source # 
EmitXml SeqPageLayout Source # 
EmitXml SeqOrnaments Source # 
EmitXml SeqMetronomeTuplet Source # 
EmitXml SeqMetronome Source # 
EmitXml SeqLyric Source # 
EmitXml SeqLyric0 Source # 
EmitXml SeqDisplayStepOctave Source # 
EmitXml SeqCredit Source # 
EmitXml ChxTime Source # 
EmitXml ChxTechnical Source # 
EmitXml ChxScoreInstrument Source # 
EmitXml ChxPartList Source # 
EmitXml ChxOrnaments Source # 
EmitXml ChxNote Source # 
EmitXml ChxNotations Source # 
EmitXml ChxNameDisplay Source # 
EmitXml ChxMusicData Source # 
EmitXml ChxMetronome Source # 
EmitXml ChxMetronome0 Source # 
EmitXml ChxMeasureStyle Source # 
EmitXml ChxLyric Source # 
EmitXml ChxKey Source # 
EmitXml ChxHarmonyChord Source # 
EmitXml ChxHarmonic1 Source # 
EmitXml ChxHarmonic Source # 
EmitXml FullNote Source # 
EmitXml ChxEncoding Source # 
EmitXml ChxDynamics Source # 
EmitXml ChxDirectionType Source # 
EmitXml ChxCredit Source # 
EmitXml ChxBend Source # 
EmitXml ChxArticulations Source # 
EmitXml Work Source # 

Methods

emitXml :: Work -> XmlRep Source #

EmitXml Wedge Source # 

Methods

emitXml :: Wedge -> XmlRep Source #

EmitXml WavyLine Source # 
EmitXml TypedText Source # 
EmitXml TupletType Source # 
EmitXml TupletPortion Source # 
EmitXml TupletNumber Source # 
EmitXml TupletDot Source # 
EmitXml Tuplet Source # 
EmitXml Tremolo Source # 
EmitXml Transpose Source # 
EmitXml TimeModification Source # 
EmitXml Time Source # 

Methods

emitXml :: Time -> XmlRep Source #

EmitXml Tied Source # 

Methods

emitXml :: Tied -> XmlRep Source #

EmitXml Tie Source # 

Methods

emitXml :: Tie -> XmlRep Source #

EmitXml TextElementData Source # 
EmitXml Technical Source # 
EmitXml SystemMargins Source # 
EmitXml SystemLayout Source # 
EmitXml Supports Source # 
EmitXml StyleText Source # 
EmitXml StrongAccent Source # 
EmitXml CmpString Source # 
EmitXml Stem Source # 

Methods

emitXml :: Stem -> XmlRep Source #

EmitXml StaffTuning Source # 
EmitXml StaffLayout Source # 
EmitXml StaffDetails Source # 
EmitXml Sound Source # 

Methods

emitXml :: Sound -> XmlRep Source #

EmitXml Slur Source # 

Methods

emitXml :: Slur -> XmlRep Source #

EmitXml Slide Source # 

Methods

emitXml :: Slide -> XmlRep Source #

EmitXml CmpSlash Source # 
EmitXml ScoreTimewise Source # 
EmitXml ScorePartwise Source # 
EmitXml CmpScorePart Source # 
EmitXml ScoreInstrument Source # 
EmitXml Scordatura Source # 
EmitXml Scaling Source # 
EmitXml RootStep Source # 
EmitXml RootAlter Source # 
EmitXml Root Source # 

Methods

emitXml :: Root -> XmlRep Source #

EmitXml Repeat Source # 
EmitXml Rehearsal Source # 
EmitXml Print Source # 

Methods

emitXml :: Print -> XmlRep Source #

EmitXml PlacementText Source # 
EmitXml Pitch Source # 

Methods

emitXml :: Pitch -> XmlRep Source #

EmitXml PerMinute Source # 
EmitXml PedalTuning Source # 
EmitXml Pedal Source # 

Methods

emitXml :: Pedal -> XmlRep Source #

EmitXml PartSymbol Source # 
EmitXml PartName Source # 
EmitXml PartList Source # 
EmitXml PartGroup Source # 
EmitXml Part Source # 

Methods

emitXml :: Part -> XmlRep Source #

EmitXml CmpPart Source # 
EmitXml PageMargins Source # 
EmitXml PageLayout Source # 
EmitXml OtherNotation Source # 
EmitXml OtherDirection Source # 
EmitXml OtherAppearance Source # 
EmitXml Ornaments Source # 
EmitXml Opus Source # 

Methods

emitXml :: Opus -> XmlRep Source #

EmitXml Offset Source # 
EmitXml OctaveShift Source # 
EmitXml Notehead Source # 
EmitXml NoteType Source # 
EmitXml NoteSize Source # 
EmitXml Note Source # 

Methods

emitXml :: Note -> XmlRep Source #

EmitXml Notations Source # 
EmitXml NonArpeggiate Source # 
EmitXml NameDisplay Source # 
EmitXml MultipleRest Source # 
EmitXml Mordent Source # 
EmitXml MiscellaneousField Source # 
EmitXml Miscellaneous Source # 
EmitXml MidiInstrument Source # 
EmitXml MidiDevice Source # 
EmitXml MetronomeTuplet Source # 
EmitXml MetronomeNote Source # 
EmitXml MetronomeBeam Source # 
EmitXml Metronome Source # 
EmitXml MeasureStyle Source # 
EmitXml MeasureRepeat Source # 
EmitXml MeasureNumbering Source # 
EmitXml MeasureLayout Source # 
EmitXml CmpMeasure Source # 
EmitXml Measure Source # 
EmitXml LyricLanguage Source # 
EmitXml LyricFont Source # 
EmitXml Lyric Source # 

Methods

emitXml :: Lyric -> XmlRep Source #

EmitXml Link Source # 

Methods

emitXml :: Link -> XmlRep Source #

EmitXml LineWidth Source # 
EmitXml Level Source # 

Methods

emitXml :: Level -> XmlRep Source #

EmitXml Kind Source # 

Methods

emitXml :: Kind -> XmlRep Source #

EmitXml KeyOctave Source # 
EmitXml Key Source # 

Methods

emitXml :: Key -> XmlRep Source #

EmitXml Inversion Source # 
EmitXml Instrument Source # 
EmitXml Image Source # 

Methods

emitXml :: Image -> XmlRep Source #

EmitXml Identification Source # 
EmitXml HeelToe Source # 
EmitXml HarpPedals Source # 
EmitXml Harmony Source # 
EmitXml Harmonic Source # 
EmitXml HammerOnPullOff Source # 
EmitXml Grouping Source # 
EmitXml GroupSymbol Source # 
EmitXml GroupName Source # 
EmitXml GroupBarline Source # 
EmitXml Grace Source # 

Methods

emitXml :: Grace -> XmlRep Source #

EmitXml Glissando Source # 
EmitXml Fret Source # 

Methods

emitXml :: Fret -> XmlRep Source #

EmitXml FrameNote Source # 
EmitXml Frame Source # 

Methods

emitXml :: Frame -> XmlRep Source #

EmitXml Forward Source # 
EmitXml FormattedText Source # 
EmitXml FirstFret Source # 
EmitXml Fingering Source # 
EmitXml FiguredBass Source # 
EmitXml Figure Source # 
EmitXml Fermata Source # 
EmitXml Feature Source # 
EmitXml Extend Source # 
EmitXml Ending Source # 
EmitXml Encoding Source # 
EmitXml EmptyTrillSound Source # 
EmitXml EmptyPrintStyle Source # 
EmitXml EmptyPlacement Source # 
EmitXml EmptyLine Source # 
EmitXml EmptyFont Source # 
EmitXml Empty Source # 

Methods

emitXml :: Empty -> XmlRep Source #

EmitXml Elision Source # 
EmitXml Dynamics Source # 
EmitXml DisplayStepOctave Source # 
EmitXml Directive Source # 
EmitXml DirectionType Source # 
EmitXml Direction Source # 
EmitXml DegreeValue Source # 
EmitXml DegreeType Source # 
EmitXml DegreeAlter Source # 
EmitXml Degree Source # 
EmitXml Defaults Source # 
EmitXml Dashes Source # 
EmitXml Credit Source # 
EmitXml Clef Source # 

Methods

emitXml :: Clef -> XmlRep Source #

EmitXml Cancel Source # 
EmitXml Bracket Source # 
EmitXml Bookmark Source # 
EmitXml Bend Source # 

Methods

emitXml :: Bend -> XmlRep Source #

EmitXml BeatRepeat Source # 
EmitXml Beam Source # 

Methods

emitXml :: Beam -> XmlRep Source #

EmitXml BassStep Source # 
EmitXml BassAlter Source # 
EmitXml Bass Source # 

Methods

emitXml :: Bass -> XmlRep Source #

EmitXml Barre Source # 

Methods

emitXml :: Barre -> XmlRep Source #

EmitXml Barline Source # 
EmitXml BarStyleColor Source # 
EmitXml Backup Source # 
EmitXml Attributes Source # 
EmitXml Articulations Source # 
EmitXml Arpeggiate Source # 
EmitXml Appearance Source # 
EmitXml AccordionRegistration Source # 
EmitXml Accord Source # 
EmitXml AccidentalText Source # 
EmitXml AccidentalMark Source # 
EmitXml Accidental Source # 
EmitXml SumPositiveIntegerOrEmpty Source # 
EmitXml SumNumberOrNormal Source # 
EmitXml SumLang Source # 
EmitXml YyyyMmDd Source # 
EmitXml YesNoNumber Source # 
EmitXml YesNo Source # 

Methods

emitXml :: YesNo -> XmlRep Source #

EmitXml WedgeType Source # 
EmitXml ValignImage Source # 
EmitXml Valign Source # 
EmitXml UprightInverted Source # 
EmitXml UpDownStop Source # 
EmitXml UpDown Source # 
EmitXml Type Source # 

Methods

emitXml :: Type -> XmlRep Source #

EmitXml TwoNoteTurn Source # 
EmitXml TrillStep Source # 
EmitXml TrillBeats Source # 
EmitXml TremoloMarks Source # 
EmitXml TopBottom Source # 
EmitXml Token Source # 

Methods

emitXml :: Token -> XmlRep Source #

EmitXml TimeSymbol Source # 
EmitXml TextDirection Source # 
EmitXml Tenths Source # 
EmitXml SymbolSize Source # 
EmitXml Syllabic Source # 
EmitXml StringNumber Source # 
EmitXml Step Source # 

Methods

emitXml :: Step -> XmlRep Source #

EmitXml StemValue Source # 
EmitXml StartStopSingle Source # 
EmitXml StartStopDiscontinue Source # 
EmitXml StartStopContinue Source # 
EmitXml StartStopChange Source # 
EmitXml StartStop Source # 
EmitXml StartNote Source # 
EmitXml StaffType Source # 
EmitXml StaffNumber Source # 
EmitXml StaffLine Source # 
EmitXml ShowTuplet Source # 
EmitXml ShowFrets Source # 
EmitXml SmpShow Source # 
EmitXml Semitones Source # 
EmitXml RotationDegrees Source # 
EmitXml RightLeftMiddle Source # 
EmitXml RehearsalEnclosure Source # 
EmitXml PositiveInteger Source # 
EmitXml PositiveIntegerOrEmpty Source # 
EmitXml PositiveDivisions Source # 
EmitXml Percent Source # 
EmitXml OverUnder Source # 
EmitXml Octave Source # 
EmitXml NumberOrNormal Source # 
EmitXml NumberOfLines Source # 
EmitXml NumberLevel Source # 
EmitXml NoteheadValue Source # 
EmitXml NoteTypeValue Source # 
EmitXml NoteSizeType Source # 
EmitXml NormalizedString Source # 
EmitXml NonNegativeInteger Source # 
EmitXml NonNegativeDecimal Source # 
EmitXml Mode Source # 

Methods

emitXml :: Mode -> XmlRep Source #

EmitXml Millimeters Source # 
EmitXml Midi16384 Source # 
EmitXml Midi16 Source # 
EmitXml Midi128 Source # 
EmitXml MeasureNumberingValue Source # 
EmitXml MarginType Source # 
EmitXml LineWidthType Source # 
EmitXml LineType Source # 
EmitXml LineShape Source # 
EmitXml LineEnd Source # 
EmitXml LeftRight Source # 
EmitXml LeftCenterRight Source # 
EmitXml Language Source # 
EmitXml Lang Source # 

Methods

emitXml :: Lang -> XmlRep Source #

EmitXml KindValue Source # 
EmitXml HarmonyType Source # 
EmitXml GroupSymbolValue Source # 
EmitXml GroupBarlineValue Source # 
EmitXml FontWeight Source # 
EmitXml FontStyle Source # 
EmitXml FontSize Source # 
EmitXml Fifths Source # 
EmitXml FermataShape Source # 
EmitXml Fan Source # 

Methods

emitXml :: Fan -> XmlRep Source #

EmitXml EndingNumber Source # 
EmitXml Enclosure Source # 
EmitXml Divisions Source # 
EmitXml DegreeTypeValue Source # 
EmitXml CssFontSize Source # 
EmitXml CommaSeparatedText Source # 
EmitXml Color Source # 

Methods

emitXml :: Color -> XmlRep Source #

EmitXml ClefSign Source # 
EmitXml BeamValue Source # 
EmitXml BeamLevel Source # 
EmitXml BarStyle Source # 
EmitXml BackwardForward Source # 
EmitXml Actuate Source # 
EmitXml AccordionMiddle Source # 
EmitXml AccidentalValue Source # 
EmitXml AboveBelow Source # 
EmitXml Name Source # 

Methods

emitXml :: Name -> XmlRep Source #

EmitXml NMTOKEN Source # 
EmitXml NCName Source # 
EmitXml IDREF Source # 

Methods

emitXml :: IDREF -> XmlRep Source #

EmitXml ID Source # 

Methods

emitXml :: ID -> XmlRep Source #

EmitXml a => EmitXml [a] Source # 

Methods

emitXml :: [a] -> XmlRep Source #

EmitXml a => EmitXml (Maybe a) Source # 

Methods

emitXml :: Maybe a -> XmlRep Source #

data XmlRep where Source #

XML AST.

Constructors

XEmpty :: XmlRep 
XLit :: String -> XmlRep 
XShow :: Show a => a -> XmlRep 
XElement :: QN -> XmlRep -> XmlRep 
XAttr :: QN -> XmlRep -> XmlRep 
XText :: XmlRep -> XmlRep 
XContent :: {..} -> XmlRep 

Fields

XReps :: [XmlRep] -> XmlRep 

Instances

data QN Source #

QName type.

Constructors

QN 

Instances

Show QN Source # 

Methods

showsPrec :: Int -> QN -> ShowS #

show :: QN -> String #

showList :: [QN] -> ShowS #