[m-rev.] diff: new test for circular equiv types

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Nov 9 03:23:54 AEDT 2002


Branches: main
Estimated hours taken: 0.25

tests/invalid/Mmakefile:
tests/invalid/circ_type2.m:
tests/invalid/circ_type2.err_exp:
	Add a test of some more complicated examples of circular equivalence
	types.  This test is similar to circ_type.m but tests some more
	complicated cases involving parametric types.

Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: tests/invalid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mmakefile,v
retrieving revision 1.128
diff -u -d -r1.128 Mmakefile
--- tests/invalid/Mmakefile	24 Oct 2002 04:36:56 -0000	1.128
+++ tests/invalid/Mmakefile	8 Nov 2002 16:18:04 -0000
@@ -35,6 +35,7 @@
 	builtin_int \
 	builtin_proc \
 	circ_type \
+	circ_type2 \
 	constrained_poly_insts \
 	constructor_warning \
 	det_errors \
Index: tests/invalid/circ_type2.err_exp
===================================================================
RCS file: tests/invalid/circ_type2.err_exp
diff -N tests/invalid/circ_type2.err_exp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/invalid/circ_type2.err_exp	8 Nov 2002 16:23:06 -0000
@@ -0,0 +1,9 @@
+circ_type2.m:010: Error: circular equivalence type `circ_type2:circ1/1'.
+circ_type2.m:011: Error: circular equivalence type `circ_type2:circ2/1'.
+circ_type2.m:012: Error: circular equivalence type `circ_type2:circ3/1'.
+circ_type2.m:013: Error: circular equivalence type `circ_type2:circ4/1'.
+circ_type2.m:015: Error: circular equivalence type `circ_type2:left/1'.
+circ_type2.m:016: Error: circular equivalence type `circ_type2:right/1'.
+circ_type2.m:018: Error: circular equivalence type `circ_type2:circ_left/1'.
+circ_type2.m:019: Error: circular equivalence type `circ_type2:circ_right/1'.
+For more information, try recompiling with `-E'.
Index: tests/invalid/circ_type2.m
===================================================================
RCS file: tests/invalid/circ_type2.m
diff -N tests/invalid/circ_type2.m
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/invalid/circ_type2.m	8 Nov 2002 16:22:14 -0000
@@ -0,0 +1,19 @@
+% Abother test for circular equivalence types.
+% This test is similar to circ_type.m but tests some more
+% complicated cases involving parametric types.
+
+:- module circ_type2.
+
+:- interface.
+:- import_module list, set.
+
+:- type circ1(T) == circ1(T).
+:- type circ2(T) == circ2(circ2(T)).
+:- type circ3(T) == list(circ3(T)).
+:- type circ4(T) == circ4(set(T)).
+
+:- type left(T) == right(T).
+:- type right(T) == left(T).
+
+:- type circ_left(T) == circ_right(list(T)).
+:- type circ_right(T) == set(circ_left(T)).

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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