aboutsummaryrefslogtreecommitdiff
path: root/engine/eConstr.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2018-03-01 18:28:36 +0100
committerGaëtan Gilbert2018-03-09 16:30:12 +0100
commit2e30531e78519a5b9c3773c2524e4fd4759cc5c8 (patch)
treead7effee5b9ad3904ab84d81e1583d233ae5033a /engine/eConstr.ml
parentd640b676282285d52ac19038d693080e64eb5ea7 (diff)
Delayed weak constraints for cumulative inductive types.
When comparing 2 irrelevant universes [u] and [v] we add a "weak constraint" [UWeak(u,v)] to the UState. Then at minimization time a weak constraint between unrelated universes where one is flexible causes them to be unified.
Diffstat (limited to 'engine/eConstr.ml')
-rw-r--r--engine/eConstr.ml4
1 files changed, 1 insertions, 3 deletions
diff --git a/engine/eConstr.ml b/engine/eConstr.ml
index 0d55b92c2f..3ee0722145 100644
--- a/engine/eConstr.ml
+++ b/engine/eConstr.ml
@@ -570,8 +570,6 @@ let compare_constr sigma cmp c1 c2 =
let cmp nargs c1 c2 = cmp (of_constr c1) (of_constr c2) in
compare_gen kind (fun _ _ -> Univ.Instance.equal) Sorts.equal cmp 0 (unsafe_to_constr c1) (unsafe_to_constr c2)
-let cumul_weak_constraints = ref true
-
let compare_cumulative_instances cv_pb nargs_ok variances u u' cstrs =
let open Universes in
if not nargs_ok then enforce_eq_instances_univs false u u' cstrs
@@ -580,7 +578,7 @@ let compare_cumulative_instances cv_pb nargs_ok variances u u' cstrs =
(fun cstrs v u u' ->
let open Univ.Variance in
match v with
- | Irrelevant -> if !cumul_weak_constraints then Constraints.add (ULub (u,u')) cstrs else cstrs
+ | Irrelevant -> Constraints.add (UWeak (u,u')) cstrs
| Covariant ->
let u = Univ.Universe.make u in
let u' = Univ.Universe.make u' in