[m-users.] Uncaught mercury exception using try []
Sean Charles (emacstheviking)
objitsu at gmail.com
Fri May 28 07:10:28 AEST 2021
Hmmm. They -work- in so far as they generate output when I set the relevant environment variables so I am not sure I understand why they are -useless- to that extent.
so I should be doing, at the relevant call sites,
trace[io(!Dbg) (atrace…)
instead of
atrace() :- … blah
yes? Would that mean then I have to repeatedly use runtime(env(“…”)) at every call site as well.
I shall RTFM on trace again as well I guess.
Mercury is a tough one for sure but I like it!
Thanks again Zoltan, I am sure you are saving me previous wasted time, if only I could see where faster!
Many thanks
Sean
> On 27 May 2021, at 22:02, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
>
>
> 2021-05-28 06:56 GMT+10:00 "Sean Charles (emacstheviking)" <objitsu at gmail.com>:
>> I will indeed raise a bug report, here is the implementation of atrace:
>
> Yes, I thought so. All three of those predicates are useless,
> because calls to all three will be replaced by "true".
>
> If you want to make them useful, give them a pair of I/O state arguments,
> and put the trace [io(!IO)] wrappers on the *outside* of calls to them.
> When such wrappers are inside the callee, the compiler does not see them,
> and it will optimize away code that has no output.
>
> Zoltan.
More information about the users
mailing list