[m-rev.] trivial diff: fix failure of tests/invalid/anys_in_negated_context

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Nov 16 17:27:00 AEDT 2005


Estimated hours taken: 0.1
Branches: main

tests/invalid/anys_in_negated_context.m:
	Update this test case in line with Ralph's bug fix
	for purity checking of inst any vars.

Julien.

Index: anys_in_negated_contexts.m
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/anys_in_negated_contexts.m,v
retrieving revision 1.1
diff -u -r1.1 anys_in_negated_contexts.m
--- anys_in_negated_contexts.m	7 Nov 2005 07:47:11 -0000	1.1
+++ anys_in_negated_contexts.m	16 Nov 2005 06:12:25 -0000
@@ -24,7 +24,7 @@
 :- pred good_if_then_else(T::ia, int::out) is det.

 good_if_then_else(X, Y) :-
-    ( if   impure ia(X), ig(3)
+    ( if   promise_pure (impure ia(X)), ig(3)
       then Y = 1
       else Y = 2
     ).
@@ -40,7 +40,7 @@
 :- pred bad_if_then_else2(T::ia, int::out) is det.

 bad_if_then_else2(X, Y) :-
-    ( if   impure ia(X), impure ig(3)
+    ( if   promise_pure (impure ia(X), impure ig(3))
       then Y = 1
       else Y = 2
     ).
@@ -48,7 +48,7 @@
 :- pred good_negation(T::ia) is semidet.

 good_negation(X) :-
-    not (impure ia(X), ig(3)).
+    not (promise_pure ((impure ia(X), ig(3)))).

 :- pred bad_negation1(T::ia) is semidet.

@@ -58,7 +58,7 @@
 :- pred bad_negation2(T::ia) is semidet.

 bad_negation2(X) :-
-    not (impure ia(X), impure ig(3)).
+    not (promise_pure ((impure ia(X), impure ig(3)))).

 :- pred pure_pred_mode_specific_clauses(int).
 :- mode pure_pred_mode_specific_clauses(in) is semidet.

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