[m-rev.] for review: add "did you mean" reminders for mistyped predicate names

Julien Fischer jfischer at opturion.com
Tue Sep 26 12:34:13 AEST 2023



On Tue, 26 Sep 2023, Zoltan Somogyi wrote:

>
> On 2023-09-26 01:27 +10:00 AEST, "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>>> I don't think mixing module qualifiers has ever worked. We should
>>> consider dropping support for __ as a module qualifier.
>>
>> And here I am just now bootchecking a possible fix that would allow
>> such mixing to take place, after my curiosity got too strong about why
>> the mixing didn't work.
>>
>> That diff also deletes support for ":" as a module qualifier, which hasn't been
>> allowed by the manual for ages ...
>
> This diff is attached, for post-commit review by anyone.

...

> Allow module qualification using mixed operators ...
> 
> ... such as a__b.c__d.
> 
> compiler/parse_sym_name.m:
>     Allow the operands of terms module qualified with "." to contain
>     terms module qualified with "__".
>
>     Stop allowing ":" as a module qualifier.

It's remarkable how support for ":" as a module qualifier has managed
to stick around, despite ostensibly being removed over a decade ago :-(

> compiler/parse_dcg_goal.m:
> compiler/parse_goal.m:
>     Make the code parsing DCG and non-DCG goals as similar as possible.
> 
> tests/invalid/qual_basic_test2.err_exp:
>     Expect "io.io__write_string" to be parsed as "io.io.write_string".
> 
> tests/invalid_make_int/test_nested_helper_1.test_nested_helper_3.m:
> tests/invalid_make_int/test_nested_helper_1.test_nested_helper_4.m:
> tests/invalid_make_int/test_nested_helper_2.test_nested_helper_6.m:
> tests/invalid_submodules/nested_impl_in_int.m:
>     Stop using ":" as module qualifier.

That's fine.  As I mentioned in another mail, I think would should move towards
dropping support for "__" as a module qualifier. The only reason I can see for
retaining it is for compatibility with very old code, examples in papers etc.

(This would need to be done over the course of a few release; the first
step would simply to announce its deprecation in the NEWs for the next release.

Julien.


More information about the reviews mailing list