aboutsummaryrefslogtreecommitdiffhomepage
path: root/engine
diff options
context:
space:
mode:
authorGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-12-01 15:26:08 +0100
committerGravatar Gaëtan Gilbert <gaetan.gilbert@skyskimmer.net>2017-12-01 15:26:08 +0100
commit8acf32377b67c08568215a89c31cdc382883dbf6 (patch)
tree89d6762efd6c0587c1068afa8311f639f485abea /engine
parent0048cbe810c82a775558c14cd7fcae644e205c51 (diff)
Fix #6297: handle constraints like (u+1 <= Set/Prop)
Diffstat (limited to 'engine')
-rw-r--r--engine/uState.ml20
1 files changed, 12 insertions, 8 deletions
diff --git a/engine/uState.ml b/engine/uState.ml
index 4e30640e4..49da2f7b4 100644
--- a/engine/uState.ml
+++ b/engine/uState.ml
@@ -197,14 +197,18 @@ let process_universe_constraints ctx cstrs =
| None -> user_err Pp.(str "Algebraic universe on the right")
| Some r' ->
if Univ.Level.is_small r' then
- let levels = Univ.Universe.levels l in
- let fold l' local =
- let l = Univ.Universe.make l' in
- if Univ.Level.is_small l' || is_local l' then
- equalize_variables false l l' r r' local
- else raise (Univ.UniverseInconsistency (Univ.Le, l, r, None))
- in
- Univ.LSet.fold fold levels local
+ if not (Univ.Universe.is_levels l)
+ then
+ raise (Univ.UniverseInconsistency (Univ.Le, l, r, None))
+ else
+ let levels = Univ.Universe.levels l in
+ let fold l' local =
+ let l = Univ.Universe.make l' in
+ if Univ.Level.is_small l' || is_local l' then
+ equalize_variables false l l' r r' local
+ else raise (Univ.UniverseInconsistency (Univ.Le, l, r, None))
+ in
+ Univ.LSet.fold fold levels local
else
Univ.enforce_leq l r local
end