Proposal: Add conspicuously missing Functor instances for tuples

Henning Thielemann lemming at henning-thielemann.de
Wed Feb 17 11:23:01 UTC 2016


On Tue, 19 Jan 2016, Edward Kmett wrote:

> +1 from me. 

Btw. just a few days before I changed the type synonym

    type Interval t a = ((t,t), a)

in my current project to a custom type

    data Interval t a = Interval (t,t) a

because I found that I frequently change the 'a' value. I had to define a 
Functor instance, but I intentionally excluded the Foldable instance that 
came with pairs. In return I could replace several unspecific 'fst's and 
'snd's by the more specific record field selectors of 'Interval'. Using 
custom records really pays off.


More information about the Libraries mailing list