↧
Answer by Daniel Fischer for Haskell - Ambiguous type variable
Cat Plus Plus has already explained whygetNextState :: GameState b => GameStateMonad a (Maybe b)getNextState = return (Nothing :: Maybe Blank)doesn't work, so I can be short on that. The type...
View ArticleAnswer by Cat Plus Plus for Haskell - Ambiguous type variable
I'm not sure what you're trying to achieve by making GameState a typeclass. You might be too much in OOP mindset here — typeclasses are not OOP classes. A set of game states will probably be closed, so...
View ArticleHaskell - Ambiguous type variable
I am having trouble with ambiguous types in Haskell. I started out with the following:module GameState( GameState(..), GameStateMonad, module Control.Monad.Trans, module Control.Monad.Trans.State.Lazy,...
View Article