Export lists in modules

Wolfgang Jeltsch wolfgang at jeltsch.net
Wed Feb 22 11:07:50 EST 2006

Am Dienstag, 21. Februar 2006 21:59 schrieb Ketil Malde:
> Wolfgang Jeltsch <wolfgang at jeltsch.net> writes:
> > On the other hand, sometimes it makes sense to have a "mostly qualified"
> > import.  For example, if you import Data.Set or Data.Map you might want
> > only the type constructors to be imported unqualified and the rest to be
> > imported qualified.
> Personally, I would greatly prefer to have libraries that do not clash
> with common Prelude functions.

I would solve this problem by reducing the Prelude to just a core.  List 
function could go, for example, (mostly) into Data.List.

> I find it quite annoying to always have to import these modules twice, and
> still have to qualify many uses.
> If you always have to qualify it, what's the advantage of
> Data.Set.empty over emptySet again?  At least with 'emptySet' I know
> what to grep for.

I would import Data.Set as Set.  So I would use Set.empty instead of emptySet.  
The advantage is that Set.empty is more structured.  You can easily 
distinguish the kind of operation (empty) and the type you are working with 

> -k


More information about the Haskell-prime mailing list