[m-rev.] for post-commit review: clarify the handling of errors in var-functor unifications

Julien Fischer jfischer at opturion.com
Mon Jan 6 02:09:08 AEDT 2025


On Sun, 5 Jan 2025 at 11:38, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:

> Clarify handling var-functor unification errors.
>
> compiler/typecheck_unify_var_functor.m:
>     Instead of the typechecking of var-functor unifications returning
>     a list of cons_type_infos and a list of cons_errors independently,
>     wrap them up in one of four function symbols of a new result type.
>     This type expresses the invariants of the relationship between
>     the emptyness/nonemptyness of those lists and what kind of cons_id
>     the functor is. Specifically, it allows us to express the fact that
>     only du_data_ctor cons_ids can have a nonempty list of errors.
>
> compiler/typecheck_error_undef.m:
>     Provide separate predicates for reporting undefined
>
>     - cons_ids that are du_data_ctors, and
>     - cons_ids that are not du_data_ctors,
>
>     since they are handled completely differently.

That's fine.

Julien.


More information about the reviews mailing list