[m-dev.] trivial diff: add nondet modes for HO list preds

David Glen JEFFERY dgj at cs.mu.OZ.AU
Wed Apr 28 14:21:29 AEST 1999


Hi,

I might not commit this one straight away... Seeing that this is a change to
the interface of list.m, I'll wait until someone else commits something else
that will require a complete recompile too.

----------------------------------------------------------------------

Estimated hours taken: 0.1

library/list.m:
	Add nondet modes for a bunch of higher order list preds.

----------------------------------------------------------------------

Index: list.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/list.m,v
retrieving revision 1.86
diff -u -t -r1.86 list.m
--- list.m	1999/03/15 08:48:07	1.86
+++ list.m	1999/04/27 15:34:45
@@ -364,6 +364,7 @@
 :- mode list__foldl(pred(in, di, uo) is det, in, di, uo) is det.
 :- mode list__foldl(pred(in, in, out) is det, in, in, out) is det.
 :- mode list__foldl(pred(in, in, out) is semidet, in, in, out) is semidet.
+:- mode list__foldl(pred(in, in, out) is nondet, in, in, out) is nondet.
 
         % list__foldr(Pred, List, Start, End) calls Pred with each
         % element of List (working right-to-left) and an accumulator
@@ -372,6 +373,7 @@
 :- pred list__foldr(pred(X, Y, Y), list(X), Y, Y).
 :- mode list__foldr(pred(in, in, out) is det, in, in, out) is det.
 :- mode list__foldr(pred(in, in, out) is semidet, in, in, out) is semidet.
+:- mode list__foldr(pred(in, in, out) is nondet, in, in, out) is nondet.
 
         % list__foldl2(Pred, List, Start, End, Start2, End2) 
         % calls Pred with each element of List (working left-to-right),
@@ -384,6 +386,8 @@
                 in, in, out, in, out) is det.
 :- mode list__foldl2(pred(in, in, out, in, out) is semidet,
                 in, in, out, in, out) is semidet.
+:- mode list__foldl2(pred(in, in, out, in, out) is nondet,
+                in, in, out, in, out) is nondet.
 :- mode list__foldl2(pred(in, in, out, mdi, muo) is det,
                 in, in, out, mdi, muo) is det.
 :- mode list__foldl2(pred(in, in, out, di, uo) is det,
@@ -403,6 +407,8 @@
                                                                 is det.
 :- mode list__map_foldl(pred(in, out, in, out) is semidet, in, out, in, out)
                                                                 is semidet.
+:- mode list__map_foldl(pred(in, out, in, out) is nondet, in, out, in, out)
+                                                                is nondet.
 
         % list__filter(Pred, List, TrueList) takes a closure with one
         % input argument and for each member of List `X', calls the closure.
----------------------------------------------------------------------


dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) |  Marge: Homer, is this how you pictured
PhD student,                    |         married life?
Dept. of Comp. Sci. & Soft. Eng.|  Homer: Yup, pretty much... except we
The University of Melbourne     |         drove around in a van solving
Australia                       |         mysteries.
--------------------------------------------------------------------------
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