From 4965fa03bd9cbc37dd6888c7d13c3fba83b2652c Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Wed, 29 Jun 2016 11:28:55 +0200 Subject: Exporting section_segment_of_reference. --- library/lib.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'library/lib.ml') 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 -- cgit v1.2.3