aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorGaëtan Gilbert2018-10-10 14:20:51 +0200
committerGaëtan Gilbert2018-10-16 15:52:53 +0200
commit44ecd58e9ab5fb0f2c45e9eec76440f84995825c (patch)
tree5ce39ab09db09194d5a28ee48cd4a7ee7643b4fc /engine
parente99b4c66cf38bb5b6ccb76b69ebd7e7a44ed295d (diff)
{Univops -> Vars}.universes_of_constr
It's basically an occur check so it makes sense to put it in vars
Diffstat (limited to 'engine')
-rw-r--r--engine/univops.ml14
-rw-r--r--engine/univops.mli1
2 files changed, 2 insertions, 13 deletions
diff --git a/engine/univops.ml b/engine/univops.ml
index 7f9672f828..c933641865 100644
--- a/engine/univops.ml
+++ b/engine/univops.ml
@@ -9,20 +9,8 @@
(************************************************************************)
open Univ
-open Constr
-let universes_of_constr c =
- let rec aux s c =
- match kind c with
- | Const (c, u) ->
- LSet.fold LSet.add (Instance.levels u) s
- | Ind ((mind,_), u) | Construct (((mind,_),_), u) ->
- LSet.fold LSet.add (Instance.levels u) s
- | Sort u when not (Sorts.is_small u) ->
- let u = Sorts.univ_of_sort u in
- LSet.fold LSet.add (Universe.levels u) s
- | _ -> Constr.fold aux s c
- in aux LSet.empty c
+let universes_of_constr = Vars.universes_of_constr
let restrict_universe_context (univs, csts) keep =
let removed = LSet.diff univs keep in
diff --git a/engine/univops.mli b/engine/univops.mli
index 57a53597b9..0ed06bb204 100644
--- a/engine/univops.mli
+++ b/engine/univops.mli
@@ -13,6 +13,7 @@ open Univ
(** Return the set of all universes appearing in [constr]. *)
val universes_of_constr : constr -> LSet.t
+[@@ocaml.deprecated "Use [Vars.universes_of_constr]"]
(** [restrict_universe_context (univs,csts) keep] restricts [univs] to
the universes in [keep]. The constraints [csts] are adjusted so