[m-dev.] For review: Fix inappropriate warning message for purity markers.

Fergus Henderson fjh at cs.mu.oz.au
Sat Dec 13 21:41:42 AEDT 1997


Peter Schachte, you wrote:
> 
> Ripped out code to warn if impurity markers were put before non-atomic
> goals.  Such errors are now handled in prog_io_goal.m, and a suitable
> error message is printed by typecheck.m.  So the code in purity.m was
> vestigial.  It was triggered by implied modes of semipure or impure
> goals, because they are turned into conjunctions, which then appear to
> have been marked {im,semi}pure.

Does the code in prog_io_goal report an error for `impure call(P)',
as in the following example?

	:- impure pred p(pred::(pred is semidet)) is semidet.
	p(P) :- 
		impure call(P).

Your fix looks fine, but adding a regression test would not be a
bad idea.

Cheers,
	Fergus.

-- 
Fergus Henderson              | Designing grand concepts is fun;
fjh at cs.mu.oz.au               | finding nitty little bugs is just work.
http://www.cs.mu.oz.au/~fjh   | -- Brooks, in "The Mythical Man-Month".
PGP key fingerprint: 00 D7 A2 27 65 09 B6 AC  8B 3E 0F 01 E7 5D C4 3F



More information about the developers mailing list