Proposal: keep Data.Map.foldWithKey

Christian Maeder Christian.Maeder at dfki.de
Wed Dec 15 12:49:37 CET 2010


Am 14.12.2010 18:42, schrieb Ian Lynagh:
> On Tue, Dec 14, 2010 at 01:28:14PM +0100, Christian Maeder wrote:
>>
>> I've now created a proper library proposal to keep Data.Map.foldWithKey.
>>
>> http://hackage.haskell.org/trac/ghc/ticket/4842
> 
> In the ticket you say:
> 
>     [keep] Data.Map.foldWithKey as the aim to finally remove this function
>     is bad as long as Data.IntMap.foldWithKey is the primary folding
>     function for the specialized maps.
> 
> but why is keeping foldWithKey the right answer, rather than adding
> fold{l,r}WithKey to Data.IntMap (and removing foldWithKey from it)?

If Data.IntMap.foldWithKey is removed, code for ghc-6.12. would break.

I see an urgent need to re-establish the symmetry between Data.Map and
Data.IntMap. (Deprecation can wait for the next major ghc release.)

Christian



More information about the Libraries mailing list