aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorMaxime Dénès2016-10-28 15:44:06 +0200
committerMaxime Dénès2016-10-28 15:44:06 +0200
commitd2bb28988b9424620740c34f4475f0205e0a0f73 (patch)
tree28f01f6f84ac25dd8067f0635478b6b8229e72ce /engine
parent3e98d3e4941f5098d743dffa8a032fd623a6a030 (diff)
parent0aec9033a0b78ee1629f7aabce1c8a2e3cfbe619 (diff)
Merge remote-tracking branch 'github/pr/321' into v8.6
Was PR#321: Handling of section variables in hints
Diffstat (limited to 'engine')
-rw-r--r--engine/termops.ml4
-rw-r--r--engine/termops.mli1
2 files changed, 5 insertions, 0 deletions
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] *)
diff --git a/engine/termops.mli b/engine/termops.mli
index 0a7ac1f266..fd8edafbcf 100644
--- a/engine/termops.mli
+++ b/engine/termops.mli
@@ -121,6 +121,7 @@ val dependent_in_decl : constr -> Context.Named.Declaration.t -> bool
val count_occurrences : constr -> constr -> int
val collect_metas : constr -> int list
val collect_vars : constr -> Id.Set.t (** for visible vars only *)
+val vars_of_global_reference : env -> Globnames.global_reference -> Id.Set.t
val occur_term : constr -> constr -> bool (** Synonymous
of dependent
Substitution of metavariables *)