<div dir="auto">Please clarify your question. Your code doesn't compile, and I can't tell what it's supposed to do.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 20, 2022, 11:13 AM PICCA Frederic-Emmanuel <<a href="mailto:frederic-emmanuel.picca@synchrotron-soleil.fr">frederic-emmanuel.picca@synchrotron-soleil.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I have a data whcih contain a Maybe value<br>
<br>
data A = A (_a = Maybe a)<br>
<br>
I would like to use a lens in order to merge two values with this log<br>
<br>
replace the value only if it is a (Just a)<br>
<br>
So My question is<br>
<br>
is there something more elegant than<br>
<br>
let myA' = case ma of<br>
              Nothing  -> conf<br>
              (Just na) -> (a .~ na) myA<br>
<br>
Thanks for your help<br>
<br>
Frederic<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>