aboutsummaryrefslogtreecommitdiff
path: root/kernel/typeops.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2018-10-17 15:29:47 +0200
committerPierre-Marie Pédrot2018-10-17 15:29:47 +0200
commit15998894ff76b1fa9354085ea0bddae4f8f23ddf (patch)
tree254cc3a53b6aa344f49a10cba32e14acf97d2905 /kernel/typeops.ml
parent063cf49f40511730c8c60c45332e92823ce4c78f (diff)
parent6aa0aa37e19457a8c0c3ad36f7bbead058442344 (diff)
Merge PR #8694: Various cleanups of universe apis
Diffstat (limited to 'kernel/typeops.ml')
-rw-r--r--kernel/typeops.ml15
1 files changed, 1 insertions, 14 deletions
diff --git a/kernel/typeops.ml b/kernel/typeops.ml
index 7456ecea56..164a47dd9a 100644
--- a/kernel/typeops.ml
+++ b/kernel/typeops.ml
@@ -432,21 +432,8 @@ and execute_array env = Array.map (execute env)
(* Derived functions *)
-let universe_levels_of_constr _env 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 check_wellformed_universes env c =
- let univs = universe_levels_of_constr env c in
+ let univs = universes_of_constr c in
try UGraph.check_declared_universes (universes env) univs
with UGraph.UndeclaredLevel u ->
error_undeclared_universe env u