diff options
| author | herbelin | 2002-02-12 09:28:00 +0000 |
|---|---|---|
| committer | herbelin | 2002-02-12 09:28:00 +0000 |
| commit | e44c3268a30669522422a13c0c8acc485bc8f331 (patch) | |
| tree | d78797c12e77ca91d32b9f8e8b79610e4b711518 | |
| parent | e9100d33377eb2bb958ecba6049c6a46f4e9db7f (diff) | |
Ajout library_part
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2467 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | library/declare.ml | 4 | ||||
| -rw-r--r-- | library/declare.mli | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/library/declare.ml b/library/declare.ml index 2b86f8954b..5c2ab71820 100644 --- a/library/declare.ml +++ b/library/declare.ml @@ -385,3 +385,7 @@ let strength_of_global = function | ConstRef sp -> constant_strength sp | VarRef id -> variable_strength id | IndRef _ | ConstructRef _ -> NeverDischarge + +let library_part sp = + let dir,_ = repr_path sp in + extract_dirpath_prefix (depth_of_strength (constant_strength sp)) dir diff --git a/library/declare.mli b/library/declare.mli index e8da45a57b..fd0ec9ff70 100644 --- a/library/declare.mli +++ b/library/declare.mli @@ -100,3 +100,5 @@ val construct_reference : Environ.env -> identifier -> constr val is_global : identifier -> bool val strength_of_global : global_reference -> strength + +val library_part : section_path -> dir_path |
