[m-rev.] for review: improvements for library/ops.m

Simon Taylor stayl at cs.mu.OZ.AU
Sun Nov 4 23:10:20 AEDT 2001


On 04-Nov-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> In the mean time, I'd rather the design stay coherent,
> which means that as long as `ops__max_priority' doesn't
> take an `ops__table' parameter, it should go with the
> `ops__priority' type, rather than in the `ops__table' section.

OK.

Index: ops.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/ops.m,v
retrieving revision 1.34
diff -u -u -r1.34 ops.m
--- ops.m	4 Nov 2001 09:06:37 -0000	1.34
+++ ops.m	4 Nov 2001 11:47:00 -0000
@@ -52,15 +52,6 @@
 :- pred ops__lookup_op(ops__table, string).
 :- mode ops__lookup_op(in, in) is semidet.
 
-	% Returns the highest priority number (the lowest is zero).
-	% Note that due to Prolog tradition, the priority numbers
-	% are backwards: higher numbers mean lower priority
-	% and lower numbers mean higher priority.  Sorry...
-:- func ops__max_priority = ops__priority.
-
-:- pred ops__max_priority(ops__priority).
-:- mode ops__max_priority(out) is det.
-
 %-----------------------------------------------------------------------------%
 
 	% Operators with a low "priority" bind more tightly than those
@@ -68,6 +59,12 @@
 	% priority 500 and `*' has priority 400, the term `2 * X + Y'
 	% would parse as `(2 * X) + Y'.
 :- type ops__priority == int.
+
+	% Returns the highest priority number (the lowest is zero).
+:- func ops__max_priority = ops__priority.
+
+:- pred ops__max_priority(ops__priority).
+:- mode ops__max_priority(out) is det.
 
 %-----------------------------------------------------------------------------%
 
--------------------------------------------------------------------------
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