<div dir="ltr"><div dir="ltr">(Sending again with reply all...)<div><br></div><div>On Mon, Feb 17, 2020 at 1:00 PM Andrew Martin <<a href="mailto:andrew.thaddeus@gmail.com">andrew.thaddeus@gmail.com</a>> wrote:<br></div><div>> Here is the documentation for Generalized List Comprehensions that mentions sortWith: <a href="https://downloads.haskell.org/ghc/latest/docs/html/users_guide/glasgow_exts.html#generalised-sql-like-list-comprehensions">https://downloads.haskell.org/ghc/latest/docs/html/users_guide/glasgow_exts.html#generalised-sql-like-list-comprehensions</a><br><br>Yes, it mentions sortWith and groupWith. But these functions only seem to be used explicitly, by name. The rationale given for the *With names in NonEmpty was that using that extension and RebindableSyntax, the names could be used implicitly. In that case it would be more awkward to use functions named sortOn or groupOn. But as far as I can tell, that doesn't happen. (I assume it either did at the time, or was expected to in the near future.)<br> <br>> The asymmetry between Data.List and Data.List.NonEmpty is unfortunate. I think my preference would be a non-breaking change where groupOn is added to Data.List.NonEmpty effectively as an alias for groupWith and they would both stay forever. I've not looked at the semantic difference between sortWith and sortOn, so I'm not sure which of those should be implemented with the other, but ideally, I would like to see both of them there.<br><br>I do think adding the new names and not removing the others would be an improvement on the status quo, though it's not my preference.</div></div></div>