[m-dev.] for review: more empty array initializers
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Feb 7 18:19:32 AEDT 2001
On 07-Feb-2001, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
>
> At the moment, ProcLayoutNames can be the empty list only if the module does
> not export any procedures or types (since types have automatically generated
> unify and compare procedures). I don't think that is allowed, although I am
> not sure whether the front end checks this.
That is allowed. Modules can export sub-modules, insts, modes,
type classes, etc.
If a module doesn't export *anything*, then the front end issues a
warning, but it is still allowed. (It might arise when automatically
generating Mercury source, e.g. from conditional compilation, so I
don't think it should be disallowed; a warning is sufficient.)
> FileLayoutNames can be empty only if the module has *no* events with non-dummy
> contexts. Even if the module has #line directives, every procedure (even
> compiler-generated ones) should have a non-dummy context, so this can happen
> if the module has no procedures.
OK, but it's quite reasonable to have modules with no procedures
(e.g. just containing nested modules).
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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