diff: hlds_out and hlds_pred

Tyson Richard DOWD trd at cs.mu.oz.au
Thu May 29 18:02:54 AEST 1997



Hi.

Here's a diff.

Comments anyone?

(I'll probably commit them separately).

===================================================================

Estimated hours taken: 0.5

Fix a bug where hlds_out was using the tvarset of the 
Question the relevance of a comment.

compiler/hlds_out.m:
	When writing preds, use the tvarset of the entire predicate
	instead of the arguments. Not doing this meant some typevars
	were incorrectly named, and was the opposite of what was done
	when writing procs.

compiler/hlds_pred.m:
	Add a comment questioning the validity of a comment referring to
	`define.m'. This module doesn't exist, and doesn't seem to have
	ever existed, so it's probably not a good idea to advise people
	to update it if they change pred_info.


Index: compiler/hlds_out.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/hlds_out.m,v
retrieving revision 1.163
diff -u -r1.163 hlds_out.m
--- hlds_out.m	1997/05/23 17:41:25	1.163
+++ hlds_out.m	1997/05/29 07:28:00
@@ -427,7 +427,8 @@
 
 hlds_out__write_pred(Indent, ModuleInfo, PredId, PredInfo) -->
 	{ pred_info_module(PredInfo, Module) },
-	{ pred_info_arg_types(PredInfo, TVarSet, ArgTypes) },
+	{ pred_info_arg_types(PredInfo, _, ArgTypes) },
+	{ pred_info_typevarset(PredInfo, TVarSet) },
 	{ pred_info_clauses_info(PredInfo, ClausesInfo) },
 	{ pred_info_procedures(PredInfo, ProcTable) },
 	{ pred_info_context(PredInfo, Context) },
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/hlds_pred.m,v
retrieving revision 1.31
diff -u -r1.31 hlds_pred.m
--- hlds_pred.m	1997/05/12 08:19:42	1.31
+++ hlds_pred.m	1997/05/29 07:33:06
@@ -354,8 +354,11 @@
 invalid_proc_id(-1).
 
 	% The information specific to a predicate, as opposed to a procedure.
+	%
 	% Any changes in this type definition will almost certainly require
 	% corresponding changes in define.m.
+	% XXX: This comment is either ancient, or prophesy. It seems
+	% define.m doesn't exist yet.
 
 :- type pred_info
 	--->	predicate(
-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't eveyone's cup of
     trd at cs.mu.oz.au        #  fur.
http://www.cs.mu.oz.au/~trd #



More information about the developers mailing list