
5 Sep
2003
5 Sep
'03
5:48 a.m.
See the attached patch for the details.
This solution is maybe a bit ugly, since these methods are fairly specific (liftIO' is needed to generalize block and unblock, and liftIO'' is needed to generalize catchException).
But it does allow one to use catch/bracket/etc with monads built on top of IO with monad transformers, which is quite nice:
Thanks. I think I would prefer to have the generalised versions of block/unblock/catchException separate from the IO-specific versions, and exported by one of the Control.Monad modules, to avoid breaking too much code, and to avoid wiring MonadIO in too deeply. Would you mind redoing the patch? Iavor: how do these changes sit with your redesign of the monad stuff? Cheers, Simon