[m-dev.] Module qualification of typeclass methods

Peter Ross peter.ross at miscrit.be
Tue Nov 20 19:52:49 AEDT 2001


On Tue, Nov 20, 2001 at 02:24:05AM +1100, Fergus Henderson wrote:
> On 15-Nov-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> >
> > The only drawback to this approach is that you lose the sub-module
> > qualifier.  I would argue that this information is useful.
> 
> If that information is useful, then what's wrong with just putting in
> all the `:- import_module' declarations?
> 
The zillions of imports problem.

I don't want to import all the sub-modules so I can use the fully
qualified names.  I also don't want want to aggregrate all the names
into the same namespace.  So for this problem ":- include" is not the
correct fit.

I think that the ":- include" is a good idea.  The only down side to it
is that it renames modules which is what you want sometimes and not what
you want at other times.  In my current case, it is not what I want.

I think that the ":- auto_import" is also a good idea.

As ":- include" renames modules I think it is fine to allow it to apply
to any module.

However the ":- auto_import" declaration doesn't do any renaming.
Since it doesn't do any renaming it seems fair to me to try and restrict
it to only importing related modules, which implies sub-modules only.

So in summary I think that we should have both.

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