[m-rev.] for post-commit review: document requirement for non-abstract instances in interfaces
Julien Fischer
jfischer at opturion.com
Thu Feb 3 13:45:05 AEDT 2022
On Thu, 3 Feb 2022, Zoltan Somogyi wrote:
>>> + words("is to move this instance declaration"),
>>> + words("to the implementation section,"),
>>> + words("replacing it in the interface section"),
>>> + words("with its abstract version, which contains"),
>>> + words("just the class name and the instance type vector."), nl],
>>
>> In the case where there are type class constraints on the instance declaration,
>> they also need to be replicated in the abstract declaration.
>
> I will reword what I added to take that into account, but section 10.4 does NOT
> mention this point (neither does it deny it), and does not give an example
> either.
That's because type class constraints on instances have not been
discussed at all at that point. However, section 10.7 says:
For abstract instance declarations, the type class constraints on an
abstract instance declaration must exactly match the type class
constraints on the corresponding non-abstract instance declaration that
defines that instance.
Julien.
More information about the reviews
mailing list