<div dir="auto"><div>I oppose the QuantifiedConstraints version because:</div><div dir="auto"><br></div><div dir="auto">1. It is more complicated than the FlexibleConstraints one.</div><div dir="auto"><br></div><div dir="auto">2. It is strictly less general than the FlexibleConstraints one.</div><div dir="auto"><br></div><div dir="auto">3. There is no apparent benefit to pay for detriments 1 and 2.</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, Mar 13, 2020, 11:59 PM chessai . <<a href="mailto:chessai1996@gmail.com">chessai1996@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Consider the Eq instance for these types. Currently we rely on:<br>
<br>
(Eq1 f, Eq1 g, Eq a)<br>
<br>
But some potential improvements include changing to:<br>
<br>
(Eq (f (g a))) (FlexibleContexts)<br>
<br>
or<br>
<br>
(forall x. Eq x => Eq (f x), forall x. Eq x => Eq (g x), Eq a)<br>
(QuantifiedConstraints)<br>
<br>
There was a discussion sometime last year about the same thing<br>
regarding Semigroup/Monoid instances for `Compose` [1]. Additionally,<br>
the question has been raised again for Data.Functor.{Product,Sum} on<br>
Gitlab [2, 3]. There has been no consensus in either case, but that's<br>
not too worrying as both discussions have been brief. I'm currently<br>
not happy with the {Eq,Ord,Show}{1,2} family of classes, and would<br>
hope to work toward their removal, or at least the shrinking of their<br>
presence in base. Even though the linked proposals are about a single<br>
type, I think it's important that we come up with a decision and stick<br>
with it. Having different APIs for different types here would be<br>
pretty confusing, and some could even say sloppy.<br>
<br>
Please let me know your thoughts.<br>
<br>
[1]: <a href="https://mail.haskell.org/pipermail/libraries/2019-July/029771.html" rel="noreferrer noreferrer" target="_blank">https://mail.haskell.org/pipermail/libraries/2019-July/029771.html</a><br>
[2]: <a href="https://gitlab.haskell.org/ghc/ghc/issues/17015" rel="noreferrer noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/issues/17015</a><br>
[3]: <a href="https://gitlab.haskell.org/ghc/ghc/merge_requests/1704" rel="noreferrer noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/merge_requests/1704</a><br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">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></div></div>