
18 Jan
2012
18 Jan
'12
2:59 p.m.
Hello folks, I was curious whether or not it is possible to lift an arbitrary IO (IO a) -> IO a function to MonadBaseControl IO m => m (m a) -> m a. That is, implement a function: liftJoin :: MonadBaseControl mb m => (mb (mb (StM m a)) -> mb (StM m a)) -> m (m a) -> m a The difficulty seems to be that we can't extract the resumable state from the inner base monad action. If this is not possible, is there a suitable strengthening of MonadBaseControl that achieves this effect? Cheers, Edward [1] http://hackage.haskell.org/packages/archive/monad-control/latest/doc/html/Co...