[m-dev.] for review: add mdb support for interactive queries

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Mar 5 05:06:17 AEDT 1999


On 04-Mar-1999, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> > If you want your query to use symbols
> > in the implementation of module `foo', then the system should compile
> > it to a nested module `foo.query.m'.  Currently the compiler *doesn't*
> > check that foo.query.m is really declared to be a submodule of `foo',
> > so the following patch is the only change currently required to the
> > compiler.
> 
> Cooler still.  It's not clear to me, though, if this patch documents
> this facility well enough to stop someone (maybe you?) later putting
> in the check for the submodule declaration, breaking this feature. 

You're right.

> Is there some other place this should be documented?

At the definition of `exported_to_submodules' in hlds_pred.m.

However, documenting it there, while helpful, is still really no guarantee.
The right thing to do is to add a test case to the test suite.

> > There needs to be some way of saying which module you want to
> > nest the query in.  Any suggestions on the user interface?
> 
> Isn't it enough just to allow module-qualified goals?

What do you mean by module-qualified goals?

You can have module-qualified predicate calls, but then what
do we do about goals such as `?- m1:foo, m2:bar.'?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list