trivial diff: add some comments

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Aug 5 00:52:29 AEST 1998


Estimated hours taken: 0.1

compiler/clause_to_proc.m:
compiler/hlds_pred.m:
	Add a couple of comments about the meaning of the list(proc_id)
	in the `clause' data structure: if empty, it means that the
	clauses apply to *all* procedures.

Index: compiler/clause_to_proc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/clause_to_proc.m,v
retrieving revision 1.21
diff -u -r1.21 clause_to_proc.m
--- clause_to_proc.m	1998/03/03 17:33:40	1.21
+++ clause_to_proc.m	1998/07/29 05:48:34
@@ -167,6 +167,7 @@
 select_matching_clauses([], _, []).
 select_matching_clauses([Clause | Clauses], ProcId, MatchingClauses) :-
 	Clause = clause(ProcIds, _, _),
+	% an empty list here means that the clause applies to all procs
 	( ProcIds = [] ->
 		MatchingClauses = [Clause | MatchingClauses1]
 	; list__member(ProcId, ProcIds) ->
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.49
diff -u -r1.49 hlds_pred.m
--- hlds_pred.m	1998/07/08 20:56:22	1.49
+++ hlds_pred.m	1998/07/29 05:47:22
@@ -102,6 +102,9 @@
 :- type clause		--->	clause(
 					list(proc_id),	% modes for which
 							% this clause applies
+							% (empty list means
+							% it applies to all
+							% clauses)
 					hlds_goal,	% Body
 					term__context
 				).

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list