[m-dev.] for review: integer__xor

Simon Taylor stayl at cs.mu.OZ.AU
Tue Nov 9 13:43:20 AEDT 1999



Estimated hours taken: 0.1

NEWS:
library/integer.m:
	Replace `integer:^/2' with `integer__xor/2' because
	`^' will be used for record syntax.


Index: NEWS
===================================================================
RCS file: /home/staff/zs/imp/mercury/NEWS,v
retrieving revision 1.152
diff -u -u -r1.152 NEWS
--- NEWS	1999/11/03 04:14:32	1.152
+++ NEWS	1999/11/09 01:50:00
@@ -125,8 +125,9 @@
   and `int:unchecked_right_shift/2' that, like the previous implementations
   of `int:>>/2' and `int:<</2', do not check for these cases.
 
-* `int:^/2' has been replaced by `int__xor/2', and will be removed in
-  a future release. The operator `^' will be used by record syntax.
+* `int:^/2' and `integer:^/2' have been replaced by `int__xor/2' and
+  `integer__xor/2', and will be removed in a future release.
+  The operator `^' will be used by record syntax.
 
 New library packages in the Mercury extras distribution:
 ********************************************************
Index: library/integer.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/integer.m,v
retrieving revision 1.6
diff -u -u -r1.6 integer.m
--- integer.m	1999/11/04 04:41:07	1.6
+++ integer.m	1999/11/09 01:53:27
@@ -130,7 +130,10 @@
 
 :- func integer \/ integer = integer.
 
+:- func integer `xor` integer = integer.
+
 :- func integer ^ integer = integer.
+:- pragma obsolete(('^')/2).
 
 :- func \ integer = integer.
 
@@ -259,7 +262,7 @@
         big_or(X1, X2)
     ).
 
-X1 ^ X2 = 
+X1 `xor` X2 = 
     (
         big_isnegative(X1) ->
             (
@@ -274,6 +277,8 @@
     ;
         big_xor(X1, X2)
     ).
+
+X1 ^ X2 = X1 `xor` X2.
 
 \ X = big_neg(big_plus(X, integer__one)).
 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list