aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/lib.ml
diff options
context:
space:
mode:
Diffstat (limited to 'library/lib.ml')
-rw-r--r--library/lib.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/lib.ml b/library/lib.ml
index f580050db..23a2d4846 100644
--- a/library/lib.ml
+++ b/library/lib.ml
@@ -483,6 +483,12 @@ let section_segment_of_constant con =
let section_segment_of_mutual_inductive kn =
Names.Mindmap.find kn (snd (pi3 (List.hd !sectab)))
+let variable_section_segment_of_reference = function
+ | ConstRef con -> pi1 (section_segment_of_constant con)
+ | IndRef (kn,_) | ConstructRef ((kn,_),_) ->
+ pi1 (section_segment_of_mutual_inductive kn)
+ | _ -> []
+
let section_instance = function
| VarRef id ->
let eq = function