[m-rev.] for review: pragma format_call

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Sep 20 15:57:26 AEST 2022


For review by anyone.

I have not made any changes to the reference manual since addressing
the review of its diff.

This diff has a ZZZ in add_pragma.m, on code that checks the status
of the new pragma the same way that we check the status of other
declarative pragmas: we generate an error if the predicate (or function)
to which the pragma applies is exported, but the pragma itself is not exported.

I think this test is wrong. We should generate an error in the *opposite*
case: the pragma is exported, but the pred/func it applies to is not exported.
The case when the pred/func is exported but the declarative pragma is not
exported should merit only a warning, because the other modules that
import that pred/func can survive without knowing that e.g. that pred/func
is obsolete, or that calls to it can be checked the same way as calls to e.g.
string.format.

Opinions?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.pfc
Type: application/octet-stream
Size: 3925 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220920/e7912756/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.pfc
Type: application/octet-stream
Size: 149301 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220920/e7912756/attachment-0003.obj>


More information about the reviews mailing list