[mercury-users] unification and polymorphism

Peter David ROSS petdr at cs.mu.OZ.AU
Mon Aug 10 11:29:02 AEST 1998

On 06-Aug-1998, Peter Schachte <pets at students.cs.mu.oz.au> wrote:
> On Thu, 6 Aug 1998, Peter David ROSS wrote:
> > ie. :- pragma type_spec(map__lookup/3, [K - (int:int)]).
> That looks a bit odd.  K is a singlton variable.  Did you perhaps mean
> 	:- pragma type_spec(map__lookup(K,_,_), [K - (int:int)])?
If you want to get rid of the singleton variables then you need to write
the declaration as follows

:- pragma type_spec(map__lookup(map(K,V),K,V), [K - (int:int)])

My intention was that the variable refers to a type variable declared
in the pred declaration.

> And does int:int mean the same thing as int__int (ie, a module qualified
> type name)?
Yes it is a module qualified type name.


More information about the users mailing list