<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I will indeed raise a bug report, here is the implementation of atrace:<div class=""><br class=""></div><div class=""><font face="Courier New" class="">:- pred atrace(string::in, list(string.poly_type)::in) is det.<br class="">atrace(Format, Args) :-<br class="">    atrace(0, Format, Args).<br class="">:- pred atrace(int::in, string::in, list(string.poly_type)::in) is det.<br class="">atrace(Level, Format, Args) :-<br class="">    utils.ftrace(Level, "FELT_AST", "\n", Format, Args).</font><br class=""><br class=""></div><div class="">and</div><div class=""><br class=""></div><div class=""><font face="Courier New" class="">:- pred ftrace(<br class="">    int::in, string::in, string::in, string::in, list(string.poly_type)::in) is det.<br class=""></font></div><div class=""><font face="Courier New" class="">ftrace(Level, Flag, Prefix, Format, Args) :-<br class="">    trace[io(!Dbg)] (<br class="">        utils.get_env_int(Flag, 0, N, !Dbg),<br class="">        (if N >= Level then<br class="">            io.print(Prefix, !Dbg),<br class="">            io.format(Format, Args, !Dbg)<br class="">        else true)<br class="">    ).<br class=""></font><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 27 May 2021, at 21:54, Zoltan Somogyi <<a href="mailto:zoltan.somogyi@runbox.com" class="">zoltan.somogyi@runbox.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">2021-05-28 05:44 GMT+10:00 "Sean Charles (emacstheviking)" <<a href="mailto:objitsu@gmail.com" class="">objitsu@gmail.com</a>>:<br class=""><blockquote type="cite" class="">and the compiler error seems to be in the C code not the mercury code,<br class=""></blockquote><br class="">No, that is wrong. This part of the output ...<br class=""><br class=""><blockquote type="cite" class="">Making Mercury/cs/ast.c<br class="">Uncaught Mercury exception:<br class="">Software Error: predicate `check_hlds.try_expand.extract_intermediate_goal_parts'/7: Unexpected: unexpected goal form<br class="">** Error making `Mercury/cs/ast.c'.<br class=""></blockquote><br class="">... shows that the error occurred while the Mercury compiler was creating<br class="">the C code.<br class=""><br class="">The fact that the compiler aborted instead of giving an error message<br class="">means that this may be a compiler bug. Can you please raise the issue<br class="">on <a href="https://bugs.mercurylang.org/" class="">https://bugs.mercurylang.org/</a>.<br class=""><br class="">I am not our expert on the compiler's implementation of exceptions,<br class="">but my *guess* would be that the atrace predicate is det but has no<br class="">outputs (which means that semantically, it is equivalent to true),<br class="">the compiler thus simplifies it away, and then the code that implements<br class="">exception handling is not finding the code it was expecting to find.<br class=""><br class="">Zoltan.</div></div></blockquote></div><br class=""></div></body></html>