[m-rev.] for review: carve three modules out of polymorphism.m
Julien Fischer
jfischer at opturion.com
Mon Mar 22 20:17:23 AEDT 2021
On Mon, 22 Mar 2021, Zoltan Somogyi wrote:
> For review by anyone.
>
> Carve three new modules out of polymorphism.m.
...
> %---------------------------------------------------------------------------%
> :- end_module check_hlds.polymorphism.
> diff --git a/compiler/polymorphism_info.m b/compiler/polymorphism_info.m
> index e69de29bb..e2c3722eb 100644
> --- a/compiler/polymorphism_info.m
> +++ b/compiler/polymorphism_info.m
...
> +:- type poly_info
> + ---> poly_info(
> + poly_module_info :: module_info,
> +
> + poly_varset :: prog_varset,
> + poly_vartypes :: vartypes,
> + poly_rtti_varmaps :: rtti_varmaps,
> +
> + poly_typevarset :: tvarset,
> + poly_tvar_kind_map :: tvar_kind_map,
> +
> + % Specifies why each constraint that was eliminated from the
> + % pred was able to be eliminated (this allows us to efficiently
> + % construct the dictionary).
> + % Note that the rtti_varmaps is separate from the
> + % constraint_proof_map, since the second is the information
> + % calculated by typecheck.m, while the first is the information
> + % calculated here in polymorphism.m.
That last bit probably needs to be updated.
> + poly_proof_map :: constraint_proof_map,
> +
> + % Specifies the constraints at each location in the goal.
> + poly_constraint_map :: constraint_map,
> +
...
> diff --git a/compiler/polymorphism_type_info.m b/compiler/polymorphism_type_info.m
> index e69de29bb..3abc8d0cf 100644
> --- a/compiler/polymorphism_type_info.m
> +++ b/compiler/polymorphism_type_info.m
...
> +:- pred polymorphism_make_type_info_var(mer_type::in, term.context::in,
> + prog_var::out, list(hlds_goal)::out, poly_info::in, poly_info::out) is det.
> +
> + % Given a list of types, create a list of variables to hold the type_info
s/type_info/type_infos/
> + % for those types, and create a list of goals to initialize those type_info
> + % variables to the appropriate type_info structures for the types.
> + % Update the varset and vartypes accordingly.
> + %
> +:- pred polymorphism_make_type_info_vars(list(mer_type)::in, term.context::in,
> + list(prog_var)::out, list(hlds_goal)::out, poly_info::in, poly_info::out)
> + is det.
That looks ok otherwise.
Julien.
More information about the reviews
mailing list