<div dir="ltr"><span style="font-size:12.8px">This is getting ridiculous. The main problem with the `Foldable` instance for tuples seems to be that it's asymmetric (takes only the second element into account). Yet tuples are already asymmetric given their `Functor` instance! No one seems to complain about that although for a beginner it's a total WAT (judging from my own experience and people that I explained Haskell to). Why does `succ <$> (1, 2)` evaluate to `(1, 3)` and not `(2, 3)`? Current definitions are entirely consistent, and consistency is the most valuable property.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">And given that `Traversable` gives a rise to a `Foldable` similarly to how a `Monad` gives a rise to an `Applicative`, it is the same stupid mistake not to reflect this relation in the type system.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The ship has sailed, but not when the `Foldable` instance defined. It has sailed when the `Functor` instance was defined, everything else is a follow-up. Just get over it already.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 11:28 AM, Jeremy <span dir="ltr"><<a href="mailto:voldermort@hotmail.com" target="_blank">voldermort@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Several suggestions have been made in this thread. The one with the highest<br>
cost-to-benefit ratio would seem to be removing the Foldable constraint from<br>
Traversable, as it is simply not required by the Traversable definition.<br>
Lennart actually tried recompiling base with this "and it hardly needed any<br>
changes".<br>
<br>
I suggest that we consider this change first, as it brings the benefit of<br>
allowing Traversable types without having to define possibly nonsensical<br>
Foldable instances, and according to Lennart's experiment, has trivial<br>
impact.<br>
<br>
Lennart, what changes did you have to make? Anybody care to recompile their<br>
pet project with this change and see if there's any significant impact?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://haskell.1045720.n5.nabble.com/Proposal-Add-conspicuously-missing-Functor-instances-for-tuples-tp5827530p5831008.html" rel="noreferrer" target="_blank">http://haskell.1045720.n5.nabble.com/Proposal-Add-conspicuously-missing-Functor-instances-for-tuples-tp5827530p5831008.html</a><br>
Sent from the Haskell - Libraries mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">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><br></div>