[m-dev.] diff: bug fix for type specialization

Simon Taylor stayl at cs.mu.OZ.AU
Fri Sep 17 15:26:43 AEST 1999


Estimated hours taken: 1

compiler/make_hlds.m:
	Don't use explicit type qualification for the arguments
	of procedures introduced for type specialization because
	explicit type qualification doesn't work with type inference -
	it appears that the specified types are not kept in sync with
	the predicate's tvarset after the first pass of type-checking.
	Debugging and testing a fix for explicit type qualification is
	difficult because there isn't any syntax for it yet.

Index: make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.302
diff -u -u -r1.302 make_hlds.m
--- make_hlds.m	1999/09/12 04:26:44	1.302
+++ make_hlds.m	1999/09/17 01:07:17
@@ -924,8 +924,9 @@
 		% predicates this forces the creation of the proper interface. 
 		%
 		varset__init(ArgVarSet0),
-		varset__new_vars(ArgVarSet0, Arity, Args, ArgVarSet),
-		map__from_corresponding_lists(Args, Types, VarTypes0),
+		make_n_fresh_vars("HeadVar__", Arity,
+			ArgVarSet0, Args, ArgVarSet),
+		map__init(VarTypes0),
 		goal_info_init(GoalInfo0),
 		set__list_to_set(Args, NonLocals),
 		goal_info_set_nonlocals(GoalInfo0, NonLocals, GoalInfo1),
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list