ae01d3818d
The parser had a nasty ambiguity. For example, f Type 1 had two possible interpretations (f (Type) (1)) or (f (Type 1)) To fix this issue, whenever we want to specify a particular universe, we have to precede 'Type' with a parenthesis. Examples: (Type 1) (Type U) (Type M + 1) Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
22 lines
No EOL
512 B
Text
22 lines
No EOL
512 B
Text
|
|
|
|
|
|
Definition id (A : Type) : (Type U) := A.
|
|
Variable p : (Int -> Int) -> Bool.
|
|
Check fun (x : id Int), x.
|
|
Variable f : (id Int) -> (id Int).
|
|
Check p f.
|
|
|
|
Definition c (A : (Type 3)) : (Type 3) := (Type 1).
|
|
Variable g : (c (Type 2)) -> Bool.
|
|
Variable a : (c (Type 1)).
|
|
Check g a.
|
|
|
|
Definition c2 {T : Type} (A : (Type 3)) (a : T) : (Type 3) := (Type 1)
|
|
Variable b : Int
|
|
Check c2::explicit
|
|
Variable g2 : (c2 (Type 2) b) -> Bool
|
|
Check g2
|
|
Variable a2 : (c2 (Type 1) b).
|
|
Check g2 a2
|
|
Check fun x : (c2 (Type 1) b), g2 x |