[m-dev.] module system discussion

Peter Ross peter.ross at miscrit.be
Mon Nov 26 22:55:02 AEDT 2001


Simon wrote:
> 2. `:- transparent_module' and `:- include_transparent_module'
> (we can probably do better on the names)
>
> `:- transparent_module' is a new variant of the `:- auto_import'
> proposal, suggested by Tyson.
>
> A transparent sub-module is defined using a `:- transparent_module'
> declaration rather than a `:- module' declaration, or included
> using an `:- include_transparent_module' declaration. A transparent
> sub-module is always _used_ when the parent module is imported or
used.
>
> This is useful for qualifying the methods of typeclasses with the
class
> name without having explicitly to import the module (and lots of
similar
> ones) everywhere, and without having to import the entire hierarchy
with
> `:- use_hierarchy'.
>
> I think Fergus was still a bit wary about this one.
>
I can imagine situations where this would be useful, however
import_hierarchy is sufficient for my needs.

I think it is a worthwhile addition.

Pete


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