Hi all,
I have a function named `keymapTest` need moand state WindowListT, and
WindowListT is `type WindowListT = StateT WindowList IO`.
when i add "(\event -> keymapTest winList event >> return False)" after
`onKeyPress` for handle key press event, i got GHC error:
Manatee.hs:57:58:
Couldn'
Hi Andy.
The GTK bindings use IO for their callbacks, not any custom monad like
your WindowListT.
I suggest, instead of StateT s IO a, you use ReaderT (IORef s) IO a:
putR :: s -> ReaderT (IORef s) IO ()
putR s = do
r <- ask
liftIO $ writeIORef r s
getR :: ReaderT (IORef s) IO s
getR =