diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-07-17 15:31:38 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-07-17 15:31:38 +0000 |
commit | c8cb2a79223ccb9585d427764e5ca59b1c1f3c67 (patch) | |
tree | bbe174ee5532d13319f829573f6b356836305f3a /library | |
parent | 3d09e39dd423d81c6af3e991d5b282ea8608646b (diff) |
Lib.contents () instead of Lib.contents_after None
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16627 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library')
-rw-r--r-- | library/declaremods.ml | 2 | ||||
-rw-r--r-- | library/lib.ml | 6 | ||||
-rw-r--r-- | library/lib.mli | 10 |
3 files changed, 11 insertions, 7 deletions
diff --git a/library/declaremods.ml b/library/declaremods.ml index a5804eb53..0a5b61656 100644 --- a/library/declaremods.ml +++ b/library/declaremods.ml @@ -920,7 +920,7 @@ let iter_all_segments f = | sp, Leaf o -> f sp o | _ -> () in - List.iter apply_node (Lib.contents_after None) + List.iter apply_node (Lib.contents ()) let debug_print_modtab _ = diff --git a/library/lib.ml b/library/lib.ml index bf4c0a474..47341e675 100644 --- a/library/lib.ml +++ b/library/lib.ml @@ -312,9 +312,9 @@ let end_mod is_type = let end_module () = end_mod false let end_modtype () = end_mod true -let contents_after = function - | None -> !lib_stk - | Some sp -> let (after,_,_) = split_lib sp in after +let contents () = !lib_stk + +let contents_after sp = let (after,_,_) = split_lib sp in after (* Modules. *) diff --git a/library/lib.mli b/library/lib.mli index c9b2047bc..a956ff5d0 100644 --- a/library/lib.mli +++ b/library/lib.mli @@ -63,11 +63,15 @@ val add_leaves : Names.Id.t -> Libobject.obj list -> Libnames.object_name val add_frozen_state : unit -> unit (** {6 ... } *) + +(** The function [contents] gives access to the current entire segment *) + +val contents : unit -> library_segment + (** The function [contents_after] returns the current library segment, - starting from a given section path. If not given, the entire segment - is returned. *) + starting from a given section path. *) -val contents_after : Libnames.object_name option -> library_segment +val contents_after : Libnames.object_name -> library_segment (** {6 Functions relative to current path } *) |