[m-rev.] diff: add more modes for list.map_foldl2/7

Julien Fischer juliensf at csse.unimelb.edu.au
Sun Aug 30 04:55:38 AEST 2009


Add some modes for list.map_foldl2/7 that have mostly-unique accumulators.

library/list.m:
 	Add the new modes.

 	Re-order the modes to conform to the usual ordering in this
 	module.

Julien.

Index: library/list.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/list.m,v
retrieving revision 1.182
diff -u -r1.182 list.m
--- library/list.m	19 Aug 2009 07:45:12 -0000	1.182
+++ library/list.m	29 Aug 2009 18:47:36 -0000
@@ -1082,20 +1082,26 @@
      % Same as list.map_foldl, but with two accumulators.
      %
  :- pred list.map_foldl2(pred(L, M, A, A, B, B), list(L), list(M), A, A, B, B).
-:- mode list.map_foldl2(pred(in, out, in, out, di, uo) is det,
-    in, out, in, out, di, uo) is det.
  :- mode list.map_foldl2(pred(in, out, in, out, in, out) is det,
      in, out, in, out, in, out) is det.
-:- mode list.map_foldl2(pred(in, out, in, out, di, uo) is cc_multi,
-    in, out, in, out, di, uo) is cc_multi.
-:- mode list.map_foldl2(pred(in, out, in, out, in, out) is cc_multi,
-    in, out, in, out, in, out) is cc_multi.
+:- mode list.map_foldl2(pred(in, out, in, out, mdi, muo) is det,
+    in, out, in, out, mdi, muo) is det.
+:- mode list.map_foldl2(pred(in, out, in, out, di, uo) is det,
+    in, out, in, out, di, uo) is det.
  :- mode list.map_foldl2(pred(in, out, in, out, in, out) is semidet,
      in, out, in, out, in, out) is semidet.
+:- mode list.map_foldl2(pred(in, out, in, out, mdi, muo) is semidet,
+    in, out, in, out, mdi, muo) is semidet.
  :- mode list.map_foldl2(pred(in, out, in, out, di, uo) is semidet,
      in, out, in, out, di, uo) is semidet.
  :- mode list.map_foldl2(pred(in, in, in, out, di, uo) is semidet,
      in, in, in, out, di, uo) is semidet.
+:- mode list.map_foldl2(pred(in, out, in, out, in, out) is cc_multi,
+    in, out, in, out, in, out) is cc_multi.
+:- mode list.map_foldl2(pred(in, out, in, out, mdi, muo) is cc_multi,
+    in, out, in, out, mdi, muo) is cc_multi.
+:- mode list.map_foldl2(pred(in, out, in, out, di, uo) is cc_multi,
+    in, out, in, out, di, uo) is cc_multi.
  :- mode list.map_foldl2(pred(in, out, in, out, in, out) is nondet,
      in, out, in, out, in, out) is nondet.


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list