[m-dev.] Inst variables

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 3 16:13:19 AEDT 1998


On 03-Nov-1998, Thomas Charles CONWAY <conway at cs.mu.OZ.AU> wrote:
> 
> What are the scoping rules for inst variables?

Currently inst variables are only allowed in inst and mode definitions;
they must be introduced in the head, and scope over the whole definition.
For example:

	:- inst foo(I1, I2, ...) == ...
	:- inst bar(I1, I2, ...) ---> ...
	:- mode baz(I1, I2, ...) == ...

> I'm thinking of the case where you have two pred expressions
> that contain parametric modes using inst variables:
> 
> p(ListSkelStuff, FinalList) :-
> 	map((pred(A::in(skeleton(I)), B::out(skeleton(J))) is det :-
> 		...
> 	), ListSkelStuff, OtherStuff),
> 	map((pred(A::in(skeleton(J)), B::out) is det :-
> 		...
> 	), OtherStuff, FinalList).

Currently we don't allow parametric modes.

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