[Haskell-cafe] Re: Simple game: a monad for each player

Heinrich Apfelmus apfelmus at quantentunnel.de
Fri Apr 9 06:17:59 EDT 2010


Gwern Branwen wrote:
> Yves Parès <limestrael at gmail.com> wrote:
>> [...]
>> But when running the game, the program cannot "switch" from a player's monad
>> to another.
>>
>> Do you have any suggestion?
> 
> Your desires remind me of the MonadPrompt package
> <http://hackage.haskell.org/package/MonadPrompt>, which IIRC, has been
> used in some game demos to provide abstraction from IO/test
> harness/pure AI etc.

The game demo can be found by chasing links from the package documentation:

   http://int-e.home.tlink.de/haskell/solitaire.tar.gz


There's also my package "operational"

   http://hackage.haskell.org/package/operational

which implements the same concept. It's throughly explained here:

   http://apfelmus.nfshost.com/articles/operational-monad.html
   http://projects.haskell.org/operational/


Regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com



More information about the Haskell-Cafe mailing list