[m-rev.] diff: add pqueue.from_assoc_list/1 to library

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Jan 18 17:58:33 AEDT 2005


I'd like to deprecate pqueue.assoc_list_to_pqueue in
favour of this new name (and also set.list_to_set,
set.sorted_list_to_set in favour set.from_list and
set.from_sorted_list etc).  Are there any objections
to doing so?

Estimated hours taken: 0.1
Branches: main

library/pqueue.m:
	Add pqueue.from_assoc_list/1 as a synonym for
	pqueue.assoc_list_to_pqueue/1.

NEWS:
	Mention the above addition.

Cheers,
Julien.

Workspace:/home/saskervoy/juliensf/ws58
Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.363
diff -u -r1.363 NEWS
--- NEWS	18 Jan 2005 04:27:16 -0000	1.363
+++ NEWS	18 Jan 2005 06:40:41 -0000
@@ -126,6 +126,9 @@

 Changes to the Mercury standard library:

+* We've added the function pqueue.from_assoc_list/1 ad a synonym
+  for pqueue.assoc_list_to_pqueue/1.
+
 * We've added functions set.from_list/1 and set.from_sorted_list/1
   as synonyms for set.list_to_set/1 and set.sorted_list_to_set/1
   respectively.  Similar additions have also been made to the
Index: library/pqueue.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/pqueue.m,v
retrieving revision 1.15
diff -u -r1.15 pqueue.m
--- library/pqueue.m	15 Mar 2004 23:49:33 -0000	1.15
+++ library/pqueue.m	18 Jan 2005 06:41:19 -0000
@@ -54,6 +54,10 @@
 	is det.
 :- func pqueue__assoc_list_to_pqueue(assoc_list(K, V)) = pqueue(K, V).

+	% A synonym for pqueue.assoc_list_to_pqueue/1.
+	%
+:- func pqueue__from_assoc_list(assoc_list(K, V)) = pqueue(K, V).
+
 %---------------------------------------------------------------------------%

 :- implementation.
@@ -144,6 +148,9 @@
 	pqueue__assoc_list_to_pqueue(L, Q0),
 	pqueue__insert(Q0, K, V, Q).

+pqueue__from_assoc_list(List) = PQueue :-
+	pqueue__assoc_list_to_pqueue(List, PQueue).
+
 %---------------------------------------------------------------------------%
 %---------------------------------------------------------------------------%
 % Ralph Becket <rwab1 at cl.cam.ac.uk> 29/04/99

--------------------------------------------------------------------------
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