Re: [Haskell-cafe] 'Proper' use of the State monad

2007-05-03 Thread Valery V. Vorotyntsev
Denis Volk [EMAIL PROTECTED] writes: I am trying to make a (turn-based) game in Haskell and need to pass around quite a bit of information, so using the State monad seems most appropriate. My question is, which is a better idea: Have you read `Theseus and the Zipper'[1] yet? 1.

Re: [Haskell-cafe] 'Proper' use of the State monad

2007-05-02 Thread Henning Thielemann
On Mon, 30 Apr 2007, Denis Volk wrote: Hello all, I am trying to make a (turn-based) game in Haskell and need to pass around quite a bit of information, so using the State monad seems most appropriate. My question is, which is a better idea: The famous Why functional programming matters

[Haskell-cafe] 'Proper' use of the State monad

2007-04-30 Thread Denis Volk
Hello all, I am trying to make a (turn-based) game in Haskell and need to pass around quite a bit of information, so using the State monad seems most appropriate. My question is, which is a better idea: 1) Using State GameState r and then call execState for each game event (i.e. user input) so

Re: [Haskell-cafe] 'Proper' use of the State monad

2007-04-30 Thread Sebastian Sylvan
On 4/30/07, Denis Volk [EMAIL PROTECTED] wrote: Hello all, I am trying to make a (turn-based) game in Haskell and need to pass around quite a bit of information, so using the State monad seems most appropriate. My question is, which is a better idea: 1) Using State GameState r and then call

Re: [Haskell-cafe] 'Proper' use of the State monad

2007-04-30 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Denis Volk wrote: There are difficulties with the first option, including keeping even more state about what we're doing (for instance, are we in a menu?), and adding stuff later would possibly require substantial rewrites. Other than the fact

Re: [Haskell-cafe] 'Proper' use of the State monad

2007-04-30 Thread Stefan O'Rear
On Mon, Apr 30, 2007 at 11:16:47PM +0200, Denis Volk wrote: Hello all, I am trying to make a (turn-based) game in Haskell and need to pass around quite a bit of information, so using the State monad seems most appropriate. My question is, which is a better idea: 1) Using State GameState r