aboutsummaryrefslogtreecommitdiff
path: root/kernel/uGraph.ml
diff options
context:
space:
mode:
authorMatthieu Sozeau2017-07-20 15:45:17 +0200
committerMatthieu Sozeau2018-07-25 17:56:21 +0200
commitcba9f3fe48817e8e524483fd984ea4938b3dc14f (patch)
tree5ccc7b8297975c777e48d69c9918b0cb91fb9d19 /kernel/uGraph.ml
parent9b6ce4f1848c546d0d361aa1089fa2907ca4c9ad (diff)
kernel: missing check that all universes are declared.
Keep the universe_levels_of_constr function inside typeops, not exported.
Diffstat (limited to 'kernel/uGraph.ml')
-rw-r--r--kernel/uGraph.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/uGraph.ml b/kernel/uGraph.ml
index bc624ba56d..95d71965df 100644
--- a/kernel/uGraph.ml
+++ b/kernel/uGraph.ml
@@ -529,6 +529,11 @@ let add_universe vlev strict g =
let add_universe_unconstrained vlev g =
fst (add_universe_gen vlev g)
+exception UndeclaredLevel of Univ.Level.t
+let check_declared_universes g us =
+ let check l = if not (UMap.mem l g.entries) then raise (UndeclaredLevel l) in
+ Univ.LSet.iter check us
+
exception Found_explanation of explanation
let get_explanation strict u v g =