Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Nathan Bouscal nbouscal at
Thu Mar 30 19:38:40 UTC 2017

The argument that people should define custom data types rather than using
triples doesn't have any bearing on whether triples should implement these
type classes. That argument would imply that whether the type classes are
implemented doesn't matter, because if you're complaining about getting
unexpected results the response is "use a custom data type", and similarly
if you're complaining about the lack of a type class instance the response
is "use a custom data type". So, even though it's true that people
generally should use custom data types instead of triples, it's irrelevant
to the discussion.

+1 on the proposal. Consistency is good.

On Thu, Mar 30, 2017 at 11:30 AM, Henning Thielemann <
lemming at> wrote:

> On Thu, 23 Mar 2017, Fumiaki Kinoshita wrote:
> It's surprising that they are missing (forgive me, I'm not here to make
>> people grumpy).
> I am not surprised because it was discussed at length a year before. I
> still think all these instances on pairs, triples and other tuples are more
> dangerous than helpful. It is so easy and much more expressive to define
> custom data types for your particular application. Actually, I am still
> actively using only GHC up to GHC-7.8.4, because starting with GHC-7.10.3
> the slogan "if it can be compiled, it is certainly correct" cannot be
> reasonably claimed anymore (length(a,b)==1, maximum(2,1)==1 etc. are just
> not sane). And it seems that adding damage to the libraries is done at a
> much faster pace than adding compiler features to make them less dangerous
> (like user-configurable warnings about dangerous instances).
> _______________________________________________
> Libraries mailing list
> Libraries at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list