[m-rev.] diff: replace deprecated syntax in .int files

Julien Fischer juliensf at cs.mu.OZ.AU
Mon Aug 23 19:52:34 AEST 2004


On Mon, 23 Aug 2004, Julien Fischer wrote:

>
> Estimated hours taken: 0.2
> Branches: main
>
> compiler/mercury_to_mercury.m:
> 	Don't use deprecated syntax for mode and inst definitions in
> 	interface files.
>

The following diff is also necessary.

Estimated hours taken: 0.5
Branches: main

invalid/*.err_exp:
	Update the expected output for these test cases since
	the compiler now generates error messages that doesn't
	use the deprecated syntax for mode declarations.

Index: invalid/aditi_update_mode_errors.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/aditi_update_mode_errors.err_exp,v
retrieving revision 1.7
diff -u -r1.7 aditi_update_mode_errors.err_exp
--- invalid/aditi_update_mode_errors.err_exp	17 Jan 2003 05:57:07 -0000	1.7
+++ invalid/aditi_update_mode_errors.err_exp	23 Aug 2004 09:32:19 -0000
@@ -44,19 +44,19 @@
 aditi_update_mode_errors.m:065:   expected instantiatedness was `ground'.
 aditi_update_mode_errors.m:072: In clause for `aditi_update_modes6((aditi.aditi_di), (aditi.aditi_uo))':
 aditi_update_mode_errors.m:072:   in argument 2 of `aditi_bulk_delete' of predicate `aditi_update_mode_errors.p/3':
-aditi_update_mode_errors.m:072:   mode error: variable `DeleteP' has instantiatedness `/* unique */(pred((free -> free), (free -> ground), (ground -> ground)) is nondet)',
+aditi_update_mode_errors.m:072:   mode error: variable `DeleteP' has instantiatedness `/* unique */(pred((free >> free), (free >> ground), (ground >> ground)) is nondet)',
 aditi_update_mode_errors.m:072:   expected instantiatedness was `(pred(in, out, out) is nondet)'.
 aditi_update_mode_errors.m:078: In clause for `aditi_update_modes7((aditi.aditi_di), (aditi.aditi_uo))':
 aditi_update_mode_errors.m:078:   in argument 2 of `aditi_bulk_delete' of function `aditi_update_mode_errors.q/2':
-aditi_update_mode_errors.m:078:   mode error: variable `DeleteQ' has instantiatedness `/* unique */(func((free -> free), (free -> ground)) = (ground -> ground) is nondet)',
+aditi_update_mode_errors.m:078:   mode error: variable `DeleteQ' has instantiatedness `/* unique */(func((free >> free), (free >> ground)) = (ground >> ground) is nondet)',
 aditi_update_mode_errors.m:078:   expected instantiatedness was `(func(in, out) = out is nondet)'.
 aditi_update_mode_errors.m:087: In clause for `aditi_update_modes8((aditi.aditi_di), (aditi.aditi_uo))':
 aditi_update_mode_errors.m:087:   in argument 2 of `aditi_bulk_insert' of predicate `aditi_update_mode_errors.p/3':
-aditi_update_mode_errors.m:087:   mode error: variable `InsertP' has instantiatedness `/* unique */(pred((ground -> ground), (ground -> ground), (free -> ground)) is nondet)',
+aditi_update_mode_errors.m:087:   mode error: variable `InsertP' has instantiatedness `/* unique */(pred((ground >> ground), (ground >> ground), (free >> ground)) is nondet)',
 aditi_update_mode_errors.m:087:   expected instantiatedness was `(pred(in, out, out) is nondet)'.
 aditi_update_mode_errors.m:098: In clause for `aditi_update_modes9((aditi.aditi_di), (aditi.aditi_uo))':
 aditi_update_mode_errors.m:098:   in argument 2 of `aditi_bulk_insert' of function `aditi_update_mode_errors.q/2':
-aditi_update_mode_errors.m:098:   mode error: variable `InsertQ' has instantiatedness `/* unique */(func((ground -> ground), (ground -> ground)) = (free -> ground) is nondet)',
+aditi_update_mode_errors.m:098:   mode error: variable `InsertQ' has instantiatedness `/* unique */(func((ground >> ground), (ground >> ground)) = (free >> ground) is nondet)',
 aditi_update_mode_errors.m:098:   expected instantiatedness was `(func(in, out) = out is nondet)'.
 aditi_update_mode_errors.m:102: In clause for `aditi_update_modes10((aditi.aditi_di), (aditi.aditi_uo))':
 aditi_update_mode_errors.m:102:   in call to function `int.+/2':
@@ -70,11 +70,11 @@
 aditi_update_mode_errors.m:105:   which does not match any of the modes for function `int.+/2'.
 aditi_update_mode_errors.m:115: In clause for `aditi_update_modes12((aditi.aditi_di), (aditi.aditi_uo))':
 aditi_update_mode_errors.m:115:   in argument 2 of `aditi_bulk_modify' of predicate `aditi_update_mode_errors.p/3':
-aditi_update_mode_errors.m:115:   mode error: variable `ModifyP' has instantiatedness `/* unique */(pred((free -> free), (free -> ground), (free -> ground), (free -> free), (ground -> ground), (ground -> ground)) is semidet)',
+aditi_update_mode_errors.m:115:   mode error: variable `ModifyP' has instantiatedness `/* unique */(pred((free >> free), (free >> ground), (free >> ground), (free >> free), (ground >> ground), (ground >> ground)) is semidet)',
 aditi_update_mode_errors.m:115:   expected instantiatedness was `(pred(in, out, out, unused, out, out) is nondet)'.
 aditi_update_mode_errors.m:125: In clause for `aditi_update_modes13((aditi.aditi_di), (aditi.aditi_uo))':
 aditi_update_mode_errors.m:125:   in argument 2 of `aditi_bulk_modify' of function `aditi_update_mode_errors.q/2':
-aditi_update_mode_errors.m:125:   mode error: variable `ModifyQ' has instantiatedness `/* unique */(pred((free -> free), (ground -> ground), (ground -> ground), (free -> free), (ground -> ground), (ground -> ground)) is nondet)',
+aditi_update_mode_errors.m:125:   mode error: variable `ModifyQ' has instantiatedness `/* unique */(pred((free >> free), (ground >> ground), (ground >> ground), (free >> free), (ground >> ground), (ground >> ground)) is nondet)',
 aditi_update_mode_errors.m:125:   expected instantiatedness was `(pred(in, out, out, unused, out, out) is nondet)'.
 aditi_update_mode_errors.m:047: In clause for `anc((aditi.aditi_mui), out, out)':
 aditi_update_mode_errors.m:047:   in argument 2 of clause head:
Index: invalid/any_mode.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/any_mode.err_exp,v
retrieving revision 1.6
diff -u -r1.6 any_mode.err_exp
--- invalid/any_mode.err_exp	25 Jul 2003 02:27:36 -0000	1.6
+++ invalid/any_mode.err_exp	23 Aug 2004 09:36:12 -0000
@@ -10,7 +10,7 @@
 any_mode.m:009: Warning: clause in module interface.
 any_mode.m:005: Inferred :- pred p((any_mode.foo)).
 any_mode.m:008: Inferred :- pred q((any_mode.foo)).
-any_mode.m:006: In clause for `p((any -> ground))':
+any_mode.m:006: In clause for `p((any >> ground))':
 any_mode.m:006:   in argument 1 of call to predicate `any_mode.q/1':
 any_mode.m:006:   mode error: variable `X' has instantiatedness `any',
 any_mode.m:006:   expected instantiatedness was `ground'.
Index: invalid/bind_in_negated.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/bind_in_negated.err_exp,v
retrieving revision 1.1
diff -u -r1.1 bind_in_negated.err_exp
--- invalid/bind_in_negated.err_exp	2 Jun 2003 04:56:31 -0000	1.1
+++ invalid/bind_in_negated.err_exp	23 Aug 2004 09:37:04 -0000
@@ -1,4 +1,4 @@
-bind_in_negated.m:014: In clause for `p((bound(f(free, ground)) -> ground), (bound(f(ground, free)) -> ground), out)':
+bind_in_negated.m:014: In clause for `p((bound(f(free, ground)) >> ground), (bound(f(ground, free)) >> ground), out)':
 bind_in_negated.m:014:   scope error: attempt to bind a non-local variable
 bind_in_negated.m:014:   inside the condition of an if-then-else.
 bind_in_negated.m:014:   Variable `A' has instantiatedness `bound(bind_in_negated.f(free, ground))',
Index: invalid/duplicate_modes.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/duplicate_modes.err_exp,v
retrieving revision 1.7
diff -u -r1.7 duplicate_modes.err_exp
--- invalid/duplicate_modes.err_exp	19 Mar 2004 10:19:52 -0000	1.7
+++ invalid/duplicate_modes.err_exp	23 Aug 2004 09:43:13 -0000
@@ -8,13 +8,13 @@
 duplicate_modes.m:008: In mode declarations for predicate `duplicate_modes.q/2':
 duplicate_modes.m:008:   error: duplicate mode declaration.
 duplicate_modes.m:008:   Modes `q(in, out) is det'
-duplicate_modes.m:008:   and `q((ground -> ground), (free -> ground)) is det'
+duplicate_modes.m:008:   and `q((ground >> ground), (free >> ground)) is det'
 duplicate_modes.m:008:   are indistinguishable.
 duplicate_modes.m:009:   Here is the conflicting mode declaration.
 duplicate_modes.m:008: In mode declarations for predicate `duplicate_modes.q/2':
 duplicate_modes.m:008:   error: duplicate mode declaration.
 duplicate_modes.m:008:   Modes `q(in, out) is det'
-duplicate_modes.m:008:   and `q((ground -> ground), (free -> ground)) is det'
+duplicate_modes.m:008:   and `q((ground >> ground), (free >> ground)) is det'
 duplicate_modes.m:008:   are indistinguishable.
 duplicate_modes.m:010:   Here is the conflicting mode declaration.
 duplicate_modes.m:014: In mode declarations for predicate `duplicate_modes.r/2':
Index: invalid/ho_default_func_1.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/ho_default_func_1.err_exp,v
retrieving revision 1.2
diff -u -r1.2 ho_default_func_1.err_exp
--- invalid/ho_default_func_1.err_exp	17 Jan 2003 05:57:08 -0000	1.2
+++ invalid/ho_default_func_1.err_exp	23 Aug 2004 09:37:59 -0000
@@ -1,6 +1,6 @@
 ho_default_func_1.m:029: In clause for `baz(in, out)':
 ho_default_func_1.m:029:   in call to function `std_util.univ/1':
 ho_default_func_1.m:029:   mode error: arguments `TypeInfo_13, V_7, V_6'
-ho_default_func_1.m:029:   have insts `unique(private_builtin.type_info(unique(<type_ctor_info for .func/0>), unique(2), unique(<type_ctor_info for .int/0>), unique(<type_ctor_info for .int/0>))), /* unique */(func((free -> ground)) = (ground -> ground) is det), free',
+ho_default_func_1.m:029:   have insts `unique(private_builtin.type_info(unique(<type_ctor_info for .func/0>), unique(2), unique(<type_ctor_info for .int/0>), unique(<type_ctor_info for .int/0>))), /* unique */(func((free >> ground)) = (ground >> ground) is det), free',
 ho_default_func_1.m:029:   which does not match any of the modes for function `std_util.univ/1'.
 For more information, try recompiling with `-E'.
Index: invalid/ho_default_func_2.sub.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/ho_default_func_2.sub.err_exp,v
retrieving revision 1.2
diff -u -r1.2 ho_default_func_2.sub.err_exp
--- invalid/ho_default_func_2.sub.err_exp	17 Jan 2003 05:57:08 -0000	1.2
+++ invalid/ho_default_func_2.sub.err_exp	23 Aug 2004 09:33:50 -0000
@@ -1,5 +1,5 @@
 ho_default_func_2.sub.m:014: In clause for `baz(out)':
 ho_default_func_2.sub.m:014:   in argument 1 of call to function `ho_default_func_2.id.mkid/1':
-ho_default_func_2.sub.m:014:   mode error: variable `V_2' has instantiatedness `/* unique */(func((free -> ground)) = (ground -> ground) is det)',
+ho_default_func_2.sub.m:014:   mode error: variable `V_2' has instantiatedness `/* unique */(func((free >> ground)) = (ground >> ground) is det)',
 ho_default_func_2.sub.m:014:   expected instantiatedness was `ground'.
 For more information, try recompiling with `-E'.
Index: invalid/ho_default_func_3.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/ho_default_func_3.err_exp,v
retrieving revision 1.2
diff -u -r1.2 ho_default_func_3.err_exp
--- invalid/ho_default_func_3.err_exp	17 Jan 2003 05:57:08 -0000	1.2
+++ invalid/ho_default_func_3.err_exp	23 Aug 2004 09:38:41 -0000
@@ -1,6 +1,6 @@
 ho_default_func_3.m:029: In clause for `baz(in, out)':
 ho_default_func_3.m:029:   in call to function `std_util.univ/1':
 ho_default_func_3.m:029:   mode error: arguments `TypeInfo_13, V_7, V_6'
-ho_default_func_3.m:029:   have insts `unique(private_builtin.type_info(unique(<type_ctor_info for .func/0>), unique(2), unique(<type_ctor_info for .int/0>), unique(<type_ctor_info for .int/0>))), /* unique */(func((unique -> clobbered)) = (free -> unique) is det), free',
+ho_default_func_3.m:029:   have insts `unique(private_builtin.type_info(unique(<type_ctor_info for .func/0>), unique(2), unique(<type_ctor_info for .int/0>), unique(<type_ctor_info for .int/0>))), /* unique */(func((unique >> clobbered)) = (free >> unique) is det), free',
 ho_default_func_3.m:029:   which does not match any of the modes for function `std_util.univ/1'.
 For more information, try recompiling with `-E'.
Index: invalid/modes_erroneous.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/modes_erroneous.err_exp,v
retrieving revision 1.4
diff -u -r1.4 modes_erroneous.err_exp
--- invalid/modes_erroneous.err_exp	19 Mar 2004 10:19:52 -0000	1.4
+++ invalid/modes_erroneous.err_exp	23 Aug 2004 09:43:32 -0000
@@ -1,6 +1,6 @@
 modes_erroneous.m:001: Warning: interface for module `modes_erroneous' does not
 modes_erroneous.m:001:   export anything.
-modes_erroneous.m:009: In clause for `p((ground -> ground), (free -> ground))':
+modes_erroneous.m:009: In clause for `p((ground >> ground), (free >> ground))':
 modes_erroneous.m:009:   in argument 1 of call to predicate `modes_erroneous.p/2':
 modes_erroneous.m:009:   mode error: variable `V_5' has instantiatedness `free',
 modes_erroneous.m:009:   expected instantiatedness was `ground'.
Index: invalid/partial_implied_mode.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/partial_implied_mode.err_exp,v
retrieving revision 1.5
diff -u -r1.5 partial_implied_mode.err_exp
--- invalid/partial_implied_mode.err_exp	17 Jan 2003 05:57:09 -0000	1.5
+++ invalid/partial_implied_mode.err_exp	23 Aug 2004 09:34:59 -0000
@@ -1,4 +1,4 @@
-partial_implied_mode.m:033: In clause for `'__Unify__'((unique(partial_implied_mode2.physic_quantity(ground, free, unique(partial_implied_mode2.absol(free, free)))) -> bound(partial_implied_mode2.physic_quantity(ground, ground, bound(partial_implied_mode2.absol(ground, ground))))), (ground -> bound(partial_implied_mode2.physic_quantity(ground, ground, bound(partial_implied_mode2.absol(ground, ground))))))':
+partial_implied_mode.m:033: In clause for `'__Unify__'((unique(partial_implied_mode2.physic_quantity(ground, free, unique(partial_implied_mode2.absol(free, free)))) >> bound(partial_implied_mode2.physic_quantity(ground, ground, bound(partial_implied_mode2.absol(ground, ground))))), (ground >> bound(partial_implied_mode2.physic_quantity(ground, ground, bound(partial_implied_mode2.absol(ground, ground))))))':
 partial_implied_mode.m:033:   mode error in unification of `HeadVar__1' and `partial_implied_mode2.physic_quantity(V_9, V_4, V_10)'.
 partial_implied_mode.m:033:   Variable `HeadVar__1' has instantiatedness `unique(partial_implied_mode2.physic_quantity(ground, free, unique(partial_implied_mode2.absol(free, free))))',
 partial_implied_mode.m:033:   term `partial_implied_mode2.physic_quantity(V_9, V_4, V_10)'
Index: invalid/polymorphic_unification.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/polymorphic_unification.err_exp,v
retrieving revision 1.7
diff -u -r1.7 polymorphic_unification.err_exp
--- invalid/polymorphic_unification.err_exp	17 Jan 2003 05:57:09 -0000	1.7
+++ invalid/polymorphic_unification.err_exp	23 Aug 2004 09:39:38 -0000
@@ -1,4 +1,4 @@
-polymorphic_unification.m:019: In clause for `p(in, ((list.list_skel) -> dead))':
+polymorphic_unification.m:019: In clause for `p(in, ((list.list_skel) >> dead))':
 polymorphic_unification.m:019:   in polymorphically-typed unification:
 polymorphic_unification.m:019:   mode error: variable `X' has instantiatedness `bound([] ; '[|]'(free, list.list_skel(free)))',
 polymorphic_unification.m:019:   expected instantiatedness was `ground' or `any'.
Index: invalid/state_vars_test4.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/state_vars_test4.err_exp,v
retrieving revision 1.5
diff -u -r1.5 state_vars_test4.err_exp
--- invalid/state_vars_test4.err_exp	17 Jan 2003 05:57:09 -0000	1.5
+++ invalid/state_vars_test4.err_exp	23 Aug 2004 09:39:56 -0000
@@ -3,5 +3,5 @@
 state_vars_test4.m:021: In clause for `f(in) = out':
 state_vars_test4.m:021:   in argument 1 of call to function `list.foldl/3':
 state_vars_test4.m:021:   mode error: variable `V_5' has instantiatedness `free',
-state_vars_test4.m:021:   expected instantiatedness was `(func((ground -> ground), (ground -> ground)) = (free -> ground) is det)'.
+state_vars_test4.m:021:   expected instantiatedness was `(func((ground >> ground), (ground >> ground)) = (free >> ground) is det)'.
 For more information, try recompiling with `-E'.
--------------------------------------------------------------------------
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