| 1 |
Module Type T. Parameter Inline(50) t : Type. End T. |
| 2 |
|
| 3 |
Module Type F (X : T). Parameter p : X.t. End F. |
| 4 |
|
| 5 |
Module M. Definition t := nat. End M. |
| 6 |
|
| 7 |
Set Inline Level 49. |
| 8 |
|
| 9 |
Module G |
| 10 |
(X : F M [inline at level 49]) |
| 11 |
(Y : F M [inline at level 50]) |
| 12 |
(Z : F M) : F M [inline at level 50]. |
| 13 |
|
| 14 |
(* M.t should not be inlined in the type of X.p, because 49 < 50 *) |
| 15 |
Goal X.p = X.p. |
| 16 |
match goal with |- _ = _ :> M.t => idtac | _ => fail end. |
| 17 |
Fail match goal with |- _ = _ :> nat => idtac | _ => fail end. |
| 18 |
Abort. |
| 19 |
|
| 20 |
(* M.t should be inlined in the type of Y.p, because 50 >= 50 *) |
| 21 |
Goal Y.p = Y.p. |
| 22 |
Fail match goal with |- _ = _ :> M.t => idtac | _ => fail end. |
| 23 |
match goal with |- _ = _ :> nat => idtac | _ => fail end. |
| 24 |
Abort. |
| 25 |
|
| 26 |
(* M.t should not be inlined in the type of Z.p, because default level < 50 *) |
| 27 |
Goal Z.p = Z.p. |
| 28 |
match goal with |- _ = _ :> M.t => idtac | _ => fail end. |
| 29 |
Fail match goal with |- _ = _ :> nat => idtac | _ => fail end. |
| 30 |
Abort. |
| 31 |
|
| 32 |
Definition p := X.p. |
| 33 |
End G. |
| 34 |
|
| 35 |
Module N. Definition p := 0. End N. |
| 36 |
|
| 37 |
Module P := G N N N. |
| 38 |
|
| 39 |
(* M.t should be inlined in the type of P.p, because 50 >= 50 *) |
| 40 |
Goal P.p = P.p. |
| 41 |
Fail match goal with |- _ = _ :> M.t => idtac | _ => fail end. |
| 42 |
match goal with |- _ = _ :> nat => idtac | _ => fail end. |
| 43 |
Abort. |
| 44 |
|
| 45 |
Set Inline Level 50. |
| 46 |
|
| 47 |
Module G' |
| 48 |
(X : F M [inline at level 49]) |
| 49 |
(Y : F M [inline at level 50]) |
| 50 |
(Z : F M) : F M [inline at level 49]. |
| 51 |
|
| 52 |
(* M.t should be inlined in the type of Z.p, because default level >= 50 *) |
| 53 |
Goal Z.p = Z.p. |
| 54 |
Fail match goal with |- _ = _ :> M.t => idtac | _ => fail end. |
| 55 |
match goal with |- _ = _ :> nat => idtac | _ => fail end. |
| 56 |
Abort. |
| 57 |
|
| 58 |
Definition p := X.p. |
| 59 |
End G'. |
| 60 |
|
| 61 |
Module P' := G' N N N. |
| 62 |
|
| 63 |
(* M.t should not be inlined in the type of P'.p, because 49 < 50 *) |
| 64 |
Goal P'.p = P'.p. |
| 65 |
match goal with |- _ = _ :> M.t => idtac | _ => fail end. |
| 66 |
Fail match goal with |- _ = _ :> nat => idtac | _ => fail end. |
| 67 |
Abort. |
| 68 |
|
| 69 |
Set Inline Level 50. |
| 70 |
|
| 71 |
Module G'' |
| 72 |
(X : F M [inline at level 49]) |
| 73 |
(Y : F M [inline at level 50]) |
| 74 |
(Z : F M) : F M. |
| 75 |
Definition p := X.p. |
| 76 |
End G''. |
| 77 |
|
| 78 |
Module P'' := G'' N N N. |
| 79 |
|
| 80 |
(* M.t should not be inlined in the type of P''.p, because default level >= 50 *) |
| 81 |
Goal P''.p = P''.p. |
| 82 |
Fail match goal with |- _ = _ :> M.t => idtac | _ => fail end. |
| 83 |
match goal with |- _ = _ :> nat => idtac | _ => fail end. |
| 84 |
Abort. |
| 85 |
|
| 86 |
Set Inline Level 49. |
| 87 |
|
| 88 |
Module G''' |
| 89 |
(X : F M [inline at level 49]) |
| 90 |
(Y : F M [inline at level 50]) |
| 91 |
(Z : F M) : F M. |
| 92 |
Definition p := X.p. |
| 93 |
End G'''. |
| 94 |
|
| 95 |
Module P''' := G''' N N N. |
| 96 |
|
| 97 |
(* M.t should not be inlined in the type of P'.p, because default level < 50 *) |
| 98 |
Goal P'''.p = P'''.p. |
| 99 |
match goal with |- _ = _ :> M.t => idtac | _ => fail end. |
| 100 |
Fail match goal with |- _ = _ :> nat => idtac | _ => fail end. |
| 101 |
Abort. |