summaryrefslogtreecommitdiff
path: root/tools/cmt2annot.ml
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cmt2annot.ml')
-rw-r--r--tools/cmt2annot.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/cmt2annot.ml b/tools/cmt2annot.ml
index bfbac7c4ca..2ddceef7d3 100644
--- a/tools/cmt2annot.ml
+++ b/tools/cmt2annot.ml
@@ -57,7 +57,7 @@ let bind_cases l =
let record_module_binding scope mb =
Stypes.record (Stypes.An_ident
(mb.mb_name.loc,
- mb.mb_name.txt,
+ Option.value mb.mb_name.txt ~default:"_",
Annot.Idef scope))
let rec iterator ~scope rebuild_env =
@@ -106,7 +106,8 @@ let rec iterator ~scope rebuild_env =
bind_cases f
| Texp_letmodule (_, modname, _, _, body ) ->
Stypes.record (Stypes.An_ident
- (modname.loc,modname.txt,Annot.Idef body.exp_loc))
+ (modname.loc,Option.value ~default:"_" modname.txt,
+ Annot.Idef body.exp_loc))
| _ -> ()
end;
Stypes.record (Stypes.Ti_expr exp);