[m-rev.] for review: assign tvars to prog_vars early

Peter Wang novalazy at gmail.com
Tue Jul 28 12:37:24 AEST 2026


On Mon, 27 Jul 2026 12:57:44 +0200 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> For review by Peter.
> 
> Zoltan.

> Assign tvars to prog_vars *before* their coerce check.
> 
> compiler/typecheck_coerce.m:
>     If a prog_var that occurs in a coerce operation is initially
>     unknown to the typechecker, assign it its own type var *before*
>     we start typechecking the coerce operation, not after, since
>     this leads to simpler (and shorter) code.
> 
> compiler/type_assign.m:
>     Change the definition of the associated coerce_fail as required
>     by the new code in typecheck_coerce.m.
> 
> compiler/typecheck_errors.m:
>     Conform to the change in type_assign.m.

That's fine.

Peter


More information about the reviews mailing list