[m-dev.] For review: improve undefined pred/symbol error message

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Sep 22 14:05:52 AEST 1998


On 22-Sep-1998, Thomas Charles CONWAY <conway at cs.mu.OZ.AU> wrote:
> 
> Could someone please review this change?
> Since it only changes an error message (for the better ;-) we may
> want to include it in the forthcoming release. Does it constitute
> a `new feature', and therefore should it be postponed?

Well, could it introduce new bugs?

I spotted at least one significant bug, so I think the answer has to be yes.

But fix the bugs and then we can reconsider.

> Keep track of which modules have been imported as 'local' or 'exported'
> so that later in type checking, if an explicitly qualified name is undefined,
> we can issue an error message that gives a hint if the module has not been
> imported.

Why mention "as `local' or `exported'" in the log message?
(a) Modules which are _imported_ can't be local or exported.
    Maybe you mean "imported in the interface section
    or imported in the implementation section"?
(b) You don't care which section they're imported in anyway,
    so why mention it in the log message?

The bug is that you need to keep track of not only modules that
have been imported, but also of modules that have been "used"
with a `use_module' declaration.

> compiler/hlds_module.m:
> 	Add a pair of predicates for accumulating and retreiving the

s/retreiving/retrieving/

Please post another diff.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list