
6 Dec
2011
6 Dec
'11
4:49 a.m.
On 6 December 2011 05:06, Michael Snoyman
Maybe this will help[1]. It's using RWST instead of StateT, but it's the same idea.
[1] https://github.com/yesodweb/yesod/commit/7619e4e9dd88c152d1e00b6fea073c3d52d...
Hi Michael, Note that you can just reuse the MonadTransControl instance of the RWST transformer: instance MonadTransControl (GGWidget master) where newtype StT (GGWidget master) a = StWidget {unStWidget :: StT (GWInner master) a} liftWith f = GWidget $ liftWith $ \run -> f $ liftM StWidget . run . unGWidget restoreT = GWidget . restoreT . liftM unStWidget Cheers, Bas