diff: prolog syntax fix in bt_array.m

Andrew Bromage bromage at cs.mu.oz.au
Mon Jul 28 15:28:56 AEST 1997


G'day all.

This needs no review, and it's already committed.

Cheers,
Andrew Bromage



Estimated hours taken: 0.1

library/bt_array.m:
	Changed some functional versions of -/2 into is/2 so that
	the module works in Prolog.



Index: bt_array.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/bt_array.m,v
retrieving revision 1.2
diff -u -r1.2 bt_array.m
--- bt_array.m	1997/07/27 15:06:38	1.2
+++ bt_array.m	1997/07/28 05:00:03
@@ -528,7 +528,8 @@
 	( I < Size ->
 		ra_list_bintree_lookup(Size, T, I, X)
 	;
-		ra_list_lookup_2(I - Size, Rest, X)
+		NewI is I - Size,
+		ra_list_lookup_2(NewI, Rest, X)
 	).
 
 :- pred ra_list_bintree_lookup(int, ra_list_bintree(T), int, T).
@@ -565,7 +566,8 @@
 		ra_list_bintree_update(Size, T0, I, X, T),
 		List = cons(Size, T, Rest)
 	;
-		ra_list_update_2(Rest, I - Size, X, List0),
+		NewI is I - Size,
+		ra_list_update_2(Rest, NewI, X, List0),
 		List = cons(Size, T0, List0)
 	).
 




More information about the developers mailing list