Constraints on definition of `length` should be strengthened

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Thu Apr 6 13:52:48 UTC 2017


On 6 April 2017 at 23:56,  <amindfv at gmail.com> wrote:
> I don't totally understand this viewpoint. It sounds like what you're saying
> is it's unfortunate that tuples (and everything else) are biased in Haskell,
> but because they are we're obligated to make all the legal instances we can
> for them.
>
> E.g. if I define a datatype "data Foo x y z", I'm powerless and sort of
> obligated to define "instance Functor (Foo x y)" if there's a legal one,
> regardless of if that's what I want Foo to mean.

Is Foo going to be widely used or only an internal data type to your own code?

>
> Tom
>
>
> El 3 abr 2017, a las 15:29, Nathan Bouscal <nbouscal at gmail.com> escribió:
>
> I expect most people probably agree that it'd be nice to have tuples be an
> unbiased cartesian product, but the actual fact of the matter is that tuples
> as they exist in Haskell are biased. We can't just ignore that and pretend
> they're unbiased. It definitely sucks that the answer people would naively
> give to "what is a tuple in Haskell" is not the correct answer, but we're
> stuck in that situation. The question is how to make the best of it.
>
> On Mon, Apr 3, 2017 at 12:56 PM, Henning Thielemann
> <lemming at henning-thielemann.de> wrote:
>>
>>
>> On Mon, 3 Apr 2017, Sven Panne wrote:
>>
>>> Of course such an interpretation is possible, but let's remember
>>> Abelson's famous quote:
>>>
>>>    "Programs must be written for people to read, and only incidentally
>>> for machines to execute."
>>>
>>> When you show somebody a pair and ask "What is this?", how many people do
>>> you *seriously* expect to say "Oh, yeah, I've seen that: It's a value on the
>>> right decorated by another one on the left!" compared to people telling you
>>> something about e.g. cartesian products (which are totally symmetric with no
>>> bias to the right or left)? The point is: Using a pair for a decorated
>>> one-element container is completely miscommunicating your intent, even if
>>> you find a sensible mathematical interpretation for it.
>>
>>
>> That's what I am saying all the time.
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Libraries mailing list