diff options
| author | Maxime Dénès | 2018-03-09 10:27:49 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2018-03-09 10:27:49 +0100 |
| commit | d4a4baddad7a58ba84638215d2c4e2d079f4779c (patch) | |
| tree | e6a112f4a25f8e58576cff490f43acedfcae8d5c /pretyping | |
| parent | fd852113ea205720a9394c27989acaac408f7643 (diff) | |
| parent | a7dc1040e4fbd3e996f411f6c0e46e74cae8c93b (diff) | |
Merge PR #6747: Relax conversion of constructors according to the pCuIC model
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/evarconv.ml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pretyping/evarconv.ml b/pretyping/evarconv.ml index 0a63985bf1..fe2e86a482 100644 --- a/pretyping/evarconv.ml +++ b/pretyping/evarconv.ml @@ -530,8 +530,15 @@ and evar_eqappr_x ?(rhs_is_already_stuck = false) ts env evd pbty UnifFailure (evd, NotSameHead) else begin - let evd' = check_leq_inductives evd cumi u u' in - Success (check_leq_inductives evd' cumi u' u) + (** 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 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 -> Success evd end end in |
