<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 6 April 2014 02:51, Oleg Sivokon <span dir="ltr"><<a href="mailto:olegsivokon@gmail.com" target="_blank">olegsivokon@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I'm trying to log the values of the arguments while at every iteration<br>
of the predicate in order to understand what went wrong, but I can't<br>
because IO arguments aren't allowed in a semi-deterministic<br>
predicate... so, how do I print something from a predicate like that?<br></blockquote></div><div class="gmail_extra"><br></div>You use <a href="http://mercurylang.org/information/doc-release/mercury_ref/Trace-goals.html#Trace-goals">trace goals</a>[1]. One of the reasons I like Mercury is that it's pure ... until purity gets in the way. Then it gives you controlled ways out of the purity (which you use at your own risk, of course!).<br clear="all">
<div><br></div><div>[1] <a href="http://mercurylang.org/information/doc-release/mercury_ref/Trace-goals.html#Trace-goals">http://mercurylang.org/information/doc-release/mercury_ref/Trace-goals.html#Trace-goals</a></div><div>
<br></div>-- <br>"Perhaps people don't believe this, but throughout all of the discussions of entering China our focus has really been what's best for the Chinese people. It's not been about our revenue or profit or whatnot."<br>
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
</div></div>