[m-dev.] Submodule visibility rules

Ralph Becket rafe at cs.mu.OZ.AU
Tue Jul 2 15:53:18 AEST 2002


Simon Taylor, Tuesday,  2 July 2002:
> 
> The intention is that if the sub-module is declared in the interface,
> its interface should only depend on the interface items of the parent.
> I'm not sure whether that is checked properly when creating the interface
> files, but if a client attempts to use any names local to the parent the
> compiler should report an error.

The compiler does complain if a client tries to use such things, but
doesn't prevent use of equivalence types defined in the submodule
interface that are synonyms for private parent types, so it isn't the
case that the submodule interface cannot depend upon the parent module's
interface if it is included only in the parent module's interface.

The reference manual doesn't make the situation clear to me.

- Ralph
--------------------------------------------------------------------------
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