From 0aec9033a0b78ee1629f7aabce1c8a2e3cfbe619 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Wed, 12 Oct 2016 16:18:02 +0200 Subject: sections/hints: prevent Not_found in get_type_of due to cleared/reverted section variables. This fixes the get_type_of but requires keeping information around about the section hyps available in goals during resolution. It's optimized for the non-section case (should incur no cost there), and the case where no section variables are cleared. --- engine/termops.ml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engine/termops.ml') diff --git a/engine/termops.ml b/engine/termops.ml index 17e56ec31e..35cacc65b2 100644 --- a/engine/termops.ml +++ b/engine/termops.ml @@ -599,6 +599,10 @@ let collect_vars c = | _ -> fold_constr aux vars c in aux Id.Set.empty c +let vars_of_global_reference env gr = + let c, _ = Universes.unsafe_constr_of_global gr in + vars_of_global (Global.env ()) c + (* Tests whether [m] is a subterm of [t]: [m] is appropriately lifted through abstractions of [t] *) -- cgit v1.2.3