[Haskell-cafe] Re: Design your modules for qualified import

Henning Thielemann lemming at henning-thielemann.de
Fri Jun 6 12:54:29 EDT 2008


On Fri, 6 Jun 2008, Achim Schneider wrote:

> Jan-Willem Maessen <jmaessen at alum.mit.edu> wrote:
>
> > There's one caveat: Always choose descriptive names, even if you are
> > assuming that you will usually use a qualified import.  The
> > following are wonderful names, even though they conflict with the
> > prelude: null
> >    filter
> >    map
> >    lookup
> >
> import Prelude as P
>
> > The following are terrible names:
> >    T
> >    C
>
> Not to mention that this usage is hideously confusing while looking at
> the haddock docs.

But that will be resolved when Haddock can show identifiers with
qualifications.

> While I don't mind Haskore having them, they should just be different
> names for a type that has a clear name. It also appears to generate an
> excessive amount of modules.

It's good to have fine grained modules, because you can more easily
exchange the parts you want different from the standard way. For reducing
import lists for simple songs I think we could provide wrapper modules.


More information about the Haskell-Cafe mailing list