...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"><<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>></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 <<a href="mailto:arnaud.oqube@gmail.com">arnaud.oqube@gmail.com</a>> wrote:<br>
> For example, while designing some program (a game...) I defined a type class<br>
> thus:<br>
><br>
>> class (Monad io) => CommandIO io where<br>
>> readCommand :: io Command<br>
>> writeResult :: CommandResult -> io ()<br>
<br>
</div>This is in fact one of the reasons to use type classes. In fact,<br>
you'll find a somewhat more general variety of it on Hackage in a<br>
couple of forms, the one I'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>