summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/CfimOfJson.ml4
-rw-r--r--src/Modules.ml1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/CfimOfJson.ml b/src/CfimOfJson.ml
index dddfbd58..82f9d95a 100644
--- a/src/CfimOfJson.ml
+++ b/src/CfimOfJson.ml
@@ -632,14 +632,16 @@ let cfim_module_of_json (js : json) : (M.cfim_module, string) result =
(match js with
| `Assoc
[
+ ("name", name);
("declarations", declarations);
("types", types);
("functions", functions);
] ->
+ let* name = string_of_json name in
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
- Ok { M.declarations; types; functions }
+ Ok { M.name; declarations; types; functions }
| _ -> Error "")
diff --git a/src/Modules.ml b/src/Modules.ml
index ef4998ec..1199d74a 100644
--- a/src/Modules.ml
+++ b/src/Modules.ml
@@ -15,6 +15,7 @@ type declaration_group =
[@@deriving show]
type cfim_module = {
+ name : string;
declarations : declaration_group list;
types : type_def list;
functions : fun_def list;