[mercury-users] Another Mercury Modes Problem

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jun 1 02:04:06 AEST 2002


On 01-Jun-2002, Bob McKay <bob_mckay at mac.com> wrote:
> 
> Thanks David, this partly clarifies what is going on for me. I hadn't
> appreciated that 'bound' and 'unique' were themselves insts rather
> than properties of insts, with insts forming a partial order in this
> way.

ground/0 and unique/0 are insts.

bound/1 and unique/1 are special syntax for constructing insts.

(/0 means with no arguments, /1 means with one argument.)

> But I'm still a little confused. In
> :- inst listskel(Inst) == bound( [] ; [Inst | listskel(Inst)] ).
> listskel is a function of type inst -> inst, I guess?

Right.

> But what is 'bound' in this context?

bound/1 is special syntax for defining an inst.
The argument of bound/1 is a disjunction of terms,
indicating the possible alternatives.
Each alternative specifies a functor name and the insts
of that functor's arguments.

> And can any inst be used in this way, or is
> this a special property of 'bound' and 'unique'?

The special syntax is restricted to bound/1 and unique/1.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list