Proposal: rename Data.List.NonEmpty.sortWith to sortOn for consistency

Ömer Sinan Ağacan omeragacan at gmail.com
Thu May 18 16:21:35 UTC 2017


Proposal: Introduce `Data.List.NonEmpty.sortOn` for
`Data.List.NonEmpty.sortWith` and deprecate `sortWith`.

Motivation: Data.List.NonEmpty API is very similar to Data.List, except this
same function is called `sortOn` in `Data.List`. I think for consistency it'd
good to rename `sortWith` to `sortOn`.

Why not rename `sortOn` to `sortWith`? I think `Data.List` is much more widely
used than `Data.List.NonEmpty`, so renaming `sortWith` would lead to much less
deprecation warnings.

Ömer


More information about the Libraries mailing list