[PATCH] Split Data.IntMap into Data.IntMap.Strict and Data.IntMap.Lazy.
fox at ucw.cz
Sat Sep 17 00:13:36 CEST 2011
> On request of Milan, this is a follow up proposal to
> Here is what this patch specifically implements:
> - Shared representation between lazy and strict variants
> - Lazy/Strict modules exporting appropriate operations for each
The reason I requested this proposal is that we are talking about
a bigger change and I was not sure what the community's opinion is.
Current proposal splits the Data.IntMap into two modules -- one
implementing IntMap with lazy values and other with strict values. The
datatypes are the same, so users can freely use value-strict or
value-lazy API. This allows reasonable naming of methods like insertWith'
and also provides value-strict implementation of all methods.
Methods insertWith' and insertWithKey' of Data.IntMap will be documented
as "to be deprecated", then deprecated in the future and removed in even
farther future. I assume that is a reasonable way to do very slow
As mentioned, we have no consensus on whether we should provide
Data.IntMap.Lazy, which would export the Data.IntMap methods without the
insertWith' and insertWithKey'. Currently I am against it.
If we pursue this, we should do the same thing with Data.Map, as well.
More information about the Libraries