[m-dev.] Re: [m-rev.] EDCG implementation

Peter Nicholas MALKIN pnmalk at students.cs.mu.oz.au
Mon Mar 19 00:07:53 AEDT 2001


Hi,

On Sat, 17 Mar 2001, Peter Schachte wrote:

> Do they have to use the -->> operator, too?  Ie, if I have a predicate
> defined:
> 
> 	foo(X, Z) :-
> 		bar(X, Y),
> 		baz(Y, Z).
> 
> and bar/2 and baz/2 use EDCG arguments, and I've specifies --inher-edcgs,
> will it infer that foo/2 uses those EDCG arguments?
> 
> I don't think it should, because the programmer has not indicated her
> awarenes that the body of foo/2 is sequential and not commutative.

It will infer EDCG arguments for `foo' but it will give an error because
the functor `-->>' was not used.

Any predicate that has forms declared or inferred for it must have the
functor `-->>'.  If the predicate does not then it is an error. If the
predicate has the functor `-->>' and does not have any declared or
inferred forms then it is a warning.

Peter

--------------------------------------------------------------------------
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