[m-rev.] for post-commit review: fix github issue #85

Julien Fischer jfischer at opturion.com
Tue Mar 24 17:30:16 AEDT 2020


Hi Zoltan,

On Tue, 24 Mar 2020, Zoltan Somogyi wrote:

> For post-commit review by anyone. The code is mostly straightforward,
> so I am most seeking feedback on the text of the warning, and on the
> changes to the reference manual and NEWS.

...

> Fix "this disjunct can't have solutions" warnings in multimode preds.
> 
> This fixes github issue #85.

...

> diff --git a/NEWS b/NEWS
> index 8f0971f..bd2e2ff 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -203,6 +203,20 @@ Changes to the Mercury compiler
>    that the `--trail-segments` option now has no effect, and it is therefore
>    deprecated.
> 
> +### Changes to warnings
> +
> +* The compiler will now generate a warning about a disjunct that

I would begin that with a reference to the github issue number.

    * [Github issue #85]. The compiler ....

> +  cannot succeed even if the predicate or function in which that
> +  disjunct occurs has other modes in which that disjunct can succeed.
> +
> +  The generation of such warnings can now be disabled by wrapping
> +  the whole disjunction, or a larger goal containing it, in a
> +  disable_warnings scope, like this:

Quote `disable_warnings` there, we want it to emitted as <code> in HTML.

> +
> +        disable_warnings [no_solution_disjunct] (
> +           Goal
> +        )

The rest looks fine.

Julien.


More information about the reviews mailing list