[m-dev.] Separate sub-module suggestions

Ralph Becket rafe at cs.mu.OZ.AU
Mon Mar 18 16:19:55 AEDT 2002


At today's Mercury meeting we discussed a number of matters concerning
the naming of separate sub-modules.

We came up with three suggestions which are presented for comment below.
(Simon, you're probably in the best position to do the implementation
work.)

1. It should be possible to specify to the mmake depend stage whether
the module name separator will be
(a) `.' or
(b) `/' (i.e. the directory hierarchy reflects the module hierarchy.)

2. It should be possible to specify to the mmake depend stage whether
separate sub-module file names will be
(a) fully qualified,
(b) partially qualified, or
(c) completely unqualified.

So a module foo__bar__baz could appear in the following files

1a	foo.bar.baz.m		2a, 2b
1a	bar.baz.m		    2b
1a	baz.m			    2b, 2c
1b	foo/bar/baz.m		2a, 2b
1b	bar/baz.m		    2b
1b	baz.m			    2b, 2c

There are good S/W engineering reasons to prefer 2a over the other
options, however people working with CVS may well find it less hassle to
adopt 2b or 2c thanks to problems CVS has with moving files around.

3. It should be possible to specify a table to the mmake compilation
stage mapping module names to files.  There should be an option to mmake
depend to automatically generate such a table.  The table would serve
both as an optimization (reduce the amount of time spent looking for
separate sub-modules with partially qualified file names) and to allow
an explicit mapping by the programmer should this be useful.

- 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