[m-dev.] module system discussion

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Dec 12 03:56:02 AEDT 2001


Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Wouldn't ordinary nested modules and `:- use_hierarchy' suffice,
> > both for Mercury type classes, and for interfacing with .NET?
> 
> I don't think it's OK to have to `:- use_hierarchy System'
> to use the classes defined at the top level.
> 
> The sloppy solution (import everything) should not be the only
> practical solution.

But it's not.  You can always use explicit `:- use_module'
declarations for each module that you wish to import.

In some cases, that might be tedious, and so in those cases
you might prefer to go for the `:- use_hierarchy' solution.
But using `:- use_module' is certainly practical.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list