[m-rev.] for review: delete obsolete procedures from string module

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Apr 13 20:21:12 AEST 2022


2022-04-13 18:10 GMT+10:00 "Peter Wang" <novalazy at gmail.com>:
>> One: make this new warning conditional on a new option, and disable this option
>> in modules where the new warning would cause compilation to fail through
>> --halt-at-warn. This would disable the warning in some of the modules where
>> we could benefit from it, such as string.m itself.
>> 
>> Two: delete the modes from clauses for predicates with foreign_procs.
>> 
>> Three: do not generate the warning for predicates that also have foreign_procs.
>> This cannot be done with the current architecture of make_hlds, because we add
>> all clauses before we add any foreign_procs.
>> 
>> Four: the status quo, with no new warning at all.
>> 
>> I prefer two. Opinions?
> 
> I agree with two.
> 
> Since this is a style warning, there should be an option to turn it off,
> implied by --inhibit-style-warnings.

The attached diff does this. For review by anyone. The diff includes
a new test case, but since it turns out that an existing test also gets
the new warning, I don't think we need it. Does anyone else?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.rmsc
Type: application/octet-stream
Size: 847 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220413/28f5bbd7/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.rmsc
Type: application/octet-stream
Size: 14805 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220413/28f5bbd7/attachment-0003.obj>


More information about the reviews mailing list