summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--compiler/Translate.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/Translate.ml b/compiler/Translate.ml
index 0f6aa7c1..60ae99f9 100644
--- a/compiler/Translate.ml
+++ b/compiler/Translate.ml
@@ -417,9 +417,12 @@ let export_types_group (fmt : Format.formatter) (config : gen_config)
else ExtractBase.MutRecInner
in
- (* Retrieve the declarations *)
+ (* Retrieve the declarations - note that some of them might have been ignored in
+ case of errors *)
let defs =
- List.map (fun id -> Pure.TypeDeclId.Map.find id ctx.trans_types) ids
+ List.filter_map
+ (fun id -> Pure.TypeDeclId.Map.find_opt id ctx.trans_types)
+ ids
in
(* Check if the definition are builtin - if yes they must be ignored.