cvs commit: fptools/libraries/base fptools/libraries/base/Data IntMap.hs IntSet.hs Map.hs FiniteMap.hs Set.hs

Sven Panne Sven.Panne at
Sun Jan 16 07:37:42 EST 2005

Simon Marlow wrote:
> simonmar    2005/01/13 02:37:39 PST
>   Modified files:
>     libraries/base 
>     libraries/base/Data  FiniteMap.hs Set.hs 
>   Added files:
>     libraries/base/Data  IntMap.hs IntSet.hs Map.hs 
>   Log:
>   Add Data.Map, Data.Set, Data.IntMap and Data.IntSet from Daan Leijen's
>   DData library, with some modifications by JP Bernardy and others on
>   the libraries at list.  Minor changes by me to remove the
>   last references to DData, and add a DEPRECATED copy of the old
>   Data.Set interface to the new Data.Set.
>   Data.FiniteMap is now DEPRECATED.
>   Revision  Changes    Path
>   1.11      +3 -0      fptools/libraries/base/
>   1.20      +5 -1      fptools/libraries/base/Data/FiniteMap.hs
>   1.8       +1096 -69  fptools/libraries/base/Data/Set.hs

I must admit that I didn't follow the data structure discussion in every
detail, but I find something confusing: In Data.FiniteMap.addListToFM_C,
the combining function gets the old value as the 1st argument and the new
value as the 2nd one. In Data.Map.insertWithKey (and friends), this seems
to be the other way round, which is undocumented and *very* confusing when
trying to port things from FiniteMap to Map. Is there a deep reason for this?


More information about the Libraries mailing list