[Haskell] Re: generic catch in a MonadIO

2006-02-08 Thread Ashley Yakeley
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

Re: [Haskell] Re: generic catch in a MonadIO

2006-02-08 Thread Taral
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. You have to CPS it: withUnlif

[Haskell] Re: generic catch in a MonadIO

2006-02-08 Thread Ashley Yakeley
[EMAIL PROTECTED] wrote: The ability to use functions 'catch', 'bracket', 'catchDyn', etc. in MonadIO other than IO itself has been a fairly frequently requested feature: ... The reason it is not implemented is because these functions cannot be defined for a general MonadIO. However, these func