title: HXT: Surprising behavior when reading and writing HTML to String in pure code
body: <p>I want to read HTML from a String, process it and return the changed document as a String using HXT. As this operation does not require IO, I would rather execute the Arrow with <code>runLA</code> than with <code>runX</code>.</p>
  
  <p>The code look like this (omitting the processing for simplicity):</p>
  
  <pre><code>runLA (hread &gt;&gt;&gt; writeDocumentToString [withOutputHTML, withIndent yes]) html
  </code></pre>
  
  <p>However, the surrounding <code>html</code> tag is missing in the result:</p>
  
  <pre><code>["\n  &lt;head&gt;\n    &lt;title&gt;Bogus&lt;/title&gt;\n  &lt;/head&gt;\n  &lt;body&gt;\n        Some trivial bogus text.\n    &lt;/body&gt;\n",""]
  </code></pre>
  
  <p>When I use runX instead like this:</p>
  
  <pre><code>runX (readString [] html &gt;&gt;&gt; writeDocumentToString [withOutputHTML, withIndent yes])
  </code></pre>
  
  <p>I get the expected result:</p>
  
  <pre><code>["&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Bogus&lt;/title&gt;\n  &lt;/head&gt;\n  &lt;body&gt;\n        Some trivial bogus text.\n    &lt;/body&gt;\n&lt;/html&gt;\n"]
  </code></pre>
  
  <p>Why is that, and how can I fix it?</p>