diff options
-rw-r--r-- | library/declaremods.ml | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml index 53f9617c5..68ce86b3a 100644 --- a/library/declaremods.ml +++ b/library/declaremods.ml @@ -923,12 +923,10 @@ let iter_all_segments f = let _ = MPmap.iter (fun _ (prefix,objects) -> - let apply_obj (id,obj) = match object_tag obj with + let rec apply_obj (id,obj) = match object_tag obj with | "INCLUDE" -> - let (_,(_,mp,objs)) = out_include obj in - let apply_include (id,obj) = - f (make_oname prefix id) obj in - List.iter apply_include objs + let (_,(_,_,objs)) = out_include obj in + List.iter apply_obj objs | _ -> f (make_oname prefix id) obj in List.iter apply_obj objects) |