<span style="font-family: courier new,monospace;">I'm trying to translate this HXT code to use the Arrow 'do' syntax:<br>readWriteDoc :: String -&gt; IOSLA (XIOState s) b Int<br>readWriteDoc path = readDocument [(a_validate, &quot;0&quot;)] path
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt; writeDocument [(a_output_encoding, isoLatin1)] &quot;-&quot;
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&gt; getErrStatus</span><br style="font-family: courier new,monospace;"><br>This attempt fails to compile:
<span style="font-family: courier new,monospace;"><br></span><span style="font-family: courier new,monospace;">readWriteDoc :: String -&gt; IOSLA (XIOState s) b Int</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
readWriteDoc = proc path -&gt; do </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp; doc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;- readDocument [(a_validate, &quot;0&quot;)]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&lt; path
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">&nbsp;&nbsp; result&nbsp;&nbsp;&nbsp; &lt;- writeDocument [(a_output_encoding, isoLatin1)] &quot;-&quot; -&lt; doc
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp; getErrStatus -&lt; result<br><br>I get this error message:<br>&nbsp;&nbsp;&nbsp; Couldn't match `(-&gt;)' against `IOSLA (XIOState s)'
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expected type: t -&gt; t1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inferred type: IOStateArrow s XmlTree XmlTree<br>&nbsp;&nbsp;&nbsp; Probable cause: `writeDocument' is applied to too many arguments in the call<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (writeDocument [(a_output_encoding, isoLatin1)] &quot;-&quot;)
<br>&nbsp;&nbsp;&nbsp; In the command: writeDocument [(a_output_encoding, isoLatin1)] &quot;-&quot; -&lt; doc<br style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"><br><br>Any idea what I'm doing wrong?
<br></span><br>Thanks,<br>Greg<br><br>