<div dir="auto">Well I'm proposing deprecation not removal. The deprecation could even live forever for all I care. It would point to the new name as well. Not to mention I doubt this function is used very often.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 4, 2019, 2:58 AM Andreas Abel <<a href="mailto:andreas.abel@ifi.lmu.de">andreas.abel@ifi.lmu.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am not sure this subtlety is worth the breakage and annoyance to users <br>
coming with the name change.<br>
If you think about it, renaming the keys while preserving the tree <br>
structure cannot work if two old keys map to the same new key.<br>
<br>
On 2019-04-03 17:13, Elliot Cameron wrote:<br>
> Yeah the clearest names seem to be really long ones: <br>
> mapKeysMonotonicDistinct, mapKeysInjectiveIncreasing, <br>
> mapKeysReferToDocs, etc.<br>
> <br>
> On Wed, Apr 3, 2019 at 11:11 AM David Feuer <<a href="mailto:david.feuer@gmail.com" target="_blank" rel="noreferrer">david.feuer@gmail.com</a> <br>
> <mailto:<a href="mailto:david.feuer@gmail.com" target="_blank" rel="noreferrer">david.feuer@gmail.com</a>>> wrote:<br>
> <br>
>     We can't use "increasing" because mathematically that usually means<br>
>     non-strictly increasing. Using "ascending" gets us in trouble with<br>
>     the other functions in the module that use the word in a non-strict<br>
>     sense.<br>
> <br>
>     On Wed, Apr 3, 2019, 10:46 AM Elliot Cameron <<a href="mailto:eacameron@gmail.com" target="_blank" rel="noreferrer">eacameron@gmail.com</a><br>
>     <mailto:<a href="mailto:eacameron@gmail.com" target="_blank" rel="noreferrer">eacameron@gmail.com</a>>> wrote:<br>
> <br>
>         Hello!<br>
> <br>
>         In some recent analysis I ran into a subtlety that caught me by<br>
>         surprise: Data.Map.mapKeysMonotonic has a misleading name.<br>
> <br>
>         A monotonic function is not a strictly /increasing/ function,<br>
>         but merely non-decreasing. However, |mapKeysMonotonic| requires<br>
>         that it's mapping function be injective, which means it really<br>
>         only supports /increasing/ functions.<br>
> <br>
>         valid (mapKeysMonotonic (\x->  if  x`elem`  [1,2]then  2  else  x) (fromList [(1,"a"), (2,"b"), (3,"c")]))==  False<br>
> <br>
>         The docs hint at this with "This means that @f<br>
>         <<a href="https://github.com/f" rel="noreferrer noreferrer" target="_blank">https://github.com/f</a>>@ maps distinct original keys to distinct<br>
>         resulting keys."<br>
> <br>
>         However, I'd propose that we deprecate this name and rename to<br>
>         something like |mapKeysIncreasing|or |mapKeysAsc| (to follow the<br>
>         pattern of other *Asc functions). We should also clarify the docs.<br>
> <br>
> <br>
>          From <a href="https://github.com/haskell/containers/issues/617" rel="noreferrer noreferrer" target="_blank">https://github.com/haskell/containers/issues/617</a><br>
>         _______________________________________________<br>
>         Libraries mailing list<br>
>         <a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a> <mailto:<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a>><br>
>         <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
> <br>
> <br>
> _______________________________________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
> <br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>