Export lists in modules

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Fri Feb 24 07:25:26 EST 2006

Ketil Malde <ketil+haskell at ii.uib.no> wrote:

> > One of the problems with the current mechanism for overriding
> > Prelude definitions, is that every module that /uses/ such an entity
> > must also explicitly hide the original Prelude:
> I guess I don't quite understand what you are trying to achieve.

The problem, as I see it, is that the Prelude steals too many good names
from the user.  For instance, there are complaints about the Numeric
class hierarchy being inconvenient.  So if you want to re-define
arithmetic using groups, rings, and whatnot, then you must really use
new names for (+), (*), etc, or force every user module to hide the
Prelude.  Neither alternative is terribly attractive.

> * The standard Prelude is IMO going to be vastly more common than
> custom replacements.  Custom Prelude users are also likely to be more
> accomplished Haskell programmers.  Any administrative burden should be
> on the custom Prelude users.

A valid point.  At the moment however, I think the burden on custom
users is too high.

> 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.

There may well be other (small but) breaking changes in Haskell-prime.
We shouldn't break things just for the sake of it, but this is an
attempt to make the language smaller rather than to extend it.

> * That said, I'm all in favor of a switch to tell the compiler to use
> a custom module instead of the implicit Prelude.  Or perhaps more
> generally: provide an implicit, project-wide import?  Something like:
>  ghc --make -fno-implicit-prelude -fimplicit-import MyPrelude Main.hs 

Yes, there may be other ways to achieve the same goal.

> * Much of my resistance would go away if I had better tools to manage
> module interfaces more automatically.  As it is now, import/export
> administration is already enough of a chore to be noticeable.



More information about the Haskell-prime mailing list