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

2010-04-14 Thread Heinrich Apfelmus
Bertram Felgenhauer wrote: Yves Parès wrote: I answered my own question by reading this monad-prompt example: http://paste.lisp.org/display/53766 But one issue remains: those examples show how to make play EITHER a human or an AI. I don't see how to make a human player and an AI play

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

2010-04-14 Thread Limestraël
I have some difficulties to see the use of PromptT, because in the tutorial, this type is never mentioned, and its operations (Return and :=) are instead constructors of ProgramT... Would you have some concrete examples? Because there I'm a bit lost (since the tutorial doesn't match the

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

2010-04-14 Thread Heinrich Apfelmus
Limestraël wrote: I have some difficulties to see the use of PromptT, because in the tutorial, this type is never mentioned, and its operations (Return and :=) are instead constructors of ProgramT... Would you have some concrete examples? Because there I'm a bit lost (since the tutorial

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

2010-04-14 Thread Limestraël
Okay, I just understood that 'Prompt' was just a sort of view for 'Program'. I'd like to make it very accessible, so please don't hesitate to report any difficulties with finding and understanding documentation and examples! Then I think the name 'Prompt' may be misleading for those who doesn't

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

2010-04-14 Thread Bertram Felgenhauer
Limestraël wrote: Okay, I just understood that 'Prompt' was just a sort of view for 'Program'. Right. runMyStackT :: MyStackT (Player m) a - Player m a According to what Bertram said, each strategy can pile its own custom monad stack ON the (Player m) monad. Yes, and I meant what

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

2010-04-14 Thread Limestraël
Okay, I start to understand better... Just, Heinrich, how would implement the mapMonad function in terms of the operational package? You just shown the signature. 2010/4/14 Bertram Felgenhauer bertram.felgenha...@googlemail.com Limestraėl wrote: Okay, I just understood that 'Prompt' was just

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

2010-04-09 Thread Heinrich Apfelmus
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