Debian Codegraph @

test-suite/output/CantApplyBadType.v

raw
1 Universes u0 u1.
2 Constraint u1 <= u0.
3 Axiom idu1 : Type@{u1} -> Type@{u1}.
4 Universe u.
5 Constraint u = u0.
6
7 (* pretyping error *)
8 Fail Check idu1 Type@{u}.
9 (* The command has indeed failed with message:
10 The term "Type" has type "Type@{u+1}" while it is expected to have type
11 "Type@{u1}" (universe inconsistency: Cannot enforce u < u1 because u1 <= u0 = u).
12 *)
13
14 (* kernel error *)
15 Fail Type ltac:(refine (idu1 _); exact_no_check Type@{u}).
16 (* The command has indeed failed with message:
17 Illegal application:
18 The term "idu1" of type "Type -> Type"
19 cannot be applied to the term
20 "Type" : "Type"
21 This term has type "Type@{u+1}" which should be coercible to
22 "Type@{u1}".
23 *)
24
25 (* typing.ml error *)
26 Goal True.
27 Fail let c := constr:(ltac:(refine (idu1 _); exact_no_check Type@{u})) in
28 let _ := type of c in
29 idtac.
30 (* same as kernel *)
31 Abort.