This file is indexed.

/usr/share/doc/libghc-xml-conduit-writer-doc/html/xml-conduit-writer.txt is in libghc-xml-conduit-writer-doc 0.1.1.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Warm and fuzzy creation of XML documents.
--   
--   “It can scarcely be denied that the supreme goal of all theory is to
--   make the irreducible basic elements as simple and as few as possible
--   without having to surrender the adequate representation of a single
--   datum of experience.” ­— Albert Einstein
--   
--   Check out more examples in test/Main.hs and look at the results with
--   --enable-tests.
@package xml-conduit-writer
@version 0.1.1.1


-- | Overcome XML insanity, node by node.
--   
--   <pre>
--   {-# LANGUAGE OverloadedStrings #-}
--   
--   let doc = document "root" $ do
--       element "hello" $ content "world"
--       element "hierarchy" $ do
--           element "simple" True
--           element "as" ("it should be" :: Text)
--           toXML $ Just . T.pack $ "like this"
--       comment "that's it!"
--   </pre>
module Text.XML.Writer

-- | Create a simple Document starting with a root element.
document :: Name -> XML -> Document

-- | Generate a SOAPv1.1 document.
--   
--   Empty header will be ignored. Envelope uses a <tt>soapenv</tt> prefix.
--   Works great with <a>ToXML</a> class.
--   
--   <pre>
--   data BigData = BigData { webScale :: Bool }
--   instance ToXML BigData where
--       toXML (BigData ws) = element ("v" !: "{vendor:uri}bigData") $ toXML ws
--   let doc = soap () (BigData True)
--   </pre>
soap :: (ToXML h, ToXML b) => h -> b -> Document

-- | Render document using xml-conduit's pretty-printer.
pprint :: Document -> IO ()

-- | Node container to be rendered as children nodes.
type XML = Writer (DList Node) ()

-- | Insert one node.
node :: Node -> XML

-- | Insert an <a>Instruction</a> node.
instruction :: Text -> Text -> XML

-- | Insert a text comment node.
comment :: Text -> XML

-- | Insert an <a>Element</a> node constructed with name and children.
element :: (ToXML a) => Name -> a -> XML

-- | Insert an <a>Element</a> node converted from Maybe value or do
--   nothing.
elementMaybe :: (ToXML a) => Name -> Maybe a -> XML

-- | Insert an <a>Element</a> node constructed with name, attributes and
--   children.
elementA :: (ToXML a) => Name -> [(Name, Text)] -> a -> XML

-- | Insert text content node.
content :: Text -> XML

-- | Do nothing.
empty :: XML

-- | Mass-convert to nodes.
--   
--   <pre>
--   let array = element "container" $ many "wrapper" [1..3]
--   </pre>
--   
--   Which gives:
--   
--   <pre>
--   &lt;container&gt;
--       &lt;wrapper&gt;1&lt;/wrapper&gt;
--       &lt;wrapper&gt;2&lt;/wrapper&gt;
--       &lt;wrapper&gt;3&lt;/wrapper&gt;
--   &lt;/container&gt;
--   </pre>
--   
--   Use `mapM_ toXML xs` to convert a list without wrapping each item in
--   separate element.
--   
--   <pre>
--   let mess = element "container" $ mapM_ toXML ["chunky", "chunk"]
--   </pre>
--   
--   Content nodes tend to glue together:
--   
--   <pre>
--   &lt;container&gt;chunkychunk&lt;/container&gt;
--   </pre>
many :: (ToXML a) => Name -> [a] -> XML

-- | Convert collected nodes to a list of child nodes.
render :: XML -> [Node]

-- | Attach a prefix to a Name.
--   
--   Because simply placing a colon in an element name yields
--   <a>Nothing</a> as a prefix and children will revert to en empty
--   namespace.
(!:) :: Text -> Name -> Name

-- | Provide instances for this class to use your data as <a>XML</a> nodes.
class ToXML a
toXML :: ToXML a => a -> XML
instance Text.XML.Writer.ToXML ()
instance Text.XML.Writer.ToXML Text.XML.Writer.XML
instance Text.XML.Writer.ToXML Data.Text.Internal.Text
instance Text.XML.Writer.ToXML Data.Text.Internal.Lazy.Text
instance Text.XML.Writer.ToXML GHC.Types.Bool
instance Text.XML.Writer.ToXML GHC.Types.Float
instance Text.XML.Writer.ToXML GHC.Types.Double
instance Text.XML.Writer.ToXML GHC.Types.Int
instance Text.XML.Writer.ToXML GHC.Integer.Type.Integer
instance Text.XML.Writer.ToXML GHC.Types.Char
instance Text.XML.Writer.ToXML a => Text.XML.Writer.ToXML (GHC.Base.Maybe a)
instance Data.String.IsString Text.XML.Writer.XML