[m-rev.] diff: replace deprecated mode and inst syntax

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Jul 20 00:15:36 AEST 2004


Estimated hours taken: 0.5
Branches: main

compiler/accumulator.m:
compiler/make_hlds.m:
compiler/ml_code_util.m:
compiler/mlds_to_c.m:
compiler/passes_aux.m:
compiler/pd_info.m:
compiler/rl_analyse.m:
compiler/rl_info.m:
compiler/switch_detection.m:
compiler/typecheck.m:
	Replace deprecated syntax for :- inst and :- mode
	declarations.

Julien.


Index: compiler/accumulator.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/accumulator.m,v
retrieving revision 1.32
diff -u -r1.32 accumulator.m
--- compiler/accumulator.m	16 Jun 2004 03:44:41 -0000	1.32
+++ compiler/accumulator.m	16 Jul 2004 17:47:23 -0000
@@ -1458,9 +1458,9 @@

 %-----------------------------------------------------------------------------%

-:- inst call = bound(call(ground, ground, ground, ground, ground, ground)).
-:- inst hlds_call = bound('-'(call, ground)).
-:- inst call_goal = bound('-'(hlds_call, ground)).
+:- inst call ---> call(ground, ground, ground, ground, ground, ground).
+:- inst hlds_call ---> call - ground.
+:- inst call_goal ---> hlds_call - ground.

 	% Do a goal_store__lookup where the result is known to be a
 	% call.
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.474
diff -u -r1.474 make_hlds.m
--- compiler/make_hlds.m	14 Jul 2004 05:37:03 -0000	1.474
+++ compiler/make_hlds.m	16 Jul 2004 17:46:20 -0000
@@ -1794,7 +1794,7 @@
 	).

 :- type add_marker_pred_info == pred(pred_info, pred_info).
-:- inst add_marker_pred_info = (pred(in, out) is det).
+:- inst add_marker_pred_info == (pred(in, out) is det).

 :- pred do_add_pred_marker(string::in, sym_name::in, arity::in,
 	import_status::in, bool::in, term__context::in,
@@ -6272,7 +6272,7 @@
 	report_warning(string__format("\
 You probably meant !.%s or !:%s.\n", [s(Name), s(Name)]), !IO).

-:- inst dcg_record_syntax_op = bound("=^"; ":=").
+:- inst dcg_record_syntax_op == bound("=^"; ":=").

 :- pred transform_dcg_record_syntax(string::in(dcg_record_syntax_op),
 	list(prog_term)::in, prog_context::in, hlds_goal::out,
@@ -6675,7 +6675,7 @@

 %-----------------------------------------------------------------------------%

-:- inst aditi_update_str =
+:- inst aditi_update_str ==
 	bound(	"aditi_insert"
 	;	"aditi_delete"
 	;	"aditi_bulk_insert"
Index: compiler/ml_code_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_code_util.m,v
retrieving revision 1.82
diff -u -r1.82 ml_code_util.m
--- compiler/ml_code_util.m	14 Jun 2004 04:16:18 -0000	1.82
+++ compiler/ml_code_util.m	16 Jul 2004 17:44:47 -0000
@@ -70,7 +70,7 @@

 :- type gen_pred == pred(mlds__defns, mlds__statements,
 		ml_gen_info, ml_gen_info).
-:- inst gen_pred = (pred(out, out, in, out) is det).
+:- inst gen_pred == (pred(out, out, in, out) is det).

 :- pred ml_combine_conj(code_model::in, prog_context::in,
 	gen_pred::in(gen_pred), gen_pred::in(gen_pred),
Index: compiler/mlds_to_c.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.164
diff -u -r1.164 mlds_to_c.m
--- compiler/mlds_to_c.m	14 Jun 2004 04:16:19 -0000	1.164
+++ compiler/mlds_to_c.m	16 Jul 2004 17:41:09 -0000
@@ -91,7 +91,7 @@
 %-----------------------------------------------------------------------------%

 :- type output_type == pred(mlds__type, io, io).
-:- inst output_type = (pred(in, di, uo) is det).
+:- inst output_type == (pred(in, di, uo) is det).

 %-----------------------------------------------------------------------------%

Index: compiler/passes_aux.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/passes_aux.m,v
retrieving revision 1.62
diff -u -r1.62 passes_aux.m
--- compiler/passes_aux.m	14 Jun 2004 04:16:26 -0000	1.62
+++ compiler/passes_aux.m	16 Jul 2004 17:43:57 -0000
@@ -82,7 +82,7 @@
 % but that is not a good solution, because it causes a lot of warnings
 % about unbound type variables.

-:- inst task =	bound(( update_proc(pred(in, in, out) is det)
+:- inst task ==	bound(( update_proc(pred(in, in, out) is det)
 		;	update_proc_predid(pred(in, in, in, out) is det)
 		;	update_proc_predprocid(pred(in, in, in, in, out)
 				is det)
@@ -100,10 +100,10 @@
 				in, out) is det, ground)
 		)).

-:- inst pred_error_task =
+:- inst pred_error_task ==
 		(pred(in, in, out, in, out, out, out, di, uo) is det).

-:- mode task ::	task -> task.
+:- mode task == task >> task.

 :- pred process_all_nonimported_procs(task::task,
 	module_info::in, module_info::out, io::di, io::uo) is det.
Index: compiler/pd_info.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/pd_info.m,v
retrieving revision 1.13
diff -u -r1.13 pd_info.m
--- compiler/pd_info.m	14 Jun 2004 04:16:27 -0000	1.13
+++ compiler/pd_info.m	16 Jul 2004 17:07:28 -0000
@@ -49,14 +49,14 @@
 		% map from version id to the info about the version.
 :- type version_index == map(pred_proc_id, version_info).

-:- inst unique_pd_info = ground.
+:- inst unique_pd_info == ground.

-:- mode pd_info_di :: unique_pd_info -> dead.
-:- mode pd_info_uo :: free -> unique_pd_info.
-:- mode pd_info_ui :: unique_pd_info -> unique_pd_info.
+:- mode pd_info_di == unique_pd_info >> dead.
+:- mode pd_info_uo == free >> unique_pd_info.
+:- mode pd_info_ui == unique_pd_info >> unique_pd_info.

-:- inst pd_info_no_io = ground.
-:- mode pd_info_set_io :: pd_info_no_io -> dead.
+:- inst pd_info_no_io == ground.
+:- mode pd_info_set_io == pd_info_no_io >> dead.

 :- pred pd_info_init(module_info, pd_arg_info, io__state, pd_info).
 :- mode pd_info_init(in, in, di, pd_info_uo) is det.
Index: compiler/rl_analyse.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rl_analyse.m,v
retrieving revision 1.6
diff -u -r1.6 rl_analyse.m
--- compiler/rl_analyse.m	14 Jun 2004 04:16:33 -0000	1.6
+++ compiler/rl_analyse.m	16 Jul 2004 17:03:10 -0000
@@ -52,7 +52,7 @@
 		Info	% data associated with the block (e.g. gen + kill sets)
 	).

-:- mode rl_analysis :: in(rl_analysis).
+:- mode rl_analysis == in(rl_analysis).

 :- type direction
 	--->	forward
@@ -70,23 +70,23 @@
 		pred(pair(block_id, BlockData),
 			pair(block_id, maybe(BlockData)), BlockData,
 			Globals, Globals, rl_opt_info, rl_opt_info).
-:- inst confluence = (pred(in, in, out, in, out, in, out) is det).
+:- inst confluence == (pred(in, in, out, in, out, in, out) is det).

 	% Given the information at entry, compute the information at exit.
 :- type block_update(BlockData, Info, Globals) ==
 		pred(block_id, BlockData, block_data(BlockData, Info),
 			block_data(BlockData, Info), Globals, Globals,
 			rl_opt_info, rl_opt_info).
-:- inst block_update = (pred(in, in, in, out, in, out, in, out) is det).
+:- inst block_update == (pred(in, in, in, out, in, out, in, out) is det).

 	% Do an in-in test unification.
 :- type equal(BlockData, Globals) == pred(BlockData, BlockData, Globals).
-:- inst equal = (pred(in, in, in) is semidet).
+:- inst equal == (pred(in, in, in) is semidet).

 	% Pretty print the block data for debugging.
 :- type write(BlockData, Info, Globals) ==
 	    (pred(block_data(BlockData, Info), Globals, io__state, io__state)).
-:- inst write = (pred(in, in, di, uo) is det).
+:- inst write == (pred(in, in, di, uo) is det).

 %-----------------------------------------------------------------------------%

Index: compiler/rl_info.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rl_info.m,v
retrieving revision 1.7
diff -u -r1.7 rl_info.m
--- compiler/rl_info.m	14 Jun 2004 04:16:34 -0000	1.7
+++ compiler/rl_info.m	16 Jul 2004 17:05:43 -0000
@@ -51,17 +51,17 @@
 	;	same_as_relation(relation_id)
 	;	schema(list(type)).

-:- inst uniq_rl_info	=	ground.
+:- inst uniq_rl_info == ground.

-:- mode rl_info_uo :: free -> uniq_rl_info.
-:- mode rl_info_ui :: uniq_rl_info -> uniq_rl_info.
-:- mode rl_info_di :: uniq_rl_info -> uniq_rl_info.
+:- mode rl_info_uo == free >> uniq_rl_info.
+:- mode rl_info_ui == uniq_rl_info >> uniq_rl_info.
+:- mode rl_info_di == uniq_rl_info >> uniq_rl_info.

-:- inst rl_info_no_io	=	ground.
+:- inst rl_info_no_io == ground.

-:- mode rl_info_get_io_state	:: uniq_rl_info -> rl_info_no_io.
-:- mode rl_info_no_io		:: rl_info_no_io -> rl_info_no_io.
-:- mode rl_info_set_io_state	:: rl_info_no_io -> dead.
+:- mode rl_info_get_io_state == uniq_rl_info >> rl_info_no_io.
+:- mode rl_info_no_io        == rl_info_no_io >> rl_info_no_io.
+:- mode rl_info_set_io_state == rl_info_no_io >> dead.

 %-----------------------------------------------------------------------------%

Index: compiler/switch_detection.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/switch_detection.m,v
retrieving revision 1.106
diff -u -r1.106 switch_detection.m
--- compiler/switch_detection.m	30 Jun 2004 02:48:16 -0000	1.106
+++ compiler/switch_detection.m	16 Jul 2004 17:40:15 -0000
@@ -44,7 +44,7 @@

 :- type process_unify(Result, Info) ==
 	pred(prog_var, hlds_goal, list(hlds_goal), Result, Result, Info, Info).
-:- inst process_unify = (pred(in, in, out, in, out, in, out) is det).
+:- inst process_unify == (pred(in, in, out, in, out, in, out) is det).

 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.355
diff -u -r1.355 typecheck.m
--- compiler/typecheck.m	14 Jun 2004 04:16:41 -0000	1.355
+++ compiler/typecheck.m	16 Jul 2004 17:40:42 -0000
@@ -1622,7 +1622,7 @@
 	% the update predicate. For an ordinary predicate call,
 	% the types are not transformed.
 :- type adjust_arg_types == pred(list(type), list(type)).
-:- inst adjust_arg_types = (pred(in, out) is det).
+:- inst adjust_arg_types == (pred(in, out) is det).

 	% Typecheck a predicate, performing the given transformation on the
 	% argument types.

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