[m-dev.] for review: add ++ and -- operators

Michael Day mcda at students.cs.mu.oz.au
Thu Aug 10 22:01:29 AEST 2000


Hi,

is this the correct diff format? Any qualms about the associativity of the
-- operator?

Michael

===================================================================

Estimated hours taken: 1

Add the ++ and -- operators for future use as list append and
remove_suffix operators.

library/ops.m:
        Add the ++ and -- operators.

compiler/mercury_to_mercury.m:
        Add the ++ and -- operators to mercury_infix_op.

doc/transition_guide.texi:
        Add the ++ and -- operators to the list of Mercury operators.

Index: library/ops.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/ops.m,v
retrieving revision 1.30
diff -u -r1.30 ops.m
--- library/ops.m	2000/03/28 03:40:39	1.30
+++ library/ops.m	2000/08/10 11:57:20
@@ -125,10 +125,12 @@
 ops__op_table("*", after, yfx, 400).		% standard ISO Prolog
 ops__op_table("**", after, xfy, 200).		% standard ISO Prolog
 ops__op_table("+", after, yfx, 500).		% standard ISO Prolog
+ops__op_table("++", after, xfy, 500).		% Mercury extension
 ops__op_table("+", before, fx, 500).		% traditional Prolog (not ISO)
 ops__op_table(",", after, xfy, 1000).		% standard ISO Prolog
 ops__op_table("&", after, xfy, 1025).		% Mercury extension
 ops__op_table("-", after, yfx, 500).		% standard ISO Prolog
+ops__op_table("--", after, xfy, 500).		% Mercury extension
 ops__op_table("-", before, fx, 200).		% standard ISO Prolog
 ops__op_table("--->", after, xfy, 1179).	% Mercury extension
 ops__op_table("-->", after, xfx, 1200).		% standard ISO Prolog
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.171
diff -u -r1.171 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m	2000/08/09 07:47:10	1.171
+++ compiler/mercury_to_mercury.m	2000/08/10 11:57:32
@@ -2827,7 +2827,9 @@
 mercury_infix_op(".").		
 mercury_infix_op(":").		
 mercury_infix_op("+").
+mercury_infix_op("++").
 mercury_infix_op("-").
+mercury_infix_op("--").
 mercury_infix_op("/\\").
 mercury_infix_op("\\/").
 mercury_infix_op("*").
Index: doc/transition_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/transition_guide.texi,v
retrieving revision 1.33
diff -u -r1.33 transition_guide.texi
--- doc/transition_guide.texi	2000/01/25 04:10:05	1.33
+++ doc/transition_guide.texi	2000/08/10 11:57:35
@@ -112,9 +112,11 @@
 *               yfx             400
 **              xfy             300
 +               yfx             500
+++              xfy             500
 +               fx              500
 ,               xfy             1000
 -               yfx             500
+-               xfy             500
 -               fx              500
 --->            xfy             1179
 -->             xfx             1200

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