DEPRECATED foldWithKey "Use foldrWithKey instead"
Christian.Maeder at dfki.de
Wed Dec 8 16:40:44 CET 2010
Am 08.12.2010 16:09, schrieb Johan Tibell:
> On Wed, Dec 8, 2010 at 3:52 PM, Christian Maeder
> <Christian.Maeder at dfki.de> wrote:
>> Could someone (maybe the person who introduced it) simply delete it in
>> the next version (or make a library proposal)?
> We added it after a library proposal. The warning was there in the
> docs already in 0.3. If you prefer a different design, write a library
Come on, it'll take ages to get this warning out again (or the other
points fixed). Meanwhile I already switch off all warnings-deprecations.
>> A matching "foldrWithKey" (and foldlWithKey) is missing in Data.IntMap.
>> and folding without keys is also only given via "fold" in Data.Map.
> That suggests we should add foldrWithKey and foldlWithKey to IntMap,
> not remove them from Data.Map. Same goes for the without-key fold in
>> Data.Set contains toList and toAscList and the former is rightly not
>> deprecated. (A function toDescList is missing though in Data.Set.)
> "Rightly"? You mean: you prefer to have both.
Yes, if I use toList I indicate that I don't care about the order.
>> Furthermore, Data.Map.foldrWithKey is not part of the container package
>> that came with ghc-6.10.4.
> Why does that matter? It's been in the two latest major version of containers.
ghc-6.10.4 is my production compiler for power-pc and sparc, due to
problems with ghc-6.12.3 and ghc-7
More information about the Libraries