Proposal: keep Data.Map.foldWithKey

Christian Maeder Christian.Maeder at
Fri Jan 14 16:37:04 CET 2011

Am 14.01.2011 16:10, schrieb Ian Lynagh:
> On Fri, Jan 14, 2011 at 03:15:56PM +0100, Christian Maeder wrote:
>> Am 14.01.2011 14:30, schrieb Sittampalam, Ganesh:
>>> Is it actually possible to get this change (removal of the deprecation)
>>> in to 7.0.2/the next HP?
>> Doesn't this proposal make it possible?
> We try not to change the APIs of libraries that come with GHC within a
> GHC major release, so that if something compiles with one minor release
> then it'll also compile with another.

It is no API change. It fixes the bug that a program using
Data.Map.foldWithKey called with the flag -Werror is rejected.

> We do occasionally make exceptions (and most compiler bugfixes etc are
> effectively exceptions), if there is strong motivation to do so. Given
> how contentious this proposal has been, personally I don't think there
> is a strong case for making an exception, though.

If you (the community) were willing to allow API changes I would suggest
to add the fold{l,r}WithKey functions to Data.IntMap and the strict
variants fold{l,r}WithKey' to Data.Map and Data.IntMap (to support later
deprecation in 7.2)


> Thanks
> Ian

More information about the Libraries mailing list