| 1 |
Module Short. |
| 2 |
Set Universe Polymorphism. |
| 3 |
Inductive relevant (A : Type) (B : Type) : Prop := . |
| 4 |
Section foo. |
| 5 |
Variables A B : Type. |
| 6 |
Definition foo := prod (relevant A B) A. |
| 7 |
End foo. |
| 8 |
|
| 9 |
Section bar. |
| 10 |
Variable A : Type. |
| 11 |
Variable B : Type. |
| 12 |
Definition bar := prod (relevant A B) A. |
| 13 |
End bar. |
| 14 |
|
| 15 |
Set Printing Universes. |
| 16 |
Check bar nat Set : Set. (* success *) |
| 17 |
Check foo nat Set : Set. (* Toplevel input, characters 6-17: |
| 18 |
Error: |
| 19 |
The term "foo (* Top.303 Top.304 *) nat Set" has type |
| 20 |
"Type (* Top.304 *)" while it is expected to have type |
| 21 |
"Set" (Universe inconsistency: Cannot enforce Top.304 = Set because Set |
| 22 |
< Top.304)). *) |
| 23 |
End Short. |