<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi,<div><br></div><div>First of all, a huge big massive thank you to everybody involved in that ROTD, I read the entire release notes over breakfast, what a fantastic amount of work and effort has been expended over it. Very much appreciated here.  Again, thank you.</div><div><br></div><div>I noticed the format_call pragma, and that is a welcome addition as I have a simple ANSI output module that makes it easy to add emojis and colour to my output. I once had a subtle bug in it and since that day have always used the compiler option --warn-unknown-format-calls but this new pragma, well!</div><div><br></div><div>My export section then is:</div><div><br></div><div><div><font face="Andale Mono" style="font-size: 14px;">:- pragma format_call(pred(error/4), format_string_values(1, 2)).</font></div><div><font face="Andale Mono" style="font-size: 14px;">:- pragma format_call(func(format/2), format_string_values(1, 2)).</font></div><div><font face="Andale Mono" style="font-size: 14px;">:- pragma format_call(pred(format/4), format_string_values(1, 2)).</font></div><div><font face="Andale Mono" style="font-size: 14px;"><br></font></div><div><font face="Andale Mono" style="font-size: 14px;">:- pred error(string::in, list(poly_type)::in, io::di, io::uo) is det.</font></div><div><font face="Andale Mono" style="font-size: 14px;">:- func format(string::in, list(poly_type)::in) = (string::out) is det.</font></div><div><font face="Andale Mono" style="font-size: 14px;">:- pred format(string::in, list(poly_type)::in, io::di, io::uo) is det.</font></div></div><div><font face="Andale Mono" style="font-size: 14px;"><br></font></div><div><div><font face="Andale Mono" style="font-size: 14px;">:- func chromakey(string::in) = (string::out) is det.</font></div></div><div><br></div><div>The function chromakey/1 is the source of my problem because it is used by all of the above to actually map the source format string into the final format string, and thus, when we look at the implementation code:</div><div><br></div><div><div><font face="Andale Mono" style="font-size: 14px;">format(Format, Args, !IO) :- format_to(io.stdout_stream, Format, Args, !IO).</font></div><div><font face="Andale Mono" style="font-size: 14px;">error(Format, Args, !IO) :- format_to(io.stderr_stream, Format, Args, !IO).</font></div><div><font face="Andale Mono" style="font-size: 14px;"><br></font></div><div><font face="Andale Mono" style="font-size: 14px;">:- pred format_to(output_stream::in, string::in, list(poly_type)::in, </font><span style="font-size: 14px; font-family: "Andale Mono";">io::di, io::uo) is det.</span></div><div><font face="Andale Mono" style="font-size: 14px;">:- pragma format_call(pred(format_to/5), format_string_values(2, 3)).</font></div><div><font face="Andale Mono" style="font-size: 14px;"><br></font></div><div><font face="Andale Mono" style="font-size: 14px;">format_to(Stream, Format, Args, !IO) :-</font></div><div><font face="Andale Mono" style="font-size: 14px;">[52] io.format(Stream, chromakey(Format), Args, !IO).</font></div></div><div><font face="Andale Mono" style="font-size: 14px;"><br></font></div><div><font face="Andale Mono" style="font-size: 14px;">[67] format(Format, Args) = string.format(chromakey(Format), Args).</font></div><div><br></div><div>The errors I get are:</div><div><br></div><div><div><font face="Andale Mono" style="font-size: 14px;">aio.m:052: Error: unknown format string in call to predicate `io.format'/5.</font></div><div><font face="Andale Mono" style="font-size: 14px;">aio.m:052: Error: unknown list of values to be formatted in call to predicate</font></div><div><font face="Andale Mono" style="font-size: 14px;">aio.m:052:   `io.format'/5.</font></div><div><font face="Andale Mono" style="font-size: 14px;">aio.m:067: Error: unknown format string in call to function `string.format'/2.</font></div><div><font face="Andale Mono" style="font-size: 14px;">aio.m:067: Error: unknown list of values to be formatted in call to function</font></div><div><font face="Andale Mono" style="font-size: 14px;">aio.m:067:   `string.format'/2.</font></div><div><font face="Andale Mono" style="font-size: 14px;">** Error making `Mercury/cs/aio.c'.</font></div></div><div><br></div><div>Am I stuck with this error in these two places or is there someway I can rearrange the code?</div><div>Thanks,</div><div>Sean.</div><div><br></div><div><br></div><div><br></div></body></html>