
23 Apr
2010
23 Apr
'10
2:28 p.m.
On April 23, 2010 13:39:36 Anders Kaseorg wrote:
Yes, just like lift is defined via morph:
liftIO' :: (MonadMorphIO m) => IO a -> m a liftIO' m = morphIO $ \down -> m >>= down . return
Thanks. That make sense. How about "exposeIO" for a name then? It references the fact that it exposes the underlying IO monad. Or even "peakIO", "glimpseIO", "teaseIO", or so on, as it is not a full exposure, but just enough to apply combinators. Really though, as you (or someone else) said, it would seem to be a pretty basic as useful functionality that any of the monad transfers should expose (in this universally quantified way) the monad they are built upon. Cheers! -Tyson