<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 2, 2021 at 9:06 AM Zemyla <<a href="mailto:zemyla@gmail.com">zemyla@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I feel like instead, MonadTrans should have a function<div dir="auto"><br></div><div dir="auto">(>>==) :: Monad m => t m a -> (a -> t m b) -> t m b</div></div></blockquote><div><br></div><div><div dir="ltr">This strikes me as a strictly worse outcome. Now you get coherence laws relating (>>==) to a (>>=) that may or may not exist that you have to keep track of, but get nothing enforcing anything, can't delegate to code that builds off Monad, leading to random code duplication, and users are hoist on the horns of the dilemma of using (>>=) or (>>==) with different constraints in each circumstance.<div><br></div><div>-Edward</div></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"></div><div dir="auto">That way, it can prove it's a Monad while still staying Haskell 98.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 2, 2021, 10:51 Viktor Dukhovni <<a href="mailto:ietf-dane@dukhovni.org" target="_blank">ietf-dane@dukhovni.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jun 02, 2021 at 07:27:28AM +0200, Henning Thielemann wrote:<br>
<br>
> So far, 'transformers' is mostly Haskell 98. This is why I prefer it<br>
> to 'mtl'. Wouldn't it be enough to add this extension to 'mtl'? I see<br>
> that 'mtl' re-uses the MonadTrans class from 'transformers' but maybe<br>
> it should define its own class with the quantified constraints then.<br>
<br>
I don't think that having two incompatible MonadTrans classes would<br>
constitute progress. Older versions of the transformers library (which<br>
is by now quite stable) will continue to be available, for anyone who<br>
wants to use a Haskell '98 (ish?) version.<br>
<br>
[ FWIW, I don't know what you mean by "is mostly Haskell '98", I'd<br>
expect that to be a strict binary choice: is or isn't. ]<br>
<br>
-- <br>
Viktor.<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div></div>