[m-dev.] diff: fix some obsolete comments in type_util.m

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 8 16:31:32 AEDT 2000


Estimated hours taken: 0.5

compiler/type_util.m:
	Update some obsolete comments.
	(The typevarset syncronization problem that the
	comment was referring to has been fixed long ago.
	Also there should be no need to rename apart when
	substituting equivalence types.)

Workspace: /d-drive/home/hg/fjh/mercury
Index: compiler/type_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/type_util.m,v
retrieving revision 1.77
diff -u -d -r1.77 type_util.m
--- compiler/type_util.m	2000/02/04 06:54:55	1.77
+++ compiler/type_util.m	2000/02/08 05:19:41
@@ -933,9 +933,8 @@
 	% XXX Instead of just failing if the functors' name/arity is different,
 	% we should check here if these types have been defined
 	% to be equivalent using equivalence types.  But this
-	% is difficult because (1) it causes typevarset synchronization
-	% problems, and (2) the relevant variables TypeInfo, TVarSet0, TVarSet
-	% haven't been passed in to here.
+	% is difficult because the relevant variable
+	% TypeTable hasn't been passed in to here.
 
 /*******
 	...
@@ -958,16 +957,15 @@
 
 replace_eqv_type(Functor, Arity, Args, EqvType) :-
 
-	% XXX magically_obtain(TypeTable, TVarSet0, TVarSet)
+	% XXX magically_obtain(TypeTable)
 
 	make_type_id(Functor, Arity, TypeId),
 	map__search(TypeTable, TypeId, TypeDefn),
-	TypeDefn = hlds_type_defn(TypeVarSet, TypeParams0,
-			eqv_type(EqvType0), _Condition, Context, _Status),
-	varset__merge(TVarSet0, TypeVarSet, [EqvType0 | TypeParams0],
-			TVarSet, [EqvType1, TypeParams1]),
-	type_param_to_var_list(TypeParams1, TypeParams),
-	term__substitute_corresponding(EqvType1, TypeParams, AsX,
+	get_type_defn_body(TypeDefn, TypeBody),
+	TypeBody = eqv_type(EqvType0),
+	get_type_defn_tparams(TypeDefn, TypeParams0),
+	type_param_to_var_list(TypeParams0, TypeParams),
+	term__substitute_corresponding(EqvType0, TypeParams, AsX,
 		EqvType).
 
 ******/

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