Export lists in modules

John Meacham john at repetae.net
Mon Feb 27 20:59:10 EST 2006

On Fri, Feb 24, 2006 at 09:20:10AM +0100, Ketil Malde wrote:
> I don't think saving one line from each file in projects using
> alternative Preludes justify adding one line to each file in projects
> using the standard Prelude.  If there is any reason to think custom
> Preludes will outnumber the standard one, I'll change my mind.

I very much agree.

I can see the theoretical appeal of a minimal prelude, but I don't think
it outweighs the practical and real advantages of a somewhat inclusive
one. especially when the module system already makes it easy to hide
names on import. Not that I wouldn't mind reevaluating what should be in
the prelude, but I don't see the need for pushing towards a truely
minimal one.

> This sounds like yet another feature that is greatly interesting and
> wonderful to language hackers, and mostly annoying to the average
> programmer - partly by requiring extra overhead and boilerplate stuff,
> and partly by breaking old code.

Hey, I am a language hacker and would find it anoying :)

I do find it quite bothersome that modules reexport things the prelude
does, like List for instance rexporting (and,or,...) 

Things in the prelude are already in scope normally, if another module
reexports them then it just anoys people that want to override them as
they have to add hiding clauses to multiple imports. I would be very
happy if we had a policy of making the exports from the standard
libraries disjoint.

In general, I don't think reexporting names from other modules is good
style unless there is a very good reason. But I know others disagree
with me on this, or at least have a different point at which they decide
a reason is good enough :)


John Meacham - ⑆repetae.net⑆john⑈

More information about the Haskell-prime mailing list