[m-rev.] for review: fix some problems with module qualification

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Feb 21 15:32:48 AEDT 2003


On 21-Feb-2003, David Overton <dmo at cs.mu.OZ.AU> wrote:
> On Thu, Feb 20, 2003 at 06:19:36PM +1100, Fergus Henderson wrote:
> > The builtin insts such as the higher-order inst "func(in, out) is det"
> > use special syntax.  They are not defined in the builtin module, they
> > are defined by the language.  So I'm not really convinced that it makes
> > sense to allow the use of module-qualifiers on those.
> > 
> > I wouldn't mind doing this for the insts that don't have special syntax,
> > such as "free" and "ground", but for those which do, such as
> > "bound(...)" and higher-order insts, I think allowing module qualifiers
> > would just complicate Mercury's syntax.  Furthermore, it opens a can of
> > worms -- if you allow "func(in, out) `builtin.is` det",
> > shouldn't you also allow "builtin.func(in, out) is builtin.det"?
> > What about clauses for foo/1 defined as "builtin.':-'(foo(X), ...)."?
> 
> It was insts such as `free' and `ground' that I was thinking of with
> this change.  I will disallow it for insts with special syntax if you
> like -- we don't need to allow these to be module-qualified.

I'm still not exactly a *fan* of this idea on language design principles,
but if it will make your life easier then I'm OK with it.

> The change to disallow mixed module qualifiers should be a separate
> change IMHO.

Sure.

> > The call to maybe_unqualify_sym_name/3 should be in the body of the
> > if-then-else.
> 
> But we need to unqualify the name before checking whether it is builtin
> inst name.

Sorry, my mistake.

> Relative diff:

Could you please post a new full diff too?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list