{-# LINE 1 "XML.hs.neat" #-} module Text.Neat.Output.XML (outputXML) where import Text.Neat.Template import Text.Neat.Output instance Output File where output (File path block) = ({-# LINE 8 "XML.hs.neat" #-} "\n" ++ ({-# LINE 10 "XML.hs.neat" #-} output (block)) ++ {-# LINE 10 "XML.hs.neat" #-} "\n"){-# LINE 12 "XML.hs.neat" #-} instance Output Block where output (Block chunks) = ({-# LINE 15 "XML.hs.neat" #-} "\n " ++ ({-# LINE 17 "XML.hs.neat" #-} let _l = list (chunks) in if (not . null) _l then _l >>= \{-# LINE 17 "XML.hs.neat" #-} chunk -> ({-# LINE 17 "XML.hs.neat" #-} "" ++ ({-# LINE 18 "XML.hs.neat" #-} output (chunk)) ++ {-# LINE 18 "XML.hs.neat" #-} "") else []) ++ {-# LINE 19 "XML.hs.neat" #-} "\n "){-# LINE 21 "XML.hs.neat" #-} instance Output Chunk where output (Chunk location element) = ({-# LINE 24 "XML.hs.neat" #-} "\n " ++ ({-# LINE 26 "XML.hs.neat" #-} output (element)) ++ {-# LINE 26 "XML.hs.neat" #-} "\n "){-# LINE 28 "XML.hs.neat" #-} instance Output Case where output (Case pattern block) = ({-# LINE 31 "XML.hs.neat" #-} "\n " ++ ({-# LINE 33 "XML.hs.neat" #-} output (pattern)) ++ {-# LINE 33 "XML.hs.neat" #-} "" ++ ({-# LINE 34 "XML.hs.neat" #-} output (block)) ++ {-# LINE 34 "XML.hs.neat" #-} "\n "){-# LINE 36 "XML.hs.neat" #-} instance Output Location where output (Location file line) = ({-# LINE 39 "XML.hs.neat" #-} "file=" ++ ({-# LINE 39 "XML.hs.neat" #-} output (quote $ file)) ++ {-# LINE 39 "XML.hs.neat" #-} " line=\"" ++ ({-# LINE 39 "XML.hs.neat" #-} output (line)) ++ {-# LINE 39 "XML.hs.neat" #-} "\""){-# LINE 39 "XML.hs.neat" #-} instance Output Value where output (Value location pipeline) = ({-# LINE 42 "XML.hs.neat" #-} "\n \n " ++ ({-# LINE 45 "XML.hs.neat" #-} let _l = list (pipeline) in if (not . null) _l then _l >>= \{-# LINE 45 "XML.hs.neat" #-} pipe -> ({-# LINE 45 "XML.hs.neat" #-} "\n ") else []) ++ {-# LINE 47 "XML.hs.neat" #-} "\n \n "){-# LINE 50 "XML.hs.neat" #-} instance Output Pattern where output (Pattern location pattern) = ({-# LINE 53 "XML.hs.neat" #-} "\n "){-# LINE 55 "XML.hs.neat" #-} instance Output Element where output (Output value) = ({-# LINE 58 "XML.hs.neat" #-} "\n " ++ ({-# LINE 59 "XML.hs.neat" #-} output (value)) ++ {-# LINE 59 "XML.hs.neat" #-} ""){-# LINE 60 "XML.hs.neat" #-} output (Comment comment) = ({-# LINE 62 "XML.hs.neat" #-} "\n "){-# LINE 64 "XML.hs.neat" #-} output (Define (Function location name pattern) block) = ({-# LINE 66 "XML.hs.neat" #-} "\n " ++ ({-# LINE 68 "XML.hs.neat" #-} output (pattern)) ++ {-# LINE 68 "XML.hs.neat" #-} "" ++ ({-# LINE 69 "XML.hs.neat" #-} output (block)) ++ {-# LINE 69 "XML.hs.neat" #-} "\n "){-# LINE 71 "XML.hs.neat" #-} output (Filter value block) = ({-# LINE 73 "XML.hs.neat" #-} "\n " ++ ({-# LINE 75 "XML.hs.neat" #-} output (value)) ++ {-# LINE 75 "XML.hs.neat" #-} "" ++ ({-# LINE 76 "XML.hs.neat" #-} output (block)) ++ {-# LINE 76 "XML.hs.neat" #-} "\n "){-# LINE 78 "XML.hs.neat" #-} output (For binding block else') = ({-# LINE 80 "XML.hs.neat" #-} "\n " ++ ({-# LINE 82 "XML.hs.neat" #-} output (binding)) ++ {-# LINE 82 "XML.hs.neat" #-} "" ++ ({-# LINE 83 "XML.hs.neat" #-} output (block)) ++ {-# LINE 83 "XML.hs.neat" #-} "" ++ ({-# LINE 84 "XML.hs.neat" #-} if (not . zero) (else') then ({-# LINE 84 "XML.hs.neat" #-} "" ++ ({-# LINE 84 "XML.hs.neat" #-} output (else')) ++ {-# LINE 84 "XML.hs.neat" #-} "") else []) ++ {-# LINE 84 "XML.hs.neat" #-} "\n "){-# LINE 86 "XML.hs.neat" #-} output (If value block else') = ({-# LINE 88 "XML.hs.neat" #-} "\n " ++ ({-# LINE 90 "XML.hs.neat" #-} output (value)) ++ {-# LINE 90 "XML.hs.neat" #-} "" ++ ({-# LINE 91 "XML.hs.neat" #-} output (block)) ++ {-# LINE 91 "XML.hs.neat" #-} "" ++ ({-# LINE 92 "XML.hs.neat" #-} if (not . zero) (else') then ({-# LINE 92 "XML.hs.neat" #-} "" ++ ({-# LINE 92 "XML.hs.neat" #-} output (else')) ++ {-# LINE 92 "XML.hs.neat" #-} "") else []) ++ {-# LINE 92 "XML.hs.neat" #-} "\n "){-# LINE 94 "XML.hs.neat" #-} output (Switch value cases default') = ({-# LINE 96 "XML.hs.neat" #-} "\n " ++ ({-# LINE 98 "XML.hs.neat" #-} output (value)) ++ {-# LINE 98 "XML.hs.neat" #-} "" ++ ({-# LINE 99 "XML.hs.neat" #-} let _l = list (cases) in if (not . null) _l then _l >>= \{-# LINE 99 "XML.hs.neat" #-} case' -> ({-# LINE 99 "XML.hs.neat" #-} "" ++ ({-# LINE 100 "XML.hs.neat" #-} output (case')) ++ {-# LINE 100 "XML.hs.neat" #-} "") else []) ++ {-# LINE 101 "XML.hs.neat" #-} "" ++ ({-# LINE 102 "XML.hs.neat" #-} if (not . zero) (default') then ({-# LINE 102 "XML.hs.neat" #-} "" ++ ({-# LINE 102 "XML.hs.neat" #-} output (default')) ++ {-# LINE 102 "XML.hs.neat" #-} "") else []) ++ {-# LINE 102 "XML.hs.neat" #-} "\n "){-# LINE 104 "XML.hs.neat" #-} output (With binding block) = ({-# LINE 106 "XML.hs.neat" #-} "\n " ++ ({-# LINE 108 "XML.hs.neat" #-} output (binding)) ++ {-# LINE 108 "XML.hs.neat" #-} "" ++ ({-# LINE 109 "XML.hs.neat" #-} output (block)) ++ {-# LINE 109 "XML.hs.neat" #-} "\n "){-# LINE 111 "XML.hs.neat" #-} output (Text text) = ({-# LINE 113 "XML.hs.neat" #-} ""){-# LINE 113 "XML.hs.neat" #-} outputXML :: File -> String outputXML = output