...and the other one being operational (which I find simpler).<br><br><br><div class="gmail_quote">2011/6/8 Brandon Allbery <span dir="ltr">&lt;<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Tue, Jun 7, 2011 at 16:16, Arnaud Bailly &lt;<a href="mailto:arnaud.oqube@gmail.com">arnaud.oqube@gmail.com</a>&gt; wrote:<br>
&gt; For example, while designing some program (a game...) I defined a type class<br>
&gt; thus:<br>
&gt;<br>
&gt;&gt; class (Monad io) =&gt; CommandIO io where<br>
&gt;&gt;  readCommand  :: io Command<br>
&gt;&gt;  writeResult  :: CommandResult -&gt; io ()<br>
<br>
</div>This is in fact one of the reasons to use type classes.  In fact,<br>
you&#39;ll find a somewhat more general variety of it on Hackage in a<br>
couple of forms, the one I&#39;m most familiar with being MonadPrompt.<br>
<div><div></div><div class="h5"><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>
</div></div></blockquote></div><br>