
17 Feb
2016
17 Feb
'16
6:23 a.m.
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.