How to use Data.Set.Set

Ketil Malde ketil+haskell at ii.uib.no
Wed Oct 12 08:57:45 EDT 2005


Christian Maeder <maeder at tzi.de> writes:

> I think, you should

>   import qualified Data.Set as Set

> only and use "Set.map" rather than the deprecated "mapSet"

> (most other names from Data.Set make more sense with the "Set." prefix)

I can do this of course, but I think it would be nice to be able to
use it unqualified in modules that only uses Sets (and doesn't use
e.g. Maps or List.(null|map)).  If I always have to qualify it, what
is the advantage of Set.map instead of mapSet?

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

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Glasgow-haskell-users mailing list