[m-rev.] diff: get rid of inappropriate warning

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon May 3 21:57:15 AEST 2004


compiler/simplify.m:
	Do not warn about infinite recursion in impure predicates, since
	the recursion may be controlled by data invisible to the compiler.

Zoltan.

--- /home/zs/mer/ws00/compiler/simplify.m	2004-03-08 03:34:32.000000000 +0100
+++ simplify.m	2004-04-25 19:22:25.000000000 +0200
@@ -1280,6 +1280,12 @@
 		%
 		\+ proc_info_eval_method(ProcInfo, eval_minimal),
 
+		% Don't warn about impure procedures, since they may modify
+		% the state in ways not visible to us (unlike pure and semipure
+		% procedures).
+		pred_info_get_purity(PredInfo1, Purity),
+		\+ Purity = (impure),
+
 		% Don't warn about Aditi relations.
 		\+ hlds_pred__pred_info_is_aditi_relation(PredInfo1)
 	->
--------------------------------------------------------------------------
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