[m-rev.] for post-commit review: do more kinds of check for all foreign_procs

Peter Wang novalazy at gmail.com
Fri Jan 30 16:06:30 AEDT 2026


On Fri, 30 Jan 2026 05:19:04 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> For review by anyone. The diff is with -b.
> 
> While doing these changes, I saw that we use wildly different terminology
> to refer to the same entities (foreign_procs) in different diagnostic messages.
> The three main patterns are these:
> 
>    "Error: foreign clause for predicate xyz ..."
> 
>    "In ':- pragma foreign_proc' declaration for predicate xyz ..."
> 
>    "In the C code for predicate xyz: ..."
> 
> I propose that we change all these diagnostics to either something like this:
> 
>      "In the C language ':- pragma foreign_proc' declaration for predicate xyz ..."
> 
> or to something like this:
> 
>    "In the C foreign_proc for predicate xyz ..."
> 
> The former is more formal and complete, the second is shorter.
> I slightly prefer the second. What do you guys think? Do you have
> another alternative you prefer to these?
>    
> Zoltan.

I prefer the second as well.

The diff looks fine.

Peter


More information about the reviews mailing list