[m-dev.] diff: remove `int:^/2' and `integer:^/2'
Simon Taylor
stayl at cs.mu.OZ.AU
Sun Jan 16 15:35:22 AEDT 2000
Estimated hours taken: 0.1
library/int.m:
library/integer.m:
Remove functions `int:^/2' and `integer:^/2', since
the operator `^' is now used for record syntax.
compiler/code_util.m:
Remove `int:^/2' from the list of builtins.
NEWS:
Document record syntax and the removal of the above functions.
Index: library/int.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/int.m,v
retrieving revision 1.64
diff -u -u -r1.64 int.m
--- int.m 1999/11/16 07:51:19 1.64
+++ int.m 2000/01/16 00:09:32
@@ -152,13 +152,6 @@
:- func int__xor(int, int) = int.
:- mode int__xor(in, in) = uo is det.
- % bitwise exclusive or (xor)
- % This version will be removed soon - the operator
- % is needed for record syntax.
-:- func int ^ int = int.
-:- mode in ^ in = uo is det.
-:- pragma obsolete(('^')/2).
-
% bitwise complement
:- func \ int = int.
:- mode \ in = uo is det.
Index: library/integer.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/integer.m,v
retrieving revision 1.7
diff -u -u -r1.7 integer.m
--- integer.m 1999/12/01 02:54:06 1.7
+++ integer.m 2000/01/16 00:10:50
@@ -50,7 +50,7 @@
% 6) Add bit operations (XOR, AND, OR, etc). We would treat
% the integers as having a 2's complement bit representation.
% This is easier to do if we use base 2^14 as mentioned above.
-% (djh: this is done: /\ \/ << >> ^ \)
+% (djh: this is done: /\ \/ << >> xor \)
%
% 7) The implementation of `div' is slower than it need be.
% (djh: this is much improved)
@@ -132,9 +132,6 @@
:- func integer `xor` integer = integer.
-:- func integer ^ integer = integer.
-:- pragma obsolete(('^')/2).
-
:- func \ integer = integer.
:- func integer__abs(integer) = integer.
@@ -277,8 +274,6 @@
;
big_xor(X1, X2)
).
-
-X1 ^ X2 = X1 `xor` X2.
\ X = big_neg(big_plus(X, integer__one)).
Index: compiler/code_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/code_util.m,v
retrieving revision 1.115
diff -u -u -r1.115 code_util.m
--- code_util.m 2000/01/14 01:10:14 1.115
+++ code_util.m 2000/01/16 04:18:48
@@ -483,8 +483,6 @@
no, yes(Z - binop(('|'), var(X), var(Y)))).
code_util__translate_builtin_2("int", "builtin_bit_xor", 0, [X, Y, Z],
no, yes(Z - binop((^), var(X), var(Y)))).
-code_util__translate_builtin_2("int", "^", 0, [X, Y, Z],
- no, yes(Z - binop((^), var(X), var(Y)))).
code_util__translate_builtin_2("int", "xor", 0, [X, Y, Z],
no, yes(Z - binop((^), var(X), var(Y)))).
code_util__translate_builtin_2("int", "builtin_unary_plus", 0, [X, Y],
Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.158
diff -u -u -r1.158 NEWS
--- NEWS 2000/01/06 05:00:50 1.158
+++ NEWS 2000/01/16 04:27:54
@@ -1,5 +1,19 @@
-NEWS for Mercury release 0.9.1
-------------------------------
+
+NEWS since Mercury release 0.9:
+-------------------------------
+
+* We've added support for record syntax, so that fields of
+ constructors can be conveniently extracted and updated
+ without writing lots of trivial access predicates.
+ See the "Field access functions" section of the "Types" chapter
+ of the Mercury Language Reference Manual for details.
+
+* Functions `int:^/2' and `integer:^/2' have been removed.
+ Use `int__xor/2' and `integer__xor/2' instead.
+ The operator `^' is now used for record syntax.
+
+NEWS for Mercury release 0.9.1:
+-------------------------------
This release is primarily a bug-fix release.
It fixes some bugs with the binary distribution of 0.9,
--------------------------------------------------------------------------
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