Constraints on definition of `length` should be strengthened
Edward Kmett
ekmett at gmail.com
Mon Apr 3 21:03:10 UTC 2017
Discussion has been raised elsewhere about `Either e` just in the last
month or so, etc as well. The goal posts slide around quite a bit, almost
like there are lots of people with different opinions. Others are fine with
the instances but want to monomorphize null, length,
maximum/minimum/sum/product/everything, it depends on who you ask and when.
-Edward
On Mon, Apr 3, 2017 at 12:38 PM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:
>
> On Mon, 3 Apr 2017, David Feuer wrote:
>
> That leaves a few trouble spots:
>>
>> 1. There are types that some people think shouldn't have
>> Functor/Foldable/Traversable instances at all, or that some people would
>> like to have Functor and maybe even Traversable instances for without
>> wanting Foldable instances. The latter is impossible because of a
>> superclass constraint. One essential issue here seems to be one of
>> perspective: is Foo x y a container of ys, decorated with xs, or is it a
>> container of xs and ys? Different people tend to think about this
>> differently, and thus form different intuitions.
>>
>
> I don't know if anyone has a problem with interpreting a custom data type
> Foo x y as a container of ys decorated with xs - if it is defined for that
> purpose. Discussion arose solely about the cases Foo = (,), Foo = (,,) x
> and so on. E.g. I actually proposed to define a custom data type like
> Decorated x y instead of (x,y) in case you want to have a Foldable instance.
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170403/f915027f/attachment-0001.html>
More information about the Libraries
mailing list