8 Feb
2006
8 Feb
'06
7:56 p.m.
Taral wrote:
On 2/8/06, Ashley Yakeley <ashley@semantic.org> wrote:
IIRC, that subset is types that can implement this:
class (MonadIO m) => StrictMonadIO m where getUnliftIO :: m (m a -> IO a)
You probably mean "m (forall a. m a -> IO a)" and that is not allowed.
Actually, I think what I have is sufficient: -- liftIO :: (MonadIO m) => IO a -> m a -- catch :: IO a -> (Exception -> IO a) -> IO a gcatch :: (StrictMonadIO m) => m a -> (Exception -> m a) -> m a gcatch ma cc = do unliftIO <- getUnliftIO liftIO (catch (unliftIO ma) (\ex -> unliftIO (cc ex)))