You can wish for such an instance all you want, but it can't exist.

The definition of Functor is forced on you by the a combination of the laws, and the way the type system works. You can't have this "other" instance even if you want it, even if the instance we have today wasn't there.

(,) e :: * -> *

That is a legal choice of 'f' for 

class Functor f where
   fmap :: (a -> b) -> f a -> f b

We don't (and can't) have a "type lambda" that lets you talk about 

instance Functor (\x -> (x,x))

With it instance resolution would go to hell.

There is only one solitary degree of freedom in the design, which comes down to whether or not the instance should use a strict or a lazy pattern match on the tuple.

-Edward

On Wed, Feb 24, 2016 at 10:28 AM, Kosyrev Serge <_deepfire@feelingofgreen.ru> wrote:
Nathan Bouscal <nbouscal@gmail.com> writes:
> As opposed to what other instance??

I expect there to be N similarly-structured Functor instances for a
N-ary tuple.

--
с уважениeм,
Косырев Сергей
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries