
On Mon, Jan 17, 2005 at 04:04:29PM -0000, Simon Marlow wrote:
Here's a reply from Daan.
As I see it: we could change all the operations in Data.Set/Data.Map to be right-biased, but that's a fair bit of work and might introduce new bugs.
Data.FiniteMap had: addToFM_C f (unitFM k x) k y = unitFM k (f x y) the new Data.Map has: insertWith f k x (singleton k y) = singleton k (f x y) Given the new argument order of insertWith, it seems the treatment of f is obviously right, and one needs to remember to flip them both when porting. On the other hand fromList is the same as listToFM. I think the only problem is union :: Set a -> Set a -> Set a, which has the same name and type as before, but different semantics. But then only people who were abusing sets will suffer.