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
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 :
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
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 -
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