<div class="gmail_quote"><div class="gmail_quote"><div class="im">On Sun, Jun 5, 2011 at 12:51 PM, KC <span dir="ltr"><<a href="mailto:kc1956@gmail.com" target="_blank">kc1956@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If new intermediate classes crop up then there would be no point in fixing<br>
<br>
class (Applicative m) => Monad m where<br>
<br>
since it would have to be changed if new intermediate classes are found.<br></blockquote><div><br></div></div><div>You might check out a few articles regarding Kleisli arrows [1][2] for possibilities that live between applicative and monad. </div>
<div><br></div><div>Applicative itself is also a little on the strong side. I had to reject Applicative for one model of signal transformers because 'pure' was not a legal constructor, even though 'fmap . const' and '<*>' were okay. And even Functor is too strong if you want effective linearity. I've found Adam Megacz's Generalized Arrows [3] to be a suitable chassis for weaker models. </div>
<div><br></div><div><div>[1] <a href="http://www.haskell.org/haskellwiki/Arrow_tutorial#Kleisli_Arrows" target="_blank">http://www.haskell.org/haskellwiki/Arrow_tutorial#Kleisli_Arrows</a></div><div>[2] <a href="http://lambda-the-ultimate.org/node/4273" target="_blank">http://lambda-the-ultimate.org/node/4273</a></div>
</div><div>[3] <a href="http://www.cs.berkeley.edu/~megacz/garrows/" target="_blank">http://www.cs.berkeley.edu/~megacz/garrows/</a></div><div><br></div><div><br></div></div>
</div><br>