[m-rev.] diff: invalid Mmakefile in tests/invalid

Simon Taylor staylr at gmail.com
Thu May 17 16:16:56 AEST 2007


On 14-May-2007, Zoltan Somogyi <zs at csse.unimelb.edu.au> wrote:
> Note that this bug hid several test case failures; they will show up
> when this fix is installed. I will handle illtyped_compare and
> modes_erroneous, but everyone else should check to see if they caused
> the others.

Estimated hours taken: 0.2
Branches: main

Update for changed error messages.

tests/invalid/types.err_exp:
	We now correctly stop after finding errors in make_hlds,
	so fix the expected output.

tests/invalid/types.err_exp2:
	This file hasn't been updated for a while and doesn't seem
	to be needed, so remove its contents.

tests/invalid/Mmakefile:
tests/invalid/Mercury.options:
tests/invalid/types2.{m,err_exp}:
	New file containing the errors from types.m which occur
	after make_hlds.


Index: Mercury.options
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mercury.options,v
retrieving revision 1.21
diff -u -u -r1.21 Mercury.options
--- Mercury.options	2 May 2007 06:16:39 -0000	1.21
+++ Mercury.options	17 May 2007 04:24:19 -0000
@@ -131,6 +131,7 @@
 MCFLAGS-typeclass_test_12		= --verbose-error-messages
 MCFLAGS-typeclass_test_8		= --verbose-error-messages
 MCFLAGS-types				= --verbose-error-messages
+MCFLAGS-types2				= --verbose-error-messages
 MCFLAGS-type_vars			= --verbose-error-messages
 MCFLAGS-unbound_type_vars		= --verbose-error-messages
 MCFLAGS-undef_type			= --verbose-error-messages
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mmakefile,v
retrieving revision 1.214
diff -u -u -r1.214 Mmakefile
--- Mmakefile	14 May 2007 08:20:16 -0000	1.214
+++ Mmakefile	17 May 2007 04:23:53 -0000
@@ -201,6 +201,7 @@
 	typeclass_test_8 \
 	typeclass_test_9 \
 	types	\
+	types2	\
 	unbound_type_vars \
 	undeclared_mode \
 	undef_inst \
Index: types.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/types.err_exp,v
retrieving revision 1.18
diff -u -u -r1.18 types.err_exp
--- types.err_exp	1 Oct 2006 04:24:12 -0000	1.18
+++ types.err_exp	17 May 2007 04:32:47 -0000
@@ -11,31 +11,3 @@
 types.m:017:   without preceding `pred' declaration.
 types.m:020: Error: clause for predicate `types.a'/1
 types.m:020:   without preceding `pred' declaration.
-types.m:005: Error: no clauses for predicate `p'/1.
-types.m:012: In clause for predicate `q'/0:
-types.m:012:   error: undefined predicate `zzzzzzzz'/0.
-types.m:013: In clause for predicate `q'/0:
-types.m:013:   in argument 1 of call to predicate `p'/1:
-types.m:013:   type error: argument has type `int',
-types.m:013:   expected type was `(pred)'.
-types.m:013:   The partial type assignment was:
-types.m:013:     V_1: (pred)
-types.m:013:     V_2: int
-types.m:014: In clause for predicate `q'/0:
-types.m:014:   error: wrong number of arguments (0; should be 1)
-types.m:014:   in call to predicate `p'.
-types.m:018: In clause for predicate `r'/0:
-types.m:018:   error: undefined predicate `s'/0.
-types.m:020: In clause for predicate `a'/1:
-types.m:020:   error: undefined predicate `b'/1.
-types.m:039: In clause for predicate `bar'/1:
-types.m:039:   type error in unification of variable `X'
-types.m:039:   and constant `0'.
-types.m:039:   variable `X' has type `(some [BarTypeParam] BarTypeParam)',
-types.m:039:   constant `0' has type `int'.
-types.m:039:   The partial type assignment was:
-types.m:039:     some [BarTypeParam_1]
-types.m:039:     X_2: BarTypeParam
-types.m:050: Error: no clauses for predicate `bar2'/1.
-types.m:048: Error: abstract declaration for type `types.t'/2 has no
-types.m:048:   corresponding definition.
Index: types.err_exp2
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/types.err_exp2,v
retrieving revision 1.10
diff -u -u -r1.10 types.err_exp2
--- types.err_exp2	14 Sep 2005 05:26:54 -0000	1.10
+++ types.err_exp2	17 May 2007 05:01:09 -0000
@@ -1,29 +1 @@
-types.m:001: Warning: interface for module `types' does not export anything.
-types.m:003: Error: constructor `types.a/0' for type `types.t/0' multiply defined.
-types.m:003: Error: constructor `types.f/1' for type `types.t/0' multiply defined.
-types.m:017: Error: clause for predicate `types.r/0'
-types.m:017:   without preceding `pred' declaration.
-types.m:020: Error: clause for predicate `types.a/1'
-types.m:020:   without preceding `pred' declaration.
-types.m:005: Error: no clauses for predicate `p/1'.
-types.m:012: In clause for predicate `types.q/0':
-types.m:012:   error: undefined predicate `zzzzzzzz/0'.
-types.m:013: In clause for predicate `types.q/0':
-types.m:013:   in argument 1 of call to predicate `p/1':
-types.m:013:   type error: argument has type `int',
-types.m:013:   expected type was `(pred)'.
-types.m:014: In clause for predicate `types.q/0':
-types.m:014:   error: wrong number of arguments (0; should be 1)
-types.m:014:   in call to predicate `p'.
-types.m:039: In clause for predicate `types.bar/1':
-types.m:039:   type error in unification of variable `X'
-types.m:039:   and constant `0'.
-types.m:039:   variable `X' has type `(some [BarTypeParam] BarTypeParam)',
-types.m:039:   constant `0' has type `int'.
-types.m:050: Error: no clauses for predicate `bar2/1'.
-types.m:018: In clause for predicate `types.r/0':
-types.m:018:   error: undefined predicate `s/0'.
-types.m:020: In clause for predicate `types.a/1':
-types.m:020:   error: undefined predicate `b/1'.
-types.m:048: Error: abstract declaration for type `types.t'/2 has no
-types.m:048:   corresponding definition.
+This file is no longer used.
Index: types2.err_exp
===================================================================
RCS file: types2.err_exp
diff -N types2.err_exp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ types2.err_exp	17 May 2007 04:24:46 -0000
@@ -0,0 +1,32 @@
+types2.m:017: Error: clause for predicate `types2.r'/0
+types2.m:017:   without preceding `pred' declaration.
+types2.m:020: Error: clause for predicate `types2.a'/1
+types2.m:020:   without preceding `pred' declaration.
+types2.m:005: Error: no clauses for predicate `p'/1.
+types2.m:012: In clause for predicate `q'/0:
+types2.m:012:   error: undefined predicate `zzzzzzzz'/0.
+types2.m:013: In clause for predicate `q'/0:
+types2.m:013:   in argument 1 of call to predicate `p'/1:
+types2.m:013:   type error: argument has type `int',
+types2.m:013:   expected type was `(pred)'.
+types2.m:013:   The partial type assignment was:
+types2.m:013:     V_1: (pred)
+types2.m:013:     V_2: int
+types2.m:014: In clause for predicate `q'/0:
+types2.m:014:   error: wrong number of arguments (0; should be 1)
+types2.m:014:   in call to predicate `p'.
+types2.m:018: In clause for predicate `r'/0:
+types2.m:018:   error: undefined predicate `s'/0.
+types2.m:020: In clause for predicate `a'/1:
+types2.m:020:   error: undefined predicate `b'/1.
+types2.m:039: In clause for predicate `bar'/1:
+types2.m:039:   type error in unification of variable `X'
+types2.m:039:   and constant `0'.
+types2.m:039:   variable `X' has type `(some [BarTypeParam] BarTypeParam)',
+types2.m:039:   constant `0' has type `int'.
+types2.m:039:   The partial type assignment was:
+types2.m:039:     some [BarTypeParam_1]
+types2.m:039:     X_2: BarTypeParam
+types2.m:050: Error: no clauses for predicate `bar2'/1.
+types2.m:048: Error: abstract declaration for type `types2.t'/2 has no
+types2.m:048:   corresponding definition.
Index: types2.m
===================================================================
RCS file: types2.m
diff -N types2.m
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ types2.m	17 May 2007 04:19:54 -0000
@@ -0,0 +1,56 @@
+:- module types2.
+:- interface.
+:- type t ---> a; f(t).
+:- implementation.
+:- pred p(pred).
+
+
+:- pred q.
+
+q :-
+	p(q),
+	zzzzzzzz,
+	p(2),
+	p.
+
+
+r :-
+	s.
+
+a(X) :- b(X).
+
+r :-
+	r, a(0).
+
+:- pred z.
+z :-
+	r, a(0).
+	
+
+:- pred foo.
+
+foo :-
+	bar(_).
+	
+
+:- pred bar(BarTypeParam).
+
+bar(X) :-
+	X = 0.
+
+
+:- pred baz(BazTypeParam).
+
+baz(X) :-
+	bar(X).
+
+
+:- type t(T1, T2).
+
+:- pred bar2(t(Bar1, Bar2)).
+
+:- pred baz2(t(Baz1, Baz2)).
+
+baz2(X) :-
+	bar2(X).
+
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list