diff options
Diffstat (limited to '')
-rw-r--r-- | src/CfimOfJson.ml | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/CfimOfJson.ml b/src/CfimOfJson.ml index 4c7fc58b..e78b157a 100644 --- a/src/CfimOfJson.ml +++ b/src/CfimOfJson.ml @@ -102,7 +102,7 @@ let type_id_of_json (js : json) : (T.type_id, string) result = combine_error_msgs js "type_id_of_json" (match js with | `Assoc [ ("Adt", id) ] -> - let* id = T.TypeDefId.id_of_json id in + let* id = T.TypeDeclId.id_of_json id in Ok (T.AdtId id) | `String "Tuple" -> Ok T.Tuple | `Assoc [ ("Assumed", aty) ] -> @@ -168,8 +168,8 @@ let variant_of_json (js : json) : (T.variant, string) result = Ok { T.variant_name = name; fields } | _ -> Error "") -let type_def_kind_of_json (js : json) : (T.type_def_kind, string) result = - combine_error_msgs js "type_def_kind_of_json" +let type_decl_kind_of_json (js : json) : (T.type_decl_kind, string) result = + combine_error_msgs js "type_decl_kind_of_json" (match js with | `Assoc [ ("Struct", fields) ] -> let* fields = list_of_json field_of_json fields in @@ -194,8 +194,8 @@ let region_var_groups_of_json (js : json) : (T.region_var_groups, string) result combine_error_msgs js "region_var_group_of_json" (list_of_json region_var_group_of_json js) -let type_def_of_json (js : json) : (T.type_def, string) result = - combine_error_msgs js "type_def_of_json" +let type_decl_of_json (js : json) : (T.type_decl, string) result = + combine_error_msgs js "type_decl_of_json" (match js with | `Assoc [ @@ -206,11 +206,11 @@ let type_def_of_json (js : json) : (T.type_def, string) result = ("regions_hierarchy", regions_hierarchy); ("kind", kind); ] -> - let* def_id = T.TypeDefId.id_of_json def_id in + let* def_id = T.TypeDeclId.id_of_json def_id in let* name = name_of_json name in let* region_params = list_of_json region_var_of_json region_params in let* type_params = list_of_json type_var_of_json type_params in - let* kind = type_def_kind_of_json kind in + let* kind = type_decl_kind_of_json kind in let* regions_hierarchy = region_var_groups_of_json regions_hierarchy in Ok { @@ -317,7 +317,7 @@ let field_proj_kind_of_json (js : json) : (E.field_proj_kind, string) result = combine_error_msgs js "field_proj_kind_of_json" (match js with | `Assoc [ ("ProjAdt", `List [ def_id; opt_variant_id ]) ] -> - let* def_id = T.TypeDefId.id_of_json def_id in + let* def_id = T.TypeDeclId.id_of_json def_id in let* opt_variant_id = option_of_json T.VariantId.id_of_json opt_variant_id in @@ -423,7 +423,7 @@ let aggregate_kind_of_json (js : json) : (E.aggregate_kind, string) result = | `String "AggregatedTuple" -> Ok E.AggregatedTuple | `Assoc [ ("AggregatedAdt", `List [ id; opt_variant_id; regions; tys ]) ] -> - let* id = T.TypeDefId.id_of_json id in + let* id = T.TypeDeclId.id_of_json id in let* opt_variant_id = option_of_json T.VariantId.id_of_json opt_variant_id in @@ -479,7 +479,7 @@ let fun_id_of_json (js : json) : (A.fun_id, string) result = combine_error_msgs js "fun_id_of_json" (match js with | `Assoc [ ("Local", id) ] -> - let* id = A.FunDefId.id_of_json id in + let* id = A.FunDeclId.id_of_json id in Ok (A.Local id) | `Assoc [ ("Assumed", fid) ] -> let* fid = assumed_fun_id_of_json fid in @@ -606,8 +606,8 @@ and switch_targets_of_json (js : json) : (A.switch_targets, string) result = Ok (A.SwitchInt (int_ty, tgts, otherwise)) | _ -> Error "") -let fun_def_of_json (js : json) : (A.fun_def, string) result = - combine_error_msgs js "fun_def_of_json" +let fun_decl_of_json (js : json) : (A.fun_decl, string) result = + combine_error_msgs js "fun_decl_of_json" (match js with | `Assoc [ @@ -618,7 +618,7 @@ let fun_def_of_json (js : json) : (A.fun_def, string) result = ("locals", locals); ("body", body); ] -> - let* def_id = A.FunDefId.id_of_json def_id in + let* def_id = A.FunDeclId.id_of_json def_id in let* name = fun_name_of_json name in let* signature = fun_sig_of_json signature in let* arg_count = int_of_json arg_count in @@ -642,12 +642,12 @@ let g_declaration_group_of_json (id_of_json : json -> ('id, string) result) let type_declaration_group_of_json (js : json) : (M.type_declaration_group, string) result = combine_error_msgs js "type_declaration_group_of_json" - (g_declaration_group_of_json T.TypeDefId.id_of_json js) + (g_declaration_group_of_json T.TypeDeclId.id_of_json js) let fun_declaration_group_of_json (js : json) : (M.fun_declaration_group, string) result = combine_error_msgs js "fun_declaration_group_of_json" - (g_declaration_group_of_json A.FunDefId.id_of_json js) + (g_declaration_group_of_json A.FunDeclId.id_of_json js) let declaration_group_of_json (js : json) : (M.declaration_group, string) result = @@ -675,7 +675,7 @@ let cfim_module_of_json (js : json) : (M.cfim_module, string) result = let* declarations = list_of_json declaration_group_of_json declarations in - let* types = list_of_json type_def_of_json types in - let* functions = list_of_json fun_def_of_json functions in + let* types = list_of_json type_decl_of_json types in + let* functions = list_of_json fun_decl_of_json functions in Ok { M.name; declarations; types; functions } | _ -> Error "") |