Taral wrote:
On 2/8/06, Ashley Yakeley <[EMAIL PROTECTED]> 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)))

_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to