<div dir="ltr">I don't have any use case like that. I'm in favor of this proposal for consistency sake.<div><br></div><div>That last part of my comment about usefulness/discouraging usage was about using Functor instance on tuple in general, no matter the arity. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 January 2016 at 21:32, <span dir="ltr"><<a href="mailto:amindfv@gmail.com" target="_blank">amindfv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><span class=""><div></div><div>El 19 ene 2016, a las 10:24, Alois Cochard <<a href="mailto:alois.cochard@gmail.com" target="_blank">alois.cochard@gmail.com</a>> escribió:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>+1<br></div><div><br></div>Agree for consistency, I can also see those instances as being useful in some specific context, even if I agree with Andreas that in general they should be discouraged (especially for newcomers).<div><br></div></div></div></blockquote><div><br></div></span><div>Can you give us an example where using e.g. the Functor instance for a 5-tuple would be the correct/best design decision?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Tom</div></font></span><div><div class="h5"><div><br></div><br><blockquote type="cite"><div><div class="gmail_extra"><br><div class="gmail_quote">On 19 January 2016 at 09:20, Herbert Valerio Riedel <span dir="ltr"><<a href="mailto:hvriedel@gmail.com" target="_blank">hvriedel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 2016-01-18 at 21:10:07 +0100, David Feuer wrote:<br>
> For some reason I really can't imagine, it seems the only tuple type<br>
> with a Functor instance is (,) a. I was astonished to find that<br>
><br>
> fmap (+1) (1,2,3)<br>
><br>
> doesn't work. Since this is *useful*, and there is *only one way to do<br>
> it*, I propose we add the following:<br>
><br>
> instance Functor ((,,) a b) where<br>
> fmap f (a,b,c) = (a,b,f c)<br>
> instance Functor ((,,,) a b c) where<br>
> fmap f (a,b,c,d) = (a,b,c,f d)<br>
> etc.<br>
<br>
</span>As stated elsewhere in this thread already, there is the issue about<br>
consistency. Here's a relevant section from the Haskell 2010 report[1]:<br>
<br>
> 6.1.4 Tuples<br>
><br>
> ...<br>
><br>
> However, every Haskell implementation must support tuples up to size<br>
> 15, together with the instances for Eq, Ord, Bounded, Read, and Show.<br>
<br>
IMO, we either have no `Functor` instances for tuples at all, or we have<br>
them for all tuples up to size 15. The current situations of having them<br>
defined only for 2-tuples is inconsistent.<br>
<br>
<br>
Cheers,<br>
hvr<br>
<br>
[1]: <a href="https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1210006.1.4" rel="noreferrer" target="_blank">https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1210006.1.4</a><br>
<div><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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><b>Λ\ois</b></div><div><div><a href="http://twitter.com/aloiscochard" target="_blank">http://twitter.com/aloiscochard</a></div><div><a href="http://github.com/aloiscochard" target="_blank">http://github.com/aloiscochard</a></div></div></div></div>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Libraries mailing list</span><br><span><a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a></span><br><span><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a></span><br></div></blockquote></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><b>Λ\ois</b></div><div><div><a href="http://twitter.com/aloiscochard" target="_blank">http://twitter.com/aloiscochard</a></div><div><a href="http://github.com/aloiscochard" target="_blank">http://github.com/aloiscochard</a></div></div></div></div>
</div>