[m-dev.] module system discussion

Simon Taylor stayl at cs.mu.OZ.AU
Sat Dec 15 22:04:25 AEDT 2001


On 14-Dec-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> Simon wrote:
> > On 13-Dec-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > > I think the transparent_module name is misleading, and to use the
> following
> > > name would be better:
> > >
> > > :- namespace ns.
> > > :- end_namespace ns.
> >
> > I have no objection to this. I'm not sure whether it would be worth
> > adding an `:- import_namespace' declaration -- it would seem a bit
> > strange to import a `namespace' using an `:- import_*module*' declaration.
> > But that's a minor detail.
> >
> Actually on further consideration, a namespace declaration should be
> equivalent to
> 
> :- import_module ns.

That should be `:- use_module ns'.

> :- transparent_module ns.
> :- end_transparent_module ns.
> 
> that way the parent module can use the items defined inside the namespace
> without having to do anything.

That doesn't deal with the issue I raised. It should still be possible
to `:- import_module' the `namespace' in order to refer to the items
it contains without qualification.

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