diff options
| -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 |
