[m-rev.] for post-commit review: more mode system cleanups

Peter Wang novalazy at gmail.com
Thu Feb 25 10:45:47 AEDT 2021


On Thu, 25 Feb 2021 10:14:22 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> @@ -726,18 +726,18 @@ modecheck_unify_functor(X0, TypeOfX, ConsId0, IsExistConstruction, ArgVars0,
>          % which does use partial instantiation (in a rather horrible way).
>          % This is a hacky solution that gets us most of what we want
>          % with respect to solver types.
> -        not (
> -            inst_is_free(ModuleInfo0, InitInstOfX),
> -            some [InitInstOfArgVar] (
> -                list.member(InitInstOfArgVar, InitInstsOfArgVars),
> -                inst_is_free(ModuleInfo0, InitInstOfArgVar)
> -            ),
> -            some [ArgVar] (
> -                list.member(ArgVar, ArgVars0),
> -                lookup_var_type(VarTypes, ArgVar, ArgType),
> -                type_is_or_may_contain_solver_type(ModuleInfo0, ArgType)
> -            )
> -        ),
> +
> +        % XXX We want to forbid the construction of partially instantiated
> +        % structures involving solver types. We would like to forbid all such
> +        % constructions, but that causes trouble with the current code of
> +        % term_conversion.term_to_univ_special_case, which does use partial
> +        % instantiation (in a rather horrible way).
> +        %
> +        % This is a hacky solution that gets us most of what we want
> +        % with respect to solver types.
> +        %
> +        not would_construct_partial_term_with_solver_type(ModuleInfo0,
> +            VarTypes, ArgVars0, InitInstOfX, InitInstsOfArgVars),

The comment is duplicated.

The rest looks fine.

Peter


More information about the reviews mailing list