[m-rev.] for review: prepare for two new warnings on instances
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sat Mar 19 12:50:02 AEDT 2022
This arises from discussion on m-rev about two weeks ago,
in the thread on deleting see/seen/tell/told.
This diff is step 1 of 3 in adding the new warnings.
Step 2 would reorganize the code of check_typeclass.m so that
all checks on instances that look only at instances that
belong the same typeclass (which is most checks) are done
as part of the check_for_missing_instances predicate
that this diff updates. (The predicate would then be renamed,
of course.) This is for two reasons. First, the new code
computes an overall view of each instance, which allows us
to generate more precise error messages if needed.
Second, it would avoid redundant traversals of the
instance table. This reorganization would also delete
from the instance table all abstract instances which have
a concrete instance, which will make lookups in the instance
table faster for later passes. (This would be done after all
checks that need those abstract instances, of course.)
Step 3 would then add the new warnings.
Step 2 would be a separate diff because it would just
move code around, with step 1 and 3 being the ones
that need review.
Note that this diff includes a diff to options.m that is
intended to be part of step 3, not step 1, and won't be
committed with step 1. It is included so we can decide now
which of two variants of an option we want.
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.instance1
Type: application/octet-stream
Size: 2982 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220319/499224cc/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.instance1
Type: application/octet-stream
Size: 83007 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20220319/499224cc/attachment-0003.obj>
More information about the reviews
mailing list