[m-users.] How do you go about logging?
Michael Richter
ttmrichter at gmail.com
Sun Apr 6 11:13:35 AEST 2014
On 6 April 2014 02:51, Oleg Sivokon <olegsivokon at gmail.com> wrote:
> I'm trying to log the values of the arguments while at every iteration
> of the predicate in order to understand what went wrong, but I can't
> because IO arguments aren't allowed in a semi-deterministic
> predicate... so, how do I print something from a predicate like that?
>
You use trace goals<http://mercurylang.org/information/doc-release/mercury_ref/Trace-goals.html#Trace-goals>[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!).
[1]
http://mercurylang.org/information/doc-release/mercury_ref/Trace-goals.html#Trace-goals
--
"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."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20140406/569192b0/attachment.html>
More information about the users
mailing list