Re: [Haskell-cafe] does () match with a??

2010-07-08 Thread Hector Guilarte
Hey! I just wanted to let you know I made it. I just changed the newtype declaration to: newtype Game r = Game { execGame :: Int - (Maybe r,Int) } and from there everything went just fine. Thank you for your responses, Hector Guilarte On Wed, Jul 7, 2010 at 9:24 PM, Hector Guilarte

[Haskell-cafe] does () match with a??

2010-07-07 Thread Hector Guilarte
Hey everyone, I'm making a Game Monad for an assignment (yes, homework) . Here's a little explanation of what I need to do (I can't use anything from Control.Monad.*, I need to do everything myself): I need to define my newtype Game and make it's Monad instance I need to make the function :

Re: [Haskell-cafe] does () match with a??

2010-07-07 Thread Ivan Miljenovic
On 8 July 2010 10:55, Hector Guilarte hector...@gmail.com wrote: Hey everyone, I'm making a Game Monad for an assignment (yes, homework) . Here's a little explanation of what I need to do (I can't use anything from Control.Monad.*, I need to do everything myself): I need to define my newtype

Re: [Haskell-cafe] does () match with a??

2010-07-07 Thread John Meacham
Are you sure you are interpreting what 'die' should do properly? Your code makes sense if die should decrement your life counter and continue along, however if 'die' is meant to end your whole game, then there is another implementation that does type check. John -- John Meacham -

Re: [Haskell-cafe] does () match with a??

2010-07-07 Thread Hector Guilarte
On Wed, Jul 7, 2010 at 8:48 PM, John Meacham j...@repetae.net wrote: Are you sure you are interpreting what 'die' should do properly? Your code makes sense if die should decrement your life counter and continue along, however if 'die' is meant to end your whole game, then there is another