Good idea! I&#39;d forgotten about monad comprehensions.<br><br><div class="gmail_quote">On Sun, Sep 4, 2011 at 3:11 AM, Shachaf Ben-Kiki <span dir="ltr">&lt;<a href="mailto:shachaf@gmail.com">shachaf@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Sat, Sep 3, 2011 at 19:34, Daniel Peebles &lt;<a href="mailto:pumpkingod@gmail.com">pumpkingod@gmail.com</a>&gt; wrote:<br>

...<br>
<div class="im">&gt; Of course, the fact that the return method is explicitly mentioned in my<br>
&gt; example suggests that unless we do some real voodoo, Applicative would have<br>
&gt; to be a superclass of Monad for this to make sense. But with the new default<br>
&gt; superclass instances people are talking about in GHC, that doesn&#39;t seem too<br>
&gt; unlikely in the near future.<br>
</div>...<br>
<br>
One way to avoid explicitly mentioning return would be to use monad<br>
comprehension syntax, which uses return implicitly, instead of do<br>
notation. This also has the advantage of being &quot;new&quot; in GHC 7.2,<br>
rather than officially being part of Haskell 98/2010, and therefore<br>
being more amenable to various extensions (e.g. there are already<br>
extensions that use MonadPlus/MonadZip/MonadGroup). Applicative would<br>
probably still have to be a superclass of Monad, but the translation<br>
of this syntax is simpler.<br>
<font color="#888888"><br>
    Shachaf<br>
</font></blockquote></div><br>