diff: library/prolog.m bug fix

Fergus Henderson fjh at cs.mu.oz.au
Sat Jul 26 19:09:21 AEST 1997


library/prolog.m:
	Use explicit double-underscore module qualifiers in the definitions of
	the Prolog operators, so that for Prolog the definitions here do
	not override the builtin Prolog definitions.

Index: prolog.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/prolog.m,v
retrieving revision 1.4
diff -u -r1.4 prolog.m
--- prolog.m	1997/06/30 17:23:32	1.4
+++ prolog.m	1997/07/26 09:01:57
@@ -102,19 +102,20 @@
 !(X, X).
 *********/
 
-X == X.
-X \== Y :- X \= Y.
+% we use module qualifiers here to avoid
+% overriding the builtin Prolog versions
 
-X =:= X.
-X =\= Y :- X \= Y.
+'prolog__=='(X, X).
+'prolog__\\=='(X, Y) :- X \= Y.
 
-X @< Y :- compare(<, X, Y).
-X @> Y :- compare(>, X, Y).
-X @=< Y :- compare(R, X, Y), R \= (>).
-X @>= Y :- compare(R, X, Y), R \= (<).
+'prolog__=:='(X, X).
+'prolog__=\\='(X, Y) :- X \= Y.
+
+'prolog__@<'(X, X) :- compare(<, X, Y).
+'prolog__@>'(X, Y) :- compare(>, X, Y).
+'prolog__@=<'(X, Y) :- compare(=<, X, Y).
+'prolog__@>='(X, Y) :- compare(>=, X, Y).
 
-% we use a module qualifier here to avoid
-% overriding the builtin Prolog version
 'prolog__=..'(Term, Functor - Args) :-
 	deconstruct(Term, Functor, _Arity, Args).
 

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