Proposal: Add conspicuously missing Functor instances for tuples

Henning Thielemann lemming at
Tue Feb 23 08:11:45 UTC 2016

On Thu, 18 Feb 2016, Benno Fünfstück wrote:

> Oftentimes, I will order my tuples in such a way that the "interesting" 
> value comes last in the tuple. The `Traversable` and `Functor` instances 
> are useful in this case, because I use the tuple as `(extraInfo, 
> realValue)`, and mostly I'm only concerned with `realValue` and the 
> `Traversable` and `Functor` instances let me work with `realValue` quite 
> easily. 

If you put effort into the right ordering of pair members, you could as 
well put your effort into defining a custom type:
   data ExtraInfo info a = ExtraInfo info a

This would be much clearer.

More information about the Libraries mailing list