for review: add nested modules [5/5]

David Glen JEFFERY dgj at cs.mu.OZ.AU
Thu Feb 26 17:08:40 AEDT 1998


Hi Fergus,

Here's a few brief comments on your changes to the reference manual:

> Index: doc/reference_manual.texi
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/doc/reference_manual.texi,v
> retrieving revision 1.86
> diff -u -u -r1.86 reference_manual.texi
> --- reference_manual.texi	1998/02/05 13:33:40	1.86
> +++ reference_manual.texi	1998/02/25 23:56:48

> +The implementation section must contain definitions
> +for all abstract data types, functions, predicates, and
> +sub-modules exported by the module,
> +as well for all local types, functions, predicates, and sub-modules.

s/as well for/as well as for/

> +The module may optionally end with a @samp{:- end_module @var{ModuleName}}
> +declaration; the name specified in the @samp{end_module} be the
> +same as that in the corresponding @samp{module} declaration.

s/be the/must be the/

> + at node Nested sub-modules
> + at subsection Nested sub-modules
> +
> +Nested sub-modules within an module are delimited by

s/an module/a module/

> + at node Visibility rules
> + at subsection Visibility rules
> +
> +Any declarations in the parent module, including those in the
> +parent module's implementation section, are visible in the parent's
> +sub-modules, including indirect sub-modules (i.e. sub-sub-modules, etc.).
> +Similarly, declarations in the interfaces of any modules imported using a
> + at samp{:- import_module} or a @samp{:- use_module} in the parent module
> +are visible in the parent's sub-modules, including indirect sub-modules.
> +However, declarations in a child module are not visible in the parent
> +module or in "sibling" modules (other children of the same parent)
> +unless the child is explicitly imported using a @samp{:- import_module}
> +or @samp{:- use_module} declaration.

Perhaps it is worth mentioning for clarity whether the sibling needs to
explicitly module qualify the module name.

Aparts from that, the content looks fine to me, but you might still like to
get Simon's comments.


love and cuddles,
dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) |  Marge: Did you just call everyone "chicken"?
MEngSc student,                 |  Homer: Noooo.  I swear on this Bible!
Department of Computer Science  |  Marge: That's not a Bible; that's a book of
University of Melbourne         |         carpet samples!
Australia                       |  Homer: Ooooh... Fuzzy.



More information about the developers mailing list