<div dir="ltr"><div class="gmail_extra">On Mon, Mar 4, 2013 at 12:07 AM, Ertugrul Söylemez <span dir="ltr"><<a href="mailto:es@ertes.de" target="_blank">es@ertes.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Arie Peterson <<a href="mailto:ariep@xs4all.nl">ariep@xs4all.nl</a>> wrote:<br>
<br>
> Would anyone have a problem with a deprecation of<br>
> MonadCatchIO-transformers, and a failure to update it to work with a<br>
> base without 'block' and 'unblock'?<br>
<br>
</div>Yes. This is a simplified variant of a monad I use:<br>
<br>
newtype Continue f m a = Continue (m (Maybe a, f (Continue f a)))<br>
<br>
It's related to Cofree and has a valid and very straightforward<br>
MonadCatchIO instance. However, it's probably impossible to write a<br>
valid MonadTransControl/MonadBaseControl instance for it.<br>
<br>
So I kindly ask you not to deprecate MonadCatchIO. The reason I'm<br>
hesitant about moving to monad-control is that it's hard to understand<br>
and also very difficult to define for CPS monads. It is commonly<br>
believed to be impossible.<br></blockquote><div><br></div><div style>You can always cast the continuation to a dynamic type and cast it back later.</div><div style>Doing so would typically require additional constraints, however if you're trying to make an instance for MonadTransControl that's unfortunately not possible (you'd need a Typeable constraint on the monad parameter, but it's not in scope). Lacking an appropriate MonadTransControlWithTypeable class, it's certainly possible to fall back to various low-level, highly-dubious constructs. Which I of course implemented without hesitation :grin</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Also I've seen at least one article about the incorrectness of<br>
monad-control. That's one further reason I like to avoid it.<br></blockquote><div><br></div><div style>I'd appreciate a link if anyone could manage to find it. I haven't seen any criticisms of monad-control.</div>
<div style><br></div><div style>John L. </div></div></div></div>