diff options
author | Matthieu Sozeau <mattam@mattam.org> | 2018-03-08 07:23:03 -0300 |
---|---|---|
committer | Matthieu Sozeau <mattam@mattam.org> | 2018-03-08 07:40:27 -0300 |
commit | ce87e338529f4dd174f1c870b83162bac6d2b9ae (patch) | |
tree | e6c3209639b0057fe1456cf9a8704e0990f1417c /pretyping/evarconv.ml | |
parent | d3f88e4e3aaf346f88801737c9145fe114f4942b (diff) |
Leave cumul constructor universes as is during unif
if we cannot coerce one constructor type to the other. By invariant
they have a common supertype
Diffstat (limited to 'pretyping/evarconv.ml')
-rw-r--r-- | pretyping/evarconv.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pretyping/evarconv.ml b/pretyping/evarconv.ml index 3c8acb1a7..fe2e86a48 100644 --- a/pretyping/evarconv.ml +++ b/pretyping/evarconv.ml @@ -532,12 +532,13 @@ and evar_eqappr_x ?(rhs_is_already_stuck = false) ts env evd pbty begin (** Both constructors should be liftable to the same supertype at which we compare them, but we don't have access to that type in - untyped unification. We hence enforce that one is lower than the other. - Note the criterion is more relaxed in conversion. *) + untyped unification. We hence try to enforce that one is lower + than the other, also unifying more universes in the process. + If this fails we just leave the universes as is, as in conversion. *) try Success (check_leq_inductives evd cumi u u') with Univ.UniverseInconsistency _ -> try Success (check_leq_inductives evd cumi u' u) - with Univ.UniverseInconsistency e -> UnifFailure (evd, UnifUnivInconsistency e) + with Univ.UniverseInconsistency e -> Success evd end end in |