[Haskell-cafe] Re: List of exports of a module - are there alternatives?

wren ng thornton wren at freegeek.org
Wed May 13 19:44:28 EDT 2009

Maurício wrote:
> I would like a keyword we could add to a single declaration,
> like:
> hidden a :: Int -> Int
> a = (...)
> The 200 names is not the best example. It's more a question of
> proportion: if you export 5 declarations in a module with 20,
> it's OK, but if you export 19 declarations in a module of 20
> maintenance can be painfull to your eyes, going up and down
> into your file to check if the list is correct.

It sounds like what you (may) want is a refactoring browser which can 
annotate definitions for whether they're exported or not. This would 
solve the maintenance issue without the need for a language change. I 
don't know whether Leksah[1] or Yi[2] can do this, but if not it should 
be easy to add and it's a reasonable feature to request.

Everyone agrees that the module system in Haskell98+HierarchicalModules 
is the weakest thing we could get away with at the time, and also that 
it's in need of serious redesign now that we have large scale projects 
which are straining those boundaries. However, as with the other folks 
on this thread, I don't think that a new keyword is the proper path for 
extending the design. Too ad-hoc, too Java/C++ like, it just doesn't 
have the feel of a fluent, principled, modular, extensible design.

[1] http://leksah.org/
[2] http://www.haskell.org/haskellwiki/Yi

Live well,

More information about the Haskell-Cafe mailing list