<div dir="ltr">Well, I can accept it as an evidence of why not to use the profunctor encoding for multi target lens (if that's the name).<div>But I guess we are already in philosophy (so I'm more puzzled than before) and I hope you can elaborate more.</div><div><br></div><div>.p</div><div><div><br><div class="gmail_extra"><br><div class="gmail_quote">2018-05-02 18:10 GMT+02:00 Tom Ellis <span dir="ltr"><<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk" target="_blank">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, May 02, 2018 at 03:07:05PM +0200, Paolino wrote:<br>
> I'm trying to write a lens for a datatype which seems easy in the Twan van<br>
> Laarhoven encoding but I cannot find it as easy in the profunctorial one<br>
> <br>
> data Q5 a b = Q51 a (Identity b) | Q52 [b]<br>
> <br>
> lq5Twan :: Applicative f => (b -> f b') -> Q5 a b -> f (Q5 a b')<br>
> lq5Twan f (Q51 a bs) = Q51 a <$> traverse f bs<br>
> lq5Twan f (Q52 bs) = Q52 <$> traverse f bs<br>
</span>[...]<br>
<span class="">> lq5Profunctor :: forall p a b b' . Traversing p => p b b' -> p (Q5 a<br>
> b) (Q5 a b')<br>
</span>[...]<br>
<span class="">> Which simpler ways to write the lq5Profunctor we have ?<br>
<br>
</span>Is `wander lq5Twan` good enough, or is your question more philosophical?<br>
______________________________<wbr>_________________<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" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br></div></div></div></div>