...and the other one being operational (which I find simpler).
On Tue, Jun 7, 2011 at 16:16, Arnaud Bailly <arnaud.oqube@gmail.com> wrote:This is in fact one of the reasons to use type classes. In fact,
> For example, while designing some program (a game...) I defined a type class
> thus:
>
>> class (Monad io) => CommandIO io where
>> readCommand :: io Command
>> writeResult :: CommandResult -> io ()
you'll find a somewhat more general variety of it on Hackage in a
couple of forms, the one I'm most familiar with being MonadPrompt.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe