diff options
Diffstat (limited to 'library')
| -rw-r--r-- | library/declaremods.ml | 16 | ||||
| -rw-r--r-- | library/declaremods.mli | 11 |
2 files changed, 5 insertions, 22 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml index 1ac7eb823f..dcda0bf25a 100644 --- a/library/declaremods.ml +++ b/library/declaremods.ml @@ -783,22 +783,6 @@ let declare_module interp_modtype interp_modexpr id args mty_o mexpr_o = (*s Iterators. *) -let fold_all_segments insec f x = - let acc' = - MPmap.fold - (fun _ (prefix,objects) acc -> - let apply_obj acc (id,obj) = f acc (make_oname prefix id) obj in - List.fold_left apply_obj acc objects) - !modtab_objects x - in - let rec apply_node acc = function - | sp, Leaf o -> f acc sp o - | _, ClosedSection (_,_,seg) -> - if insec then List.fold_left apply_node acc seg else acc - | _ -> acc - in - List.fold_left apply_node acc' (Lib.contents_after None) - let iter_all_segments insec f = let _ = MPmap.iter diff --git a/library/declaremods.mli b/library/declaremods.mli index 5fce1fa48c..394f8d65b7 100644 --- a/library/declaremods.mli +++ b/library/declaremods.mli @@ -96,13 +96,12 @@ val really_import_module : module_path -> unit val import_module : bool -> module_path -> unit -(*s [fold_all_segments] and [iter_all_segments] iterate over all - segments, the modules' segments first and then the current - segment. Modules are presented in an arbitrary order. The given - function is applied to all leaves (together with their section - path). The boolean indicates if we must enter closed sections. *) +(*s [iter_all_segments] iterate over all segments, the modules' + segments first and then the current segment. Modules are presented + in an arbitrary order. The given function is applied to all leaves + (together with their section path). The boolean indicates if we + must enter closed sections. *) -val fold_all_segments : bool -> ('a -> object_name -> obj -> 'a) -> 'a -> 'a val iter_all_segments : bool -> (object_name -> obj -> unit) -> unit |
