export modifiers, was: Re: Haskell-prime Digest, Vol 2, Issue 58

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Fri Feb 24 06:32:25 EST 2006

Axel Simon wrote:

>> One of the nice things about Haskell is that definitions can appear in any order. That makes it possible to gather a group of logically related definitions together, within a module. With your proposal, exported definitions and non-exported ones would have to be separated.
> ... what about a Jave/C++ like approach 

This has been suggested by some,
and John Hughes did in fact support this later in his email:

> Perhaps, given that Haddock is available, a public modifier makes more
> sense than an explicit export list-

and I'd like to underline that this modifier should be attached
to a declaration individually (as in Java),
and *not* start a region (similar to C++)

> public:
> main = ....
> private:
> helper1 = ...
> helper2 = ...
> public:

because this would introduce order dependencies again:
you'd have to search up the source code file
to find out whether a declaration is private or not,
and you'd have to be careful when moving around code.

Respectfully submitted,
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- http://www.imn.htwk-leipzig.de/~waldmann/ -------

More information about the Haskell-prime mailing list