[mercury-users] rule is a reserved word?

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jun 8 05:25:00 AEST 1999


On 07-Jun-1999, Dominique de Waleffe <ddw at miscrit.be> wrote:
> Just got that one a few days ago too. Appears that rule is used for some
> purpose in nu-prolog and defined in Mercury as reserved word for
> compatibility...

Yes.  Actually in Mercury `rule' is an operator, but not a reserved word.
You can go ahead and use `rule' as an identifier, just so long as you
put it in parentheses.

(In NU-Prolog, `rule' was used for type declarations for predicates
defined using DCG clauses. `:- rule p(arg1, arg2, arg3)' was
an abbreviation for `:- pred p(arg1, arg2, arg3, any, any).')

The Prolog to Mercury Transition Guide contains a table listing
all the operators in Mercury.  That table really ought to be in
the Mercury Language Reference Manual.

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