[m-rev.] for post-commit review: enforce mercury_nb_type's invariant

Julien Fischer jfischer at opturion.com
Sun Jul 16 12:47:06 AEST 2023


On Sun, 16 Jul 2023, Zoltan Somogyi wrote:

> Enforce an invariant by using a subtype.
> 
> compiler/prog_type.m:
>     Define a subtype of type_ctor_category, nb_type_ctor_category,
>     that cannot be a (non-dummy) builtin type.
> 
> compiler/mlds.m:
>     Use that new subtype to enforce our invariant that the mercury_nb_type
>     function symbol of the mlds_type type cannot represent a nondummy
>     builtin type.
> 
> compiler/prog_data.m:
>     Add a commented-out subtype of mer_type, which could help enforce
>     the same invariant, if this help were needed.

...

That's fine.

Julien.


More information about the reviews mailing list