Created
January 15, 2015 14:32
-
-
Save bananu7/ba12eed7cb05ff171bfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This: | |
data GlishaState us libs = GlishaState { | |
userState :: us, | |
libraryState :: libs, | |
window :: G.Window, | |
drawFn :: DrawFn us | |
} | |
-- Action monad parametrized over us and libs | |
-- Both us and libs hoisted into MonadState for library or client | |
-- vs | |
data GlishaState us = GlishaState { | |
userAndLibraryState :: us, | |
window :: G.Window, | |
drawFn :: DrawFn us | |
} | |
-- Action monad parametrized over one type. Library defines its state as user does it right now, but *also* parametrized over user state. Library can see user state as part of its state. User gets it hoisted. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment