Closed EPashkin closed 9 years ago
Seems "main" type only options is Game. With Frame I get an error that I do not understand demo_stateful2.hs:25:5: No instance for (Monad FreeGame.UI.UI) arising from a use of `tick' In a stmt of a 'do' block: tick
After thinking, I realized that this attempt is bad. I better to try a variant with "StateT a Game ()" or better "MonadTrans t => t a Game()" and with some Maybe for stopping execution. And splitting processing into computation and drawing in the library are unnecessary.
Your controlledGame
is general enough not to include in this package.
Unfortunately, my English is not enough to understand your answer. Can you split it into two sentences?
controlledGame
doesn't depend on anything in free-game
.
Instead, you can make a separate package that provides such combinators.
Perhaps the monad-loops
package is what you want.
Understand now, tnx.
New stateful loop function. Not sure about its name and "main" type (Game or Frame).