[m-rev.] for review: hlds_data and prog_data field names

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu May 8 13:12:33 AEST 2003


For review by Fergus.

Zoltan.

compiler/hlds_data,m:
	Add field names to the main types defined here, and use them to
	implement get and set predicates where they exist.

	Indent some type definitions by one less tab, to make it easier
	to write comments on the fields.

	Comment out the condition fields in these types, since we don't use
	them, and they can be added back later trivially.

compiler/prog_data,m:
	Add field names to the various kinds of items.

	Leave the condition fields in items as they are, since if we deleted
	them, adding them back later would be a bit more than trivial.

compiler/intermod.m:
compiler/make_hlds.m:
compiler/mode_util.m:
compiler/recompilation.usage.m:
	Ignore condition fields where relevant.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/hlds_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_data.m,v
retrieving revision 1.75
diff -u -b -r1.75 hlds_data.m
--- compiler/hlds_data.m	15 Mar 2003 03:08:49 -0000	1.75
+++ compiler/hlds_data.m	7 May 2003 04:38:58 -0000
@@ -29,7 +29,8 @@
 
 :- type cons_table	==	map(cons_id, list(hlds_cons_defn)).
 
-:- type cons_id		--->	cons(sym_name, arity)	% name, arity
+:- type cons_id
+	--->	cons(sym_name, arity)	% name, arity
 				% Tuples have cons_id
 				% `cons(unqualified("{}"), Arity)'.
 
@@ -70,20 +71,25 @@
 	% A cons_defn is the definition of a constructor (i.e. a constant
 	% or a functor) for a particular type.
 
-:- type hlds_cons_defn
-	--->	hlds_cons_defn(
+:- type hlds_cons_defn --->
+	hlds_cons_defn(
 			% maybe add tvarset here?
 			% you can get the tvarset from the hlds__type_defn.
-			existq_tvars,		% existential type vars
-			list(class_constraint), % existential class constraints
-			list(constructor_arg),	% The field names and types of
+		cons_exist_tvars	:: existq_tvars,
+					% existential type vars
+		cons_constraints	:: list(class_constraint),
+					% existential class constraints
+		cons_args		:: list(constructor_arg),
+					% The field names and types of
 						% the arguments of this functor
 						% (if any)
-			type_ctor,		% The result type, i.e. the
+		cons_type_ctor		:: type_ctor,
+					% The result type, i.e. the
 						% type to which this
 						% cons_defn belongs.
-			prog_context		% The location of this
-						% ctor definition in the
+		cons_context		:: prog_context
+					% The location of this
+					% constructor definition in the
 						% original source code
 		).
 
@@ -91,13 +97,17 @@
 
 :- type ctor_field_table == map(ctor_field_name, list(hlds_ctor_field_defn)).
 
-:- type hlds_ctor_field_defn
-	---> hlds_ctor_field_defn(
-		prog_context,	% context of the field definition
-		import_status,
-		type_ctor,	% type containing the field
-		cons_id,	% constructor containing the field
-		int		% argument number (counting from 1)
+:- type hlds_ctor_field_defn --->
+	hlds_ctor_field_defn(
+		field_context	:: prog_context,
+				% context of the field definition
+		field_status	:: import_status,
+		field_type_ctor	:: type_ctor,
+				% type containing the field
+		field_cons_id	:: cons_id,
+				% constructor containing the field
+		field_arg_num	:: int
+				% argument number (counting from 1)
 	).
 
 	%
@@ -538,8 +548,8 @@
 get_secondary_tag(shared_with_reserved_addresses(_ReservedAddresses, TagValue))
 		= get_secondary_tag(TagValue).
 
-:- type hlds_type_defn
-	--->	hlds_type_defn(
+:- type hlds_type_defn --->
+	hlds_type_defn(
 			type_defn_tvarset :: tvarset,	
 						% Names of type vars (empty
 						% except for polymorphic types)
@@ -558,7 +568,7 @@
 						% its constructors need
 						% to be qualified.
 
-%			condition,		% UNUSED
+%		type_defn_condition	:: consdition,		% UNUSED
 %				% Reserved for holding a user-defined invariant
 %				% for the type, as in the NU-Prolog's type
 %				% checker, which allows `where' conditions on
@@ -628,20 +638,26 @@
 	% about inst definitions such as
 	%	:- inst list_skel(I) = bound([] ; [I | list_skel(I)].
 
-:- type hlds_inst_defn
-	--->	hlds_inst_defn(
-			inst_varset,		% The names of the inst
+:- type hlds_inst_defn --->
+	hlds_inst_defn(
+		inst_varset		:: inst_varset,
+					% The names of the inst
 						% parameters (if any).
-			list(inst_var),		% The inst parameters (if any).
+		inst_params		:: list(inst_var),
+					% The inst parameters (if any).
 						% ([I] in the above example.)
-			hlds_inst_body,	% The definition of this inst.
-			condition,		% Unused (reserved for
-						% holding a user-defined 
-						% invariant).
-			prog_context,		% The location in the source
+		inst_body		:: hlds_inst_body,
+					% The definition of this inst.
+%		inst_condition		:: condition,
+%					% Unused (reserved for
+%					% holding a user-defined
+%					% invariant).
+		inst_context		:: prog_context,
+					% The location in the source
 						% code of this inst definition.
 
-			import_status		% So intermod.m can tell 
+		inst_status		:: import_status
+					% So intermod.m can tell
 						% whether to output this inst.
 		).
 
@@ -721,13 +737,13 @@
 
 :- type inst_table
 	--->	inst_table(
-			user_inst_table,
-			unify_inst_table,
-			merge_inst_table,
-			ground_inst_table,
-			any_inst_table,
-			shared_inst_table,
-			mostly_uniq_inst_table
+			inst_table_user		:: user_inst_table,
+			inst_table_unify	:: unify_inst_table,
+			inst_table_merge	:: merge_inst_table,
+			inst_table_ground	:: ground_inst_table,
+			inst_table_any		:: any_inst_table,
+			inst_table_shared	:: shared_inst_table,
+			inst_table_mostly_uniq	:: mostly_uniq_inst_table
 		).
 
 :- type user_inst_defns.
@@ -750,46 +766,29 @@
 	map__init(AnyInsts),
 	map__init(NondetLiveInsts).
 
-inst_table_get_user_insts(inst_table(UserInsts, _, _, _, _, _, _), UserInsts).
-
-inst_table_get_unify_insts(inst_table(_, UnifyInsts, _, _, _, _, _),
-			UnifyInsts).
-
-inst_table_get_merge_insts(inst_table(_, _, MergeInsts, _, _, _, _),
-			MergeInsts).
-
-inst_table_get_ground_insts(inst_table(_, _, _, GroundInsts, _, _, _),
-			GroundInsts).
-
-inst_table_get_any_insts(inst_table(_, _, _, _, AnyInsts, _, _), AnyInsts).
-
-inst_table_get_shared_insts(inst_table(_, _, _, _, _, SharedInsts, _),
-			SharedInsts).
-
-inst_table_get_mostly_uniq_insts(inst_table(_, _, _, _, _, _, NondetLiveInsts),
-			NondetLiveInsts).
-
-inst_table_set_user_insts(inst_table(_, B, C, D, E, F, G), UserInsts,
-			inst_table(UserInsts, B, C, D, E, F, G)).
-
-inst_table_set_unify_insts(inst_table(A, _, C, D, E, F, G), UnifyInsts,
-			inst_table(A, UnifyInsts, C, D, E, F, G)).
-
-inst_table_set_merge_insts(inst_table(A, B, _, D, E, F, G), MergeInsts,
-			inst_table(A, B, MergeInsts, D, E, F, G)).
-
-inst_table_set_ground_insts(inst_table(A, B, C, _, E, F, G), GroundInsts,
-			inst_table(A, B, C, GroundInsts, E, F, G)).
-
-inst_table_set_any_insts(inst_table(A, B, C, D, _, F, G), AnyInsts,
-			inst_table(A, B, C, D, AnyInsts, F, G)).
-
-inst_table_set_shared_insts(inst_table(A, B, C, D, E, _, G), SharedInsts,
-			inst_table(A, B, C, D, E, SharedInsts, G)).
-
-inst_table_set_mostly_uniq_insts(inst_table(A, B, C, D, E, F, _),
-			NondetLiveInsts,
-			inst_table(A, B, C, D, E, F, NondetLiveInsts)).
+inst_table_get_user_insts(InstTable, InstTable ^ inst_table_user).
+inst_table_get_unify_insts(InstTable, InstTable ^ inst_table_unify).
+inst_table_get_merge_insts(InstTable, InstTable ^ inst_table_merge).
+inst_table_get_ground_insts(InstTable, InstTable ^ inst_table_ground).
+inst_table_get_any_insts(InstTable, InstTable ^ inst_table_any).
+inst_table_get_shared_insts(InstTable, InstTable ^ inst_table_shared).
+inst_table_get_mostly_uniq_insts(InstTable,
+	InstTable ^ inst_table_mostly_uniq).
+
+inst_table_set_user_insts(InstTable, UserInsts,
+	InstTable ^ inst_table_user := UserInsts).
+inst_table_set_unify_insts(InstTable, UnifyInsts,
+	InstTable ^ inst_table_unify := UnifyInsts).
+inst_table_set_merge_insts(InstTable, MergeInsts,
+	InstTable ^ inst_table_merge := MergeInsts).
+inst_table_set_ground_insts(InstTable, GroundInsts,
+	InstTable ^ inst_table_ground := GroundInsts).
+inst_table_set_any_insts(InstTable, AnyInsts,
+	InstTable ^ inst_table_any := AnyInsts).
+inst_table_set_shared_insts(InstTable, SharedInsts,
+	InstTable ^ inst_table_shared := SharedInsts).
+inst_table_set_mostly_uniq_insts(InstTable, MostlyUniqInsts,
+	InstTable ^ inst_table_mostly_uniq := MostlyUniqInsts).
 
 user_inst_table_get_inst_defns(user_inst_table(InstDefns, _), InstDefns).
 
@@ -825,24 +824,29 @@
 	% or
 	%	:- mode in_list_skel :: in(list_skel).
 
-:- type hlds_mode_defn
-	--->	hlds_mode_defn(
-			inst_varset,		% The names of the inst
+:- type hlds_mode_defn --->
+	hlds_mode_defn(
+		mode_varset		:: inst_varset,
+					% The names of the inst
 						% parameters (if any).
-			list(inst_var),		% The list of the inst
+		mode_params		:: list(inst_var),
+					% The list of the inst
 						% parameters (if any).
 						% (e.g. [I] for the second
 						% example above.)
-			hlds_mode_body,	% The definition of this mode.
-			condition,		% Unused (reserved for
-						% holding a user-defined
-						% invariant).
-			prog_context,		% The location of this mode
+		mody_body		:: hlds_mode_body,
+					% The definition of this mode.
+%		mode_condition		:: condition,
+%					% Unused (reserved for
+%					% holding a user-defined
+%					% invariant).
+		mode_context		:: prog_context,
+					% The location of this mode
 						% definition in the original
 						% source code.
-			import_status		% So intermod.m can tell 
+		mode_status		:: import_status
+					% So intermod.m can tell
 						% whether to output this mode.
-					
 		).
 
 	% The only sort of mode definitions allowed are equivalence modes.
@@ -948,20 +952,26 @@
 :- type class_id 	--->	class_id(sym_name, arity).
 
 	% Information about a single `typeclass' declaration
-:- type hlds_class_defn 
-	--->	hlds_class_defn(
-			import_status,
-			list(class_constraint), % SuperClasses
-			list(tvar),		% ClassVars 
-			class_interface,	% The interface from the
+:- type hlds_class_defn --->
+	hlds_class_defn(
+		class_status		:: import_status,
+		class_supers		:: list(class_constraint),
+					% SuperClasses
+		class_vars		:: list(tvar),
+					% ClassVars
+		class_interface		:: class_interface,
+					% The interface from the
 						% original declaration,
 						% used by intermod.m to
 						% write out the interface
 						% for a local typeclass to
 						% the `.opt' file.
-			hlds_class_interface, 	% Methods
-			tvarset,		% VarNames
-			prog_context		% Location of declaration
+		class_hlds_interface	:: hlds_class_interface,
+					% Methods
+		class_tvarset		:: tvarset,
+					% VarNames
+		class_context		:: prog_context
+					% Location of declaration
 		).
 
 :- type hlds_class_interface	==	list(hlds_class_proc).	
@@ -976,21 +986,29 @@
 :- type instance_table == map(class_id, list(hlds_instance_defn)).
 
 	% Information about a single `instance' declaration
-:- type hlds_instance_defn 
-	--->	hlds_instance_defn(
-			module_name,		% module of the instance decl
-			import_status,		% import status of the instance
+:- type hlds_instance_defn --->
+	hlds_instance_defn(
+		instance_module		:: module_name,
+					% module of the instance decl
+		instance_status		:: import_status,
+					% import status of the instance
 						% declaration
-			prog_context,		% context of declaration
-			list(class_constraint), % Constraints
-			list(type), 		% ClassTypes 
-			instance_body, 		% Methods
-			maybe(hlds_class_interface),
+		instance_context	:: prog_context,
+					% context of declaration
+		instance_constraints	:: list(class_constraint),
+					% Constraints
+		instance_types		:: list(type),
+					% ClassTypes
+		instance_body		:: instance_body,
+					% Methods
+		instance_hlds_interface	:: maybe(hlds_class_interface),
 						% After check_typeclass, we 
 						% will know the pred_ids and
 						% proc_ids of all the methods
-			tvarset,		% VarNames
-			map(class_constraint, constraint_proof)
+		instance_tvarset	:: tvarset,
+					% VarNames
+		instance_proofs		:: map(class_constraint,
+						constraint_proof)
 						% "Proofs" of how to build the
 						% typeclass_infos for the
 						% superclasses of this class,
@@ -1021,13 +1039,17 @@
 
 %-----------------------------------------------------------------------------%
 
-:- type subclass_details 
-	--->	subclass_details(
-			list(type),		% arguments of the
+:- type subclass_details --->
+	subclass_details(
+		subclass_types		:: list(type),
+					% arguments of the
 						% superclass constraint
-			class_id,		% name of the subclass
-			list(tvar),		% variables of the subclass
-			tvarset			% the names of these vars
+		subclass_id		:: class_id,
+					% name of the subclass
+		subclass_tvars		:: list(tvar),
+					% variables of the subclass
+		subclass_tvarset	:: tvarset
+					% the names of these vars
 		).
 
 :- import_module multi_map.
Index: compiler/intermod.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/intermod.m,v
retrieving revision 1.138
diff -u -b -r1.138 intermod.m
--- compiler/intermod.m	28 Apr 2003 11:56:48 -0000	1.138
+++ compiler/intermod.m	7 May 2003 04:53:41 -0000
@@ -1360,7 +1360,7 @@
 intermod__write_mode(ModuleName, ModeId, ModeDefn) -->
 	{ ModeId = SymName - _Arity },
 	{ ModeDefn = hlds_mode_defn(Varset, Args, eqv_mode(Mode),
-			_, Context, ImportStatus) },
+		Context, ImportStatus) },
 	(
 		{ SymName = qualified(ModuleName, _) },
 		{ import_status_to_write(ImportStatus) }
@@ -1387,7 +1387,7 @@
 
 intermod__write_inst(ModuleName, InstId, InstDefn) -->
 	{ InstId = SymName - _Arity },
-	{ InstDefn = hlds_inst_defn(Varset, Args, Body, _,
+	{ InstDefn = hlds_inst_defn(Varset, Args, Body,
 			Context, ImportStatus) },
 	(
 		{ SymName = qualified(ModuleName, _) },
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.438
diff -u -b -r1.438 make_hlds.m
--- compiler/make_hlds.m	2 May 2003 02:40:01 -0000	1.438
+++ compiler/make_hlds.m	7 May 2003 04:55:02 -0000
@@ -2033,10 +2033,10 @@
 insts_add(_, _, _, _, abstract_inst, _, _, _, _) -->
 	{ error("sorry, abstract insts not implemented") }.
 insts_add(Insts0, VarSet, Name, Args, eqv_inst(Body),
-			Cond, Context, Status, Insts) -->
+			_Cond, Context, Status, Insts) -->
 	{ list__length(Args, Arity) },
 	(
-		{ I = hlds_inst_defn(VarSet, Args, eqv_inst(Body), Cond,
+		{ I = hlds_inst_defn(VarSet, Args, eqv_inst(Body),
 					Context, Status) },
 		{ user_inst_table_insert(Insts0, Name - Arity, I, Insts1) }
 	->
@@ -2050,8 +2050,7 @@
 		%	 module_info_incr_errors
 		{ user_inst_table_get_inst_defns(Insts, InstDefns) },
 		{ map__lookup(InstDefns, Name - Arity, OrigI) },
-		{ OrigI = hlds_inst_defn(_, _, _, _,
-					OrigContext, _) },
+		{ OrigI = hlds_inst_defn(_, _, _, OrigContext, _) },
 		multiple_def_error(Status, Name, Arity, "inst",
 			Context, OrigContext, _)
 	).
@@ -2073,7 +2072,7 @@
 		{ user_inst_table_get_inst_defns(UserInstTable, InstDefns) },
 		(
 			{ map__search(InstDefns, InstId0, InstDefn) },
-			{ InstDefn = hlds_inst_defn(_, Params, Body, _, _, _) },
+			{ InstDefn = hlds_inst_defn(_, Params, Body, _, _) },
 			{ Body = eqv_inst(EqvInst0) },
 			{ inst_substitute_arg_list(EqvInst0, Params, Args0,
 				EqvInst) },
@@ -2111,11 +2110,11 @@
 :- mode modes_add(in, in, in, in, in, in, in, in, out, out, di, uo) is det.
 
 modes_add(Modes0, VarSet, Name, Args, eqv_mode(Body),
-			Cond, Context, Status, Modes, InvalidMode) -->
+			_Cond, Context, Status, Modes, InvalidMode) -->
 	{ list__length(Args, Arity) },
 	{ ModeId = Name - Arity },
 	(
-		{ I = hlds_mode_defn(VarSet, Args, eqv_mode(Body), Cond,
+		{ I = hlds_mode_defn(VarSet, Args, eqv_mode(Body),
 			Context, Status) },
 		{ mode_table_insert(Modes0, ModeId, I, Modes1) }
 	->
@@ -2124,7 +2123,7 @@
 		{ Modes = Modes0 },
 		{ mode_table_get_mode_defns(Modes, ModeDefns) },
 		{ map__lookup(ModeDefns, ModeId, OrigI) },
-		{ OrigI = hlds_mode_defn(_, _, _, _, OrigContext, _) },
+		{ OrigI = hlds_mode_defn(_, _, _, OrigContext, _) },
 		% XXX we should record each error using
 		% 	module_info_incr_errors
 		multiple_def_error(Status, Name, Arity, "mode",
@@ -2150,7 +2149,7 @@
 		{ mode_table_get_mode_defns(ModeTable, ModeDefns) },
 		(
 			{ map__search(ModeDefns, ModeId0, ModeDefn) },
-			{ ModeDefn = hlds_mode_defn(_, _, Body, _, _, _) },
+			{ ModeDefn = hlds_mode_defn(_, _, Body, _, _) },
 			{ Body = eqv_mode(EqvMode) },
 			{ EqvMode = user_defined_mode(Name, Args) }
 		->
Index: compiler/mode_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_util.m,v
retrieving revision 1.150
diff -u -b -r1.150 mode_util.m
--- compiler/mode_util.m	18 Mar 2003 02:43:39 -0000	1.150
+++ compiler/mode_util.m	7 May 2003 04:56:18 -0000
@@ -582,7 +582,7 @@
 		list__length(Args, Arity),
 		( map__search(InstDefns, Name - Arity, InstDefn) ->
 			InstDefn = hlds_inst_defn(_VarSet, Params, Inst0,
-					_Cond, _C, _),
+				_C, _),
 			inst_lookup_subst_args(Inst0, Params, Name, Args, Inst)
 		;
 			Inst = abstract_inst(Name, Args)
@@ -996,7 +996,7 @@
 	module_info_modes(ModuleInfo, Modes),
 	mode_table_get_mode_defns(Modes, ModeDefns),
 	map__search(ModeDefns, Name - Arity, HLDS_Mode),
-	HLDS_Mode = hlds_mode_defn(_VarSet, Params, ModeDefn, _Cond,
+	HLDS_Mode = hlds_mode_defn(_VarSet, Params, ModeDefn,
 						_Context, _Status),
 	ModeDefn = eqv_mode(Mode0),
 	mode_substitute_arg_list(Mode0, Params, Args, Mode),
Index: compiler/prog_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.92
diff -u -b -r1.92 prog_data.m
--- compiler/prog_data.m	15 Mar 2003 03:09:06 -0000	1.92
+++ compiler/prog_data.m	7 May 2003 05:17:04 -0000
@@ -48,60 +48,106 @@
 :- type item_and_context ==	pair(item, prog_context).
 
 :- type item		
-	--->	clause(prog_varset, pred_or_func, sym_name,
-			list(prog_term), goal)
-		%	VarNames, PredOrFunc, PredName, HeadArgs, ClauseBody
-
-	; 	type_defn(tvarset, sym_name, list(type_param),
-			type_defn, condition)
-		%	VarNames, TypeName, Args, TypeDefn, Condition
-
-	; 	inst_defn(inst_varset, sym_name, list(inst_var),
-			inst_defn, condition)
-	; 	mode_defn(inst_varset, sym_name, list(inst_var),
-			mode_defn, condition)
-	; 	module_defn(prog_varset, module_defn)
-
-	; 	pred_or_func(tvarset, inst_varset, existq_tvars, pred_or_func,
-			sym_name, list(type_and_mode), maybe(type),
-			maybe(inst), maybe(determinism),
-			condition, purity, class_constraints)
-		%       TypeVarNames, InstVarNames,
-		%	ExistentiallyQuantifiedTypeVars, PredOrFunc, PredName,
-		%	ArgTypesAndModes, WithType, WithInst, Determinism,
-		%	Cond, Purity, TypeClassContext
-		%
+	--->	clause(
+			cl_varset		:: prog_varset,
+			cl_pred_or_func		:: pred_or_func,
+			cl_predname		:: sym_name,
+			cl_head_args		:: list(prog_term),
+			cl_body			:: goal
+		)
+
+	; 	type_defn(
+			td_tvarset		:: tvarset,
+			td_ctor_name		:: sym_name,
+			td_ctor_args		:: list(type_param),
+			td_ctor_defn		:: type_defn,
+			td_cond			:: condition
+		)
+
+	; 	inst_defn(
+			id_varset		:: inst_varset,
+			id_inst_name		:: sym_name,
+			id_inst_args		:: list(inst_var),
+			id_inst_defn		:: inst_defn,
+			id_cond			:: condition
+		)
+
+	; 	mode_defn(
+			md_varset		:: inst_varset,
+			md_mode_name		:: sym_name,
+			md_mode_args		:: list(inst_var),
+			md_mode_defn		:: mode_defn,
+			md_cond			:: condition
+		)
+
+	; 	module_defn(
+			module_defn_varset	:: prog_varset,
+			module_defn_module_defn	:: module_defn
+		)
+
+	; 	pred_or_func(
+			pf_tvarset		:: tvarset,
+			pf_instvarset		:: inst_varset,
+			pf_existqvars		:: existq_tvars,
+			pf_which		:: pred_or_func,
+			pf_name			:: sym_name,
+			pf_arg_decls		:: list(type_and_mode),
+			pf_maybe_with_type	:: maybe(type),
+			pf_maybe_with_inst	:: maybe(inst),
+			pf_maybe_detism		:: maybe(determinism),
+			pf_cond			:: condition,
+			pf_purity		:: purity,
+			pf_class_context	:: class_constraints
+		)
 		%	The WithType and WithInst fields hold the `with_type`
 		% 	and `with_inst` annotations, which are syntactic
 		%	sugar that is expanded by equiv_type.m
 		%	equiv_type.m will set these fields to `no'.
 
-	; 	pred_or_func_mode(inst_varset, maybe(pred_or_func), sym_name,
-			list(mode), maybe(inst), maybe(determinism), condition)
-		%       VarNames, PredOrFunc, PredName, ArgModes, WithInst,
-		%	Determinism, Cond
-		%
+	; 	pred_or_func_mode(
+			pfm_instvarset		:: inst_varset,
+			pfm_which		:: maybe(pred_or_func),
+			pfm_name		:: sym_name,
+			pfm_arg_modes		:: list(mode),
+			pfm_maybe_with_inst	:: maybe(inst),
+			pfm_maybe_detism	:: maybe(determinism),
+			pfm_cond		:: condition
+		)
 		%	The WithInst field holds the `with_inst` annotation,
 		%	which is syntactic sugar that is expanded by
 		%	equiv_type.m. equiv_type.m will set the field to `no'.
 
-	;	pragma(pragma_type)
-
-	;	promise(promise_type, goal, prog_varset, prog_vars)
-		% 	PromiseType, PromiseClause, ProgVariables, 
-		% 	UniversallyQuantifiedVars
-
-	;	typeclass(list(class_constraint), class_name, list(tvar),
-			class_interface, tvarset)
-		%	Constraints, ClassName, ClassParams, 
-		%	ClassMethods, VarNames
-
-	;	instance(list(class_constraint), class_name, list(type),
-			instance_body, tvarset, module_name)
-		%	DerivingClass, ClassName, Types, 
-		%	MethodInstances, VarNames, ModuleContainingInstance
-
-	;	nothing(maybe(item_warning)).
+	;	pragma(
+			pragma_type		:: pragma_type
+		)
+
+	;	promise(
+			prom_type		:: promise_type,
+			prom_clause		:: goal,
+			prom_varset		:: prog_varset,
+			prom_univ_quant_vars	:: prog_vars
+		)
+
+	;	typeclass(
+			tc_constraints		:: list(class_constraint),
+			tc_class_name		:: class_name,
+			tc_class_params		:: list(tvar),
+			tc_class_methods	:: class_interface,
+			tc_varset		:: tvarset
+		)
+
+	;	instance(
+			ci_deriving_class	:: list(class_constraint),
+			ci_class_name		:: class_name,
+			ci_types		:: list(type),
+			ci_method_instances	:: instance_body,
+			ci_varset		:: tvarset,
+			ci_module_containing_instance :: module_name
+		)
+
+	;	nothing(
+			nothing_maybe_warning	:: maybe(item_warning)
+		).
 		% used for items that should be ignored (e.g.
 		% NU-Prolog `when' declarations, which are silently
 		% ignored for backwards compatibility).
Index: compiler/recompilation.usage.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.usage.m,v
retrieving revision 1.7
diff -u -b -r1.7 recompilation.usage.m
--- compiler/recompilation.usage.m	15 Mar 2003 03:09:08 -0000	1.7
+++ compiler/recompilation.usage.m	7 May 2003 04:56:29 -0000
@@ -1065,14 +1065,14 @@
 	recompilation_usage_info::in, recompilation_usage_info::out) is det.
 
 recompilation__usage__find_items_used_by_mode_defn(
-		hlds_mode_defn(_, _, eqv_mode(Mode), _, _, _)) -->
+		hlds_mode_defn(_, _, eqv_mode(Mode), _, _)) -->
 	recompilation__usage__find_items_used_by_mode(Mode).
 
 :- pred recompilation__usage__find_items_used_by_inst_defn(hlds_inst_defn::in,
 	recompilation_usage_info::in, recompilation_usage_info::out) is det.
 
 recompilation__usage__find_items_used_by_inst_defn(
-		hlds_inst_defn(_, _, InstBody, _, _, _)) -->
+		hlds_inst_defn(_, _, InstBody, _, _)) -->
 	(
 		{ InstBody = eqv_inst(Inst) },
 		recompilation__usage__find_items_used_by_inst(Inst)
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list