[m-dev.] module system discussion

Peter Ross peter.ross at miscrit.be
Tue Nov 20 00:01:05 AEDT 2001


On Mon, Nov 19, 2001 at 05:53:33PM +1100, Fergus Henderson wrote:
> 3.  The "zillion imports" problem.
> 
>     Peter Ross has complained about needing too many `:- use_module'
>     or `:- import_module' declarations when interfacing with the
>     Mercury modules generated by our .NET component interface
>     generator tool.
> 
The reason we need to put it in a seperate sub-module is to help avoid
problems with overloaded names.  So I think that this can be thought of
us an instance of the following problem as well.

> 4.  The overloading problem.
> 
>     In cases like extras/complex_numbers, sub-modules are used just because
>     Mercury has some restrictions on overloading things with the same
>     name and arity in a single module.  Conceptually you really have a
>     single entity; it is broken into sub-modules only because this is
>     needed to allow overloading.
> 
>     In this situation, it would be nice to make things easier for users
>     of such modules, so that they could treat it as a single entity,
>     rather than needing to explicitly import all the sub-modules.
> 
>     (It would also be nice to make things easier when defining such
>     modules; but unfortunately doing that would have some significant
>     drawbacks that I've explained in an earlier mail.  So I don't think
>     that is worth it.)
> 
Adding a reference to that email would be great.

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