Haskell Foldable Wast

Henrik Nilsson Henrik.Nilsson at nottingham.ac.uk
Thu Feb 18 13:04:53 UTC 2016


On 02/18/2016 12:41 PM, Manuel Gómez wrote:
>> >And whenever I have wanted to map on tuple fields (which I do from
>> >time to time), I most certainly want the ability to map on any field.
> Anyone with a couple of decades of Haskell experience ought to
> understand that the desire to map on any field of a record cannot be
> served by a typeclass such as Functor.

Yes, that's exactly my point: functor is not the right tool. So
why make tuples instances of functor in the first place?

And yes, there is arguably an asymmetry of sorts in having to pick an
order among type constructor arguments. But that does not change the
fact that there is symmetry in having a projection function for
each field. So why even entertain a notion of mapping that
doesn't grant the same privileges to all fields?

Might be useful in some specialist applications, but certainly not
what I, at least, would consider particularly useful.



Henrik Nilsson
School of Computer Science
The University of Nottingham
nhn at cs.nott.ac.uk

This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

More information about the Libraries mailing list