diff: typecheck.m bug fix

Fergus Henderson fjh at cs.mu.oz.au
Tue Sep 2 17:05:29 AEST 1997


compiler/typecheck.m:
	Fix a bug: use term__vars_list(ArgTypes) rather than
	varset__vars(ArgTypeVarSet) to get the list of argument
	type variables, because when doing type inference,
	after the first pass the ArgTypeVarSet may contain variables
	that don't occur in the argument types.

Index: typecheck.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/typecheck.m,v
retrieving revision 1.211
diff -u -u -r1.211 typecheck.m
--- typecheck.m	1997/08/22 13:56:15	1.211
+++ typecheck.m	1997/09/02 06:51:49
@@ -354,7 +354,7 @@
 	    Changed = no,
 	    IOState = IOState0
 	;
-	    pred_info_arg_types(PredInfo0, ArgTypeVarSet, ArgTypes0),
+	    pred_info_arg_types(PredInfo0, _ArgTypeVarSet, ArgTypes0),
 	    pred_info_typevarset(PredInfo0, TypeVarSet0),
 	    pred_info_clauses_info(PredInfo0, ClausesInfo0),
 	    pred_info_import_status(PredInfo0, Status),
@@ -382,7 +382,7 @@
 				PredId, ModuleInfo, IOState0, IOState1)
 		;
 			Inferring = no,
-			varset__vars(ArgTypeVarSet, HeadTypeParams),
+			term__vars_list(ArgTypes0, HeadTypeParams),
 			write_pred_progress_message("% Type-checking ",
 				PredId, ModuleInfo, IOState0, IOState1)
 		),
-- 
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