[m-rev.] For review: Functional forms in library/relation.m

James Goddard goddardjames at yahoo.com
Wed Jan 14 16:13:16 AEDT 2004


Estimated hours taken: 0.5
Branches: main

Implement functional forms of some library predicates.

library/relation.m:
	Implement the following functions:
		relation__lookup_key_set_from/2
		relation__lookup_key_set_to/2

Index: relation.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/relation.m,v
retrieving revision 1.32
diff -u -d -r1.32 relation.m
--- relation.m	23 Dec 2003 22:01:05 -0000	1.32
+++ relation.m	14 Jan 2004 05:03:34 -0000
@@ -133,7 +133,7 @@
 :- mode relation__lookup_key_set_from(in, in, out) is det.
 
 :- func relation__lookup_key_set_from(relation(T),
-		relation_key) = set(relation_key).
+		relation_key) = relation_key_set.
 
 	% relation__lookup_to returns the set of elements
 	% x such that xRy, given some y.
@@ -511,6 +511,9 @@
 		init(Vs)
 	).
 
+relation__lookup_key_set_from(R, U) = Vs :-
+	relation__lookup_key_set_from(R, U, Vs).
+
 %------------------------------------------------------------------------------%
 
 relation__lookup_to(R, U, to_set(Vs)) :-
@@ -525,6 +528,9 @@
 	;
 		init(Us)
 	).
+
+relation__lookup_key_set_to(R, U) = Vs :-
+	relation__lookup_key_set_to(R, U, Vs).
 
 %------------------------------------------------------------------------------%
 
--------------------------------------------------------------------------
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