| 1 |
Definition T := Type. |
| 2 |
Definition U := Type. |
| 3 |
|
| 4 |
Module Type MT. |
| 5 |
Parameter t : T. |
| 6 |
End MT. |
| 7 |
|
| 8 |
Module Type MU. |
| 9 |
Parameter t : U. |
| 10 |
End MU. |
| 11 |
|
| 12 |
Module F (E : MT). |
| 13 |
Definition elt :T := E.t. |
| 14 |
End F. |
| 15 |
|
| 16 |
Module G (E : MU). |
| 17 |
Include F E. |
| 18 |
Print Universes. (* U <= T *) |
| 19 |
End G. |
| 20 |
Print Universes. (* Check if constraint is lost *) |
| 21 |
|
| 22 |
Module Mt. |
| 23 |
Definition t := T. |
| 24 |
End Mt. |
| 25 |
|
| 26 |
Fail Module P := G Mt. (* should yield Universe inconsistency *) |
| 27 |
(* ... otherwise the following command will show that T has type T! *) |
| 28 |
(* Eval cbv delta [P.elt Mt.t] in P.elt. *) |
| 29 |
|
| 30 |
|