Proposal: Add conspicuously missing Functor instances for tuples

Henning Thielemann lemming at henning-thielemann.de
Wed Feb 17 10:06:55 UTC 2016


On Wed, 20 Jan 2016, Mario Blažević wrote:

> On 16-01-18 04:17 PM, amindfv at gmail.com wrote:
>> I share Henning's concerns. Can someone provide a realistic example
>> of where an instance for (,,) or (,,,) *is* desirable?
>
> I'm looking at some examples in production code here at work:
>
>> firstOfThree (a, b, c) = a
>> onFirstOfThree f = changeNode (\(a, b, c)-> (f a, b, c))

I have fst3 and mapFst3 in my utilities package:

https://hackage.haskell.org/package/utility-ht-0.0.11/docs/Data-Tuple-HT.html


More information about the Libraries mailing list