[m-rev.] handle binary prefix operators in mercury_to_mercury.m

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 6 19:49:51 AEDT 2002


Estimated hours taken: 0.25
Branches: main

compiler/mercury_to_mercury.m:
	Output binary prefix operators (such as `some') using operator
	notation.

Workspace: /home/earth/fjh/ws-earth4/mercury
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.202
diff -u -d -r1.202 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m	25 Jan 2002 05:57:35 -0000	1.202
+++ compiler/mercury_to_mercury.m	29 Jan 2002 07:24:48 -0000
@@ -3064,6 +3064,18 @@
 		mercury_format_remaining_terms(Xs, VarSet, AppendVarnums),
 		add_string("}")
 	;
+		{ Args = [BinaryPrefixArg1, BinaryPrefixArg2] },
+		{ Functor = term__atom(FunctorName) },
+		{ mercury_binary_prefix_op(FunctorName) }
+	->
+		add_string("("),
+		add_string(FunctorName),
+		add_string(" "),
+		mercury_format_term(BinaryPrefixArg1, VarSet, AppendVarnums),
+		add_string(" "),
+		mercury_format_term(BinaryPrefixArg2, VarSet, AppendVarnums),
+		add_string(")")
+	;
 		{ Args = [PrefixArg] },
 		{ Functor = term__atom(FunctorName) },
 		{ mercury_unary_prefix_op(FunctorName) }

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list