<br><font size=2 face="sans-serif">Hello,</font>
<br>
<br><tt><font size=2>&gt; On 14/08/07, Jeff Polakow &lt;jeff.polakow@db.com&gt;
wrote:</font></tt>
<br><tt><font size=2>&gt; Of course, the type [Int] denotes a value which
is a list of Ints; <br>
&gt; additionally [Int] can be viewed as a value representing the <br>
&gt; nondeterministic computation of a single Int. Generally, the type
<br>
&gt; Monad m =&gt; m Int can be viewed as a value representing the <br>
&gt; computation of an Int. </font></tt>
<br><tt><font size=2>&gt; <br>
&gt; <br>
&gt; But thats not really right. What exactly m Int does /depends/ on m.
<br>
&gt; It might represent 0 or more computations<br>
&gt; of Int, or computations of Int carrying some extra stuff around, or
<br>
&gt; complex control logic about what the computation does <br>
&gt; when.<br>
&gt; </font></tt>
<br><tt><font size=2>Perhaps the confusion is in the word computation.
I'm using the word in an abstract sense. I do not mean the actual execution
of Haskell code to produce a value. Thus, under this intuition:</font></tt>
<br>
<br><tt><font size=2>The type Int represents a value which denotes an Int.
The type m Int denotes a value which is a single computation (for an unspecified
notion of computation) of an Int. A specific computation of an Int might
result in several, or zero, actual Ints (the list monad); a String or an
Int (the Either String monad); the constant () (the trivial monad); ...</font></tt>
<br>
<br><tt><font size=2>The type Monad m =&gt; m Int cannot represent multiple
computations of an Int. The type Monad m =&gt; [m Int] represents multiple
computations of an Int (of course, any container type can be used in place
of list).</font></tt>
<br><tt><font size=2><br>
-Jeff</font></tt>
<br>
<br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">---</span><br>
<br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">This e-mail may contain confidential and/or privileged information. If you </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">are not the intended recipient (or have received this e-mail in error) </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">please notify the sender immediately and destroy this e-mail. Any </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">unauthorized copying, disclosure or distribution of the material in this </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">e-mail is strictly forbidden.</span><br>