diff options
author | Son Ho | 2021-12-17 16:31:59 +0100 |
---|---|---|
committer | Son Ho | 2021-12-17 16:31:59 +0100 |
commit | 644f91b355de4c80b882625e476cc5ee6b86d696 (patch) | |
tree | 6418924791ccca24a7e0fa9856358c420a6029ca /src | |
parent | 46fd662af66ef9b536a3a06cb38a18468f1f33d2 (diff) |
Rename some functions
Diffstat (limited to '')
-rw-r--r-- | src/Interpreter.ml | 2 | ||||
-rw-r--r-- | src/Substitute.ml | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Interpreter.ml b/src/Interpreter.ml index 5c57a9af..b3fcc9f5 100644 --- a/src/Interpreter.ml +++ b/src/Interpreter.ml @@ -1888,7 +1888,7 @@ let compute_expanded_bottom_adt_value (tyctx : T.type_def list) assert (List.length regions = List.length def.T.region_params); (* Compute the field types *) let field_types = - Subst.type_def_get_instantiated_field_etype def opt_variant_id types + Subst.type_def_get_instantiated_field_etypes def opt_variant_id types in (* Initialize the expanded value *) let fields = diff --git a/src/Substitute.ml b/src/Substitute.ml index c1903c71..42372c25 100644 --- a/src/Substitute.ml +++ b/src/Substitute.ml @@ -70,7 +70,7 @@ let make_type_subst (var_ids : T.TypeVarId.id list) (tys : 'r T.ty list) : (** Instantiate the type variables in an ADT definition, and return the list of types of the fields for the chosen variant *) -let type_def_get_instantiated_field_rtype (def : T.type_def) +let type_def_get_instantiated_field_rtypes (def : T.type_def) (opt_variant_id : T.VariantId.id option) (regions : T.RegionId.id T.region list) (types : T.rty list) : T.rty list = let r_subst = @@ -90,11 +90,11 @@ let ctx_adt_get_instantiated_field_rtypes (ctx : C.eval_ctx) (def_id : T.TypeDefId.id) (opt_variant_id : T.VariantId.id option) (regions : T.RegionId.id T.region list) (types : T.rty list) : T.rty list = let def = C.ctx_lookup_type_def ctx def_id in - type_def_get_instantiated_field_rtype def opt_variant_id regions types + type_def_get_instantiated_field_rtypes def opt_variant_id regions types (** Instantiate the type variables in an ADT definition, and return the list of types of the fields for the chosen variant *) -let type_def_get_instantiated_field_etype (def : T.type_def) +let type_def_get_instantiated_field_etypes (def : T.type_def) (opt_variant_id : T.VariantId.id option) (types : T.ety list) : T.ety list = let ty_subst = make_type_subst (List.map (fun x -> x.T.index) def.T.type_params) types @@ -110,7 +110,7 @@ let ctx_adt_get_instantiated_field_etypes (ctx : C.eval_ctx) (def_id : T.TypeDefId.id) (opt_variant_id : T.VariantId.id option) (types : T.ety list) : T.ety list = let def = C.ctx_lookup_type_def ctx def_id in - type_def_get_instantiated_field_etype def opt_variant_id types + type_def_get_instantiated_field_etypes def opt_variant_id types (** Apply a type substitution to a place *) let place_substitute (_tsubst : T.TypeVarId.id -> T.ety) (p : E.place) : E.place |