Gwern Branwen wrote: > Yves Parès <limestr...@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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe