How to use Data.Set.Set

Christian Maeder maeder at tzi.de
Wed Oct 12 12:10:49 EDT 2005


Ketil Malde wrote:
> the advantage of Set.map instead of mapSet?

Well, you know that the unqualified name is "map", i.e. also for 
Data.Map it's not mapMap or mapFM but <YourChoice>.map.

> (Oh, right, I can "import qualified List as Set" -- but then I still
> have to change "member" to "elem" etc etc.)

I think, that was discussed when including Data.Set and Data.Map (but 
only isEmpty became null). Replacing the import of Set by List does not 
work well, but Data.Set could be easily replaced by a different Set 
implementation with the same (or a similar enough) interface.

Christian


More information about the Glasgow-haskell-users mailing list