Export lists in modules
mai99dgf at studserv.uni-leipzig.de
Tue Feb 21 09:13:08 EST 2006
On Tuesday 21 February 2006 11:40, Malcolm Wallace wrote:
> "Jared Updike" <jupdike at gmail.com> wrote:
> > > I am not sure if this has been mentioned before, but something I
> > > would really find useful is the ability to tell Haskell to export
> > > everything in a function except for some named functions.
> > No one has responded so ...
> I believe some people (perhaps on another list) have been advocating the
> addition of Java-style public/private modifiers on function definitions,
> to indicate whether they are exported or not. (A truly horrible idea in
> my opinion!)
Why is it horrible? It avoids redundancy in the code-file which is a good
thing in general.
> > > module Module hiding ( list, of, things, not, to, export ) where
> > > ....
> I quite like this for its minimal syntactic overhead, and backward
> compatibility. There is a slight worry that it would be too easy to
> overlook the "hiding" keyword when reading a module, leading to
I dislike this idea because the export list is a sort of signature of the
module, which is also often used for structuring the haddock documentation.
In case of hiding() version you explicitly state the unimportant parts.
Apart from that you might change the hidden functions much more often than the
Proper signatures would be a nice solution I guess.
Just my 2p!
> There is also the issue that we might adopt the proposal to allow (and
> perhaps eventually, to require) type signatures on export lists. If so,
> then it would be kind of ridiculous to have interface signatures only
> for the things you are /not/ exporting!
> Haskell-prime mailing list
> Haskell-prime at haskell.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-prime/attachments/20060221/f8c298cd/attachment.bin
More information about the Haskell-prime