diff options
| author | Gaëtan Gilbert | 2018-11-12 12:55:46 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2018-12-05 13:20:58 +0100 |
| commit | 470943bdf917caf352b5347c8d33fc39699805b0 (patch) | |
| tree | 02407cc74a5ffe2aa184ebcddb4ea6ab2ea1f920 /pretyping/classops.ml | |
| parent | 23f2222bb2c97110b6e55835fd19528177e41ff3 (diff) | |
Fix mod_subst wrt universe polymorphism
Diffstat (limited to 'pretyping/classops.ml')
| -rw-r--r-- | pretyping/classops.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pretyping/classops.ml b/pretyping/classops.ml index f18040accb..306a76e35e 100644 --- a/pretyping/classops.ml +++ b/pretyping/classops.ml @@ -192,9 +192,11 @@ let subst_cl_typ subst ct = match ct with let c' = subst_proj_repr subst c in if c' == c then ct else CL_PROJ c' | CL_CONST c -> - let c',t = subst_con_kn subst c in - if c' == c then ct else - pi1 (find_class_type Evd.empty (EConstr.of_constr t)) + let c',t = subst_con subst c in + if c' == c then ct else (match t with + | None -> CL_CONST c' + | Some t -> + pi1 (find_class_type Evd.empty (EConstr.of_constr t.Univ.univ_abstracted_value))) | CL_IND i -> let i' = subst_ind subst i in if i' == i then ct else CL_IND i' |
