If I have this right, Stream is a monad transformer.<br>Stream s m t means that it parses &#39;s&#39;, is stacked with monad &#39;m&#39; and has a result of type &#39;t&#39;<br><br>So Identity is a monad, the simplest monad, defined as such:<br>

<br>newtype Indentity t = Identity { runIdentity :: t }<br><br>It&#39;s the identity monad, that does nothing special but wrapping its result.<br><br><br><div class="gmail_quote">2011/10/8 Captain Freako <span dir="ltr">&lt;<a href="mailto:capn.freako@gmail.com">capn.freako@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br><br>In this definition from the Parsec library:<br><br><pre><span>parse</span> <span>::</span> <span>(</span><span>Stream</span> <span>s</span> <span>Identity</span> <span>t</span><span>)</span>
<a name="132e3dac9816c077_line-571"></a>      <span>=&gt;</span> <span>Parsec</span> <span>s</span> <span>()</span> <span>a</span> <span>-&gt;</span> <span>SourceName</span> <span>-&gt;</span> <span>s</span> <span>-&gt;</span> <span>Either</span> <span>ParseError</span> <span>a</span>
<a name="132e3dac9816c077_line-572"></a><span>parse</span> <span>p</span> <span>=</span> <span>runP</span> <span>p</span> <span>()<br>
<br></span></pre>what&#39;s the significance of `Identity t&#39;?<br>(`t&#39; isn&#39;t used anywhere.)<br><br>Thanks,<br>-db<br><br>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>