How to make Data.Set.Set a Functor

Ketil Malde ketil+haskell at ii.uib.no
Wed Oct 12 03:04:46 EDT 2005


Lajos Nagy <lnagy at fit.edu> writes:

> On the other hand, it seems intuitively natural to make Set an
> instance of fmap. 

Indeed.  While I generally like the overloaded, qualified names, I
find it annoying when, like 'map', they clash with Prelude imports.
Which means that, in a module using Data.Set, I must either use it all
qualified, or import it twice (qualified and hiding map), or
explicitly import Prelude hiding map.  (Better solutions wanted!)

-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