[m-rev.] diff: fix failure of warnings/purity_warnings

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Nov 22 18:54:27 AEDT 2005


Estimated hours taken: 0.2
Branches: main

Fix the failure of the test case warnings/purity_warnings.  It has been
failing because of (what are now) purity errors in the code.  The tests in
this directory are only check warnings, actual errors in the code will cause
them to fail.

tests/warnings/purity_warnings.{m,exp}:
	Eliminate the purity errors that have been causing this test case to
	fail.

Julien.

Index: purity_warnings.exp
===================================================================
RCS file: /home/mercury1/repository/tests/warnings/purity_warnings.exp,v
retrieving revision 1.3
diff -u -r1.3 purity_warnings.exp
--- purity_warnings.exp	18 Nov 2005 06:13:39 -0000	1.3
+++ purity_warnings.exp	22 Nov 2005 07:49:31 -0000
@@ -14,12 +14,6 @@
 purity_warnings.m:065: In call to predicate `io.print/3':
 purity_warnings.m:065:   warning: unnecessary `impure' indicator.
 purity_warnings.m:065:   No purity indicator is necessary.
-purity_warnings.m:060: In predicate `purity_warnings.impure_method1a_impl/2':
-purity_warnings.m:060:   purity error: predicate is impure.
-purity_warnings.m:060:   It must be declared `impure' or promised pure.
 purity_warnings.m:071: In call to predicate `io.print/3':
 purity_warnings.m:071:   warning: unnecessary `semipure' indicator.
 purity_warnings.m:071:   No purity indicator is necessary.
-purity_warnings.m:062: In predicate `purity_warnings.semipure_method_a_impl/2':
-purity_warnings.m:062:   purity error: predicate is semipure.
-purity_warnings.m:062:   It must be declared `semipure' or promised pure.
Index: purity_warnings.m
===================================================================
RCS file: /home/mercury1/repository/tests/warnings/purity_warnings.m,v
retrieving revision 1.3
diff -u -r1.3 purity_warnings.m
--- purity_warnings.m	18 Nov 2005 06:13:39 -0000	1.3
+++ purity_warnings.m	22 Nov 2005 07:48:37 -0000
@@ -57,9 +57,9 @@
 		semipure print("semipure_method_b\n"))	% XXX should warn
 ].

-:- pred impure_method1a_impl(io::di, io::uo) is det.	% warn
+:- impure pred impure_method1a_impl(io::di, io::uo) is det.
 :- semipure pred impure_method2a_impl(io::di, io::uo) is det.
-:- pred semipure_method_a_impl(io::di, io::uo) is det.	% warn
+:- semipure pred semipure_method_a_impl(io::di, io::uo) is det.

 impure_method1a_impl -->
 	impure print("impure_method1a_impl\n").		% warn

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