<div dir="ltr">Ha!<br><br>I saw that a while back, was pleasantly surprised, then went ahead and forgot about it. Thanks for the surprise again. Two for the price of one.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 9, 2017 at 2:19 PM, Edward Kmett <span dir="ltr"><<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Even better,<br><br><a href="http://hackage.haskell.org/package/base-4.9.1.0/docs/Data-List-NonEmpty.html#v:some1" target="_blank">http://hackage.haskell.org/<wbr>package/base-4.9.1.0/docs/<wbr>Data-List-NonEmpty.html#v:<wbr>some1</a><div><br></div><div>is already there in base! ;)</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 7, 2017 at 10:21 PM, Tony Morris <span dir="ltr"><<a href="mailto:tmorris@tmorris.net" target="_blank">tmorris@tmorris.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Related: <a href="https://hackage.haskell.org/package/semigroups-0.18.1/docs/src/Data.List.NonEmpty.html#some1" target="_blank">https://hackage.haskell.org/pa<wbr>ckage/semigroups-0.18.1/docs/<wbr>src/Data.List.NonEmpty.html#<wbr>some1</a><br></div><div class="m_-910292734324269869HOEnZb"><div class="m_-910292734324269869h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 8, 2017 at 1:18 PM, Edward Kmett <span dir="ltr"><<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm also in the "if we're going to do this, it should probably be a new function" camp. e.g. `some1`. I'm kinda neutral on adding it at all at this point, but if we do it, it should probably be done along these lines.<div><br></div><div>As for using a semigroup based implementation, its performance is, sadly, rather awful for constructing `NonEmpty` lists, and more damning, you have no law relating the 'pure' or whatever you're using to create values and the Semigroup you're using to glue them together, so it only works for NonEmpty on a purely ad-hoc type-by-type basis. That signature isn't one we want as evidenced by the fact that if you pick m = Maybe you sure as heck won't get anything like what you expect! This is the pointed problem all over again. I'm very strongly -1 on that variant of the proposal.</div><span class="m_-910292734324269869m_1490374211925523243HOEnZb"><font color="#888888"><div><br></div><div><div>-Edward<div><div><br></div></div></div></div></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-910292734324269869m_1490374211925523243h5">On Tue, Mar 7, 2017 at 2:02 PM, Sven Panne <span dir="ltr"><<a href="mailto:svenpanne@gmail.com" target="_blank">svenpanne@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-910292734324269869m_1490374211925523243h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>2017-03-07 18:11 GMT+01:00 Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</a><wbr>></span>:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><span><br>
On Tue, 7 Mar 2017, Mario Blažević wrote:<br></span></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>[...]You're correct on both counts, sorry about that. It would have to be<span><br>
<br>
genericMany, genericSome ::<br>
 (Alternative f, Applicative m, Semigroup (m a)) => f a -> f (m a)<br>
<br>
once Semigroup is in base.<br>
</span></span></blockquote><span>
<br>
But then, for genericMany, Monoid would be appropriate, again. :-)<br></span></blockquote><div><br></div><div>I think this discussion alone is enough of a hint that there is a need for a broader discussion to come up with coherent story regarding NonEmpty in general. ;-) Focusing on one or two functions alone will probably do more harm than improve the overall situation.</div></div></div></div>
<br></div></div><span>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/libraries</a><br>
<br></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>