-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Quasi-quoters for XML and HTML Documents
--   
--   Please see <a>README.md</a>.
@package xml-html-qq
@version 0.1.0.1


module Text.XMLHTML.Internal

-- | Create a <a>QuasiQuoter</a> for <a>Exp</a>s.
createExpQuasiQuoter :: (String -> Q Exp) -> QuasiQuoter

-- | This function handles errors that occur when a <a>Document</a> can't
--   be parsed.
--   
--   This function throws an <a>error</a> with an explanation of what
--   happened.
handleParseDocErr :: String -> String -> String -> SomeException -> a
instance Language.Haskell.TH.Syntax.Lift Data.XML.Types.ExternalID
instance Language.Haskell.TH.Syntax.Lift Text.XML.Node
instance Language.Haskell.TH.Syntax.Lift Data.XML.Types.Name
instance Language.Haskell.TH.Syntax.Lift Data.XML.Types.Instruction
instance Language.Haskell.TH.Syntax.Lift Data.XML.Types.Doctype
instance Language.Haskell.TH.Syntax.Lift Text.XML.Element
instance Language.Haskell.TH.Syntax.Lift Data.XML.Types.Miscellaneous
instance Language.Haskell.TH.Syntax.Lift Data.XML.Types.Prologue
instance Language.Haskell.TH.Syntax.Lift Text.XML.Document


-- | This module provides a quasi-quoter for XML <a>Document</a>s. See the
--   <a>xml</a> function for some examples.
--   
--   The difference between <a>Text.XML.QQ</a> and <a>Text.HTML.QQ</a> is
--   the function that is used to parse the input <a>String</a> into a
--   <a>Document</a>.
--   
--   <a>xml</a> uses <a>parseText</a> to parse the input <a>String</a>.
--   <a>parseText</a> returns an error on a malformed document. This is
--   generally what you want for XML documents.
--   
--   <a>html</a> uses <a>DOM</a>.parseLT' to parse the input <a>String</a>.
--   <a>parseLT</a> will parse any HTML document, skipping parts of the
--   document that are malformed. This is generally what you want for HTML
--   documents.
module Text.XML.QQ

-- | This <a>QuasiQuoter</a> produces XML <a>Document</a>s.
--   
--   This <a>QuasiQuoter</a> produces expressions of type <tt><a>Either</a>
--   <a>SomeException</a> <a>Document</a></tt>. It produces a
--   <tt><a>Left</a> <a>SomeException</a></tt> when the input string cannot
--   be parsed into an XML <a>Document</a>.
--   
--   Here's a simple example of using it:
--   
--   <pre>
--   &gt;&gt;&gt; [xml|&lt;html&gt;&lt;/html&gt;|] :: Either SomeException Document
--   Right (Document {documentPrologue = Prologue {prologueBefore = [], prologueDoctype = Nothing, prologueAfter = []}, documentRoot = Element {elementName = Name {nameLocalName = "html", nameNamespace = Nothing, namePrefix = Nothing}, elementAttributes = fromList [], elementNodes = []}, documentEpilogue = []})
--   </pre>
--   
--   Internally, this function is using the <a>heterocephalus</a> package.
--   This means you can use variable interpolation, as well as
--   <tt>forall</tt>, <tt>if</tt>, and <tt>case</tt> control statements.
--   Checkout the <a>heterocephalus README</a> for more info.
--   
--   <pre>
--   &gt;&gt;&gt; let a = "hello world"
--   
--   &gt;&gt;&gt; [xml|&lt;html&gt;#{a}&lt;/html&gt;|]
--   Right ...
--   </pre>
--   
--   Here's an example of invalue XML that will produce a <a>Left</a>
--   value:
--   
--   <pre>
--   &gt;&gt;&gt; [xml|&lt;html &lt;/html&gt;|]
--   Left ...
--   </pre>
--   
--   Here's an example of a template that can be parsed as an HTML
--   <a>Document</a>, but not as an XML <a>Document</a>:
--   
--   <pre>
--   &gt;&gt;&gt; [xml|&lt;html&gt;&lt;br&gt;&lt;/html&gt;|]
--   Left ...
--   </pre>
xml :: QuasiQuoter

-- | This function is just like <a>xml</a>, but produces expressions of
--   type <a>Document</a>.
--   
--   If your input string cannot be parsed into a valid <a>Document</a>, an
--   error will be thrown at runtime with <a>error</a>.
--   
--   This function is nice to use in GHCi or tests, but should <b>NOT</b>
--   be used in production code.
--   
--   Here's a simple example of using it:
--   
--   <pre>
--   &gt;&gt;&gt; [xmlUnsafe|&lt;html&gt;&lt;/html&gt;|] :: Document
--   Document ...
--   </pre>
xmlUnsafe :: QuasiQuoter

-- | This function is similar to <a>xml</a>, but doesn't allow variable
--   interpolation or control statements. It produces expressions of type
--   <a>Document</a>.
--   
--   An error will be thrown at compile-time if the input string cannot be
--   parsed into a <a>Document</a>.
--   
--   Unlike <a>xmlUnsafe</a>, this function is safe to use in production
--   code.
--   
--   Here's a simple example of using it:
--   
--   <pre>
--   &gt;&gt;&gt; [xmlRaw|&lt;html&gt;&lt;/html&gt;|] :: Document
--   Document ...
--   </pre>
xmlRaw :: QuasiQuoter
data Document

-- | The <tt>SomeException</tt> type is the root of the exception type
--   hierarchy. When an exception of type <tt>e</tt> is thrown, behind the
--   scenes it is encapsulated in a <tt>SomeException</tt>.
data SomeException


-- | This module provides a quasi-quoter for HTML <a>Document</a>s. See the
--   <a>html</a> function for some examples.
--   
--   See <a>Text.XML.QQ</a> for an explanation of the difference between
--   <a>Text.HTML.QQ</a> and <a>Text.XML.QQ</a>.
module Text.HTML.QQ

-- | This <a>QuasiQuoter</a> produces HTML <a>Document</a>s.
--   
--   This <a>QuasiQuoter</a> produces expressions of type <a>Document</a>.
--   
--   Here's a simple example of using it:
--   
--   <pre>
--   &gt;&gt;&gt; [html|&lt;html&gt;&lt;/html&gt;|] :: Document
--   Document {documentPrologue = Prologue {prologueBefore = [], prologueDoctype = Nothing, prologueAfter = []}, documentRoot = Element {elementName = Name {nameLocalName = "html", nameNamespace = Nothing, namePrefix = Nothing}, elementAttributes = fromList [], elementNodes = []}, documentEpilogue = []}
--   </pre>
--   
--   Internally, this function is using the <a>heterocephalus</a> package.
--   This means you can use variable interpolation, as well as
--   <tt>forall</tt>, <tt>if</tt>, and <tt>case</tt> control statements.
--   Checkout the <a>heterocephalus README</a> for more info.
--   
--   <pre>
--   &gt;&gt;&gt; let a = "hello world"
--   
--   &gt;&gt;&gt; [html|&lt;html&gt;#{a}&lt;/html&gt;|]
--   Document ...
--   </pre>
--   
--   Even invalid HTML will still parse.
--   
--   <pre>
--   &gt;&gt;&gt; [html|&lt;html &lt;/html&gt;|]
--   Document ...
--   </pre>
--   
--   Here's an example of a template that can be parsed as an HTML
--   <a>Document</a>, but not as an XML <a>Document</a>:
--   
--   <pre>
--   &gt;&gt;&gt; [html|&lt;html&gt;&lt;br&gt;&lt;/html&gt;|]
--   Document ...
--   </pre>
html :: QuasiQuoter

-- | This function is the same as <a>html</a>, but doesn't allow variable
--   interpolation or control statements. It also produces expressions of
--   type <a>Document</a>.
--   
--   Here's a simple example of using it:
--   
--   <pre>
--   &gt;&gt;&gt; [htmlRaw|&lt;html&gt;&lt;/html&gt;|] :: Document
--   Document ...
--   </pre>
htmlRaw :: QuasiQuoter
data Document
