bracket, (un)block and MonadIO
Fri, 5 Sep 2003 10:48:50 +0100
> 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?