Agreed. +1<span></span><br><br>On Tuesday, January 19, 2016, Herbert Valerio Riedel <<a href="mailto:hvriedel@gmail.com">hvriedel@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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>
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" target="_blank">https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1210006.1.4</a><br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'Libraries@haskell.org')">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote>