[m-dev.] For review: improve undefined pred/symbol error message

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Sep 22 15:01:13 AEST 1998


On 22-Sep-1998, Thomas Charles CONWAY <conway at cs.mu.OZ.AU> wrote:
> Fergus Henderson, you write:
> > The bug is that you need to keep track of not only modules that
> > have been imported, but also of modules that have been "used"
> > with a `use_module' declaration.
> 
> How about include_module -

Ah, I forgot about sub-modules.

You don't need to keep track of modules included with `include_module',
or nested sub-modules defined within a module,
since any declarations in sub-modules are not visible in the parent
or siblings unless explicitly imported using `import_module' or
`use_module'.  However, you need to include any parent modules
of the current module in the list of imported modules.

> I couldn't find any mention of it in the
> notes/module_system.html file?

That file predates nested modules.

The relevant documentation is in the Mercury reference manual
(particularly the "visibility rules" section of the bit on
sub-modules).

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list