<div dir="auto"><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><div style="width:394.314px;margin:15px 0px"><div><p dir="ltr"> >>>>> "TE" == Tom Ellis <<a href="mailto:tom-lists-haskell-cafe-2017@jaguarpaw.co.uk" style="text-decoration-line:none;color:rgb(66,133,244)">tom-lists-haskell-cafe-2017@jaguarpaw.co.uk</a>> writes:<br><br> TE> On Mon, Nov 23, 2020 at 09:54:26PM +0100, Francesco Ariis wrote:<br><br> TE> Which of the following would they give up?<br><br> TE> A. Foldable as superclass of Traversable<br><br> TE> B. (a,) as Traversable<br><br>For me it is B. Even the Foldable hackage description states "Functors<br>representing data structures that can be traversed from left to right."<br>The tuple is however not traversed from left to right, but solely on the<br>right (as it's half filled).<br><br>For me it doesn't make sense to implement it, just because it's<br>implementable. I think the current implementation does not add more<br>value than it harms.<br></p></div></div><div style="height:0px"></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun., 23 nov. 2020 22:23, Tom Ellis <<a href="mailto:tom-lists-haskell-cafe-2017@jaguarpaw.co.uk">tom-lists-haskell-cafe-2017@jaguarpaw.co.uk</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Nov 23, 2020 at 09:54:26PM +0100, Francesco Ariis wrote:<br>
> Il 23 novembre 2020 alle 14:40 Zemyla ha scritto:<br>
> > So what should maximum (2, "potato") be?<br>
> <br>
> For people who did not agree with `instance Foldable (,) a`, a<br>
> type error!<br>
<br>
Which of the following would they give up?<br>
<br>
A. Foldable as superclass of Traversable<br>
<br>
B. (a,) as Traversable<br>
<br>
Personally I think in retrospect I think I'd give up both and use<br>
explicit Traversals (i.e. optics instead). That way one would have to<br>
write<br>
<br>
allOf each (\ i -> contents p i == contents q i) ...<br>
<br>
By contrast<br>
<br>
allOf _2 (\ i -> contents p i == contents q i) ...<br>
<br>
obviously looks wrong.<br>
<br>
Tom<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>