let context,te = split_prods ~subst tys leftno te in
let con_sort = typeof ~subst ~metasenv context te in
(match R.whd ~subst context con_sort, R.whd ~subst [] ty_sort with
- C.Sort (C.Type u1), C.Sort (C.Type u2) ->
+ (C.Sort (C.Type u1) as s1), (C.Sort (C.Type u2) as s2) ->
if not (E.universe_leq u1 u2) then
raise
(TypeCheckerFailure
- (lazy ("The type of the constructor is not included in " ^
- "the inductive type sort")))
+ (lazy ("The type " ^ PP.ppterm ~metasenv ~subst ~context s1^
+ " of the constructor is not included in the inductive" ^
+ " type sort " ^ PP.ppterm ~metasenv ~subst ~context s2)))
| C.Sort _, C.Sort C.Prop
| C.Sort C.CProp, C.Sort C.CProp
| C.Sort _, C.Sort C.Type _ -> ()