[m-rev.] for post-commit review: fill in most of the grade modifiers section

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Aug 8 18:47:14 AEST 2025



On Fri, 8 Aug 2025 16:04:51 +1000, Julien Fischer <jfischer at opturion.com> wrote:
> On Thu, 7 Aug 2025 at 15:14, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
> > + at table @code
> > + at item .tr
> > +Compiling programs in a grade that includes the @code{.tr} grade modifier
> > +generates executables that support trailing.
> > +This means that the compiler-generated code
> > +will create the snapshots and unwind the trail as needed.
> > + at c The part in between,
> > +The addition of new constraints to the constraint store,
> > +and the addition of new entries to the trail to undo those additions,
> > +will be done by C code in @code{foreign_proc} pragmas written by the user.
> > +(Each trail entry consists of the address of a C function to call,
> > +and an argument to invoke that function with.)
> > +
> > +This grade modifier is compatible only with base grades that target C.
> > +Each trail entry consists of the address of a C function to call,
> > +and an argument to invoke that function with.
> 
> That's true for function trailing, not value trailing.

I made that just an example, and moved it the previous paragraph.

> > + at table @code
> > + at item .gc
> > +Compiling programs in a grade that includes the @code{.gc} grade modifier
> > +generates executables that use the standard Mercury garbage collector,
> > +which is the Boehm-Demers-Weiser conservative collector for C.
> > +
> > +This grade modifier is relevant only for LLDS base grades,
> > +and is compatible only with them.
> 
> No, it's also relevant for the MLDS C grades.

That was cut-and-paste :-)

I followed all your suggestions, though without an install, I cannot
easily check that the xrefs to the reference manual work as intended,
and I don't think installing the user guide on mercurylang.org just now
would be wise :-(

Zoltan.





More information about the reviews mailing list