remove square brackets around type lines
(parens are needed if they are anything other than a `term arg`)
This commit is contained in:
parent
d631b86be3
commit
64de93a13c
7 changed files with 42 additions and 35 deletions
|
@ -228,13 +228,13 @@ tests = "parser" :- [
|
|||
],
|
||||
|
||||
"equality type" :- [
|
||||
parseMatch term "Eq [i ⇒ A] s t"
|
||||
parseMatch term "Eq (i ⇒ A) s t"
|
||||
`(Eq (PV "i" _, V "A" _) (V "s" _) (V "t" _) _),
|
||||
parseMatch term "Eq [i ⇒ A (B @i)] (f x) (g y)"
|
||||
parseMatch term "Eq (i ⇒ A (B @i)) (f x) (g y)"
|
||||
`(Eq (PV "i" _, App (V "A" _) (DApp (V "B" _) (V "i" _) _) _)
|
||||
(App (V "f" _) (V "x" _) _)
|
||||
(App (V "g" _) (V "y" _) _) _),
|
||||
parseMatch term "Eq [A] s t"
|
||||
parseMatch term "Eq A s t"
|
||||
`(Eq (Unused _, V "A" _) (V "s" _) (V "t" _) _),
|
||||
parseMatch term "s ≡ t : A"
|
||||
`(Eq (Unused _, V "A" _) (V "s" _) (V "t" _) _),
|
||||
|
@ -286,33 +286,32 @@ tests = "parser" :- [
|
|||
],
|
||||
|
||||
"coe" :- [
|
||||
parseMatch term "coe [A] @p @q x"
|
||||
parseMatch term "coe A @p @q x"
|
||||
`(Coe (Unused _, V "A" _) (V "p" _) (V "q" _) (V "x" _) _),
|
||||
parseMatch term "coe [i ⇒ A] @p @q x"
|
||||
parseMatch term "coe (i ⇒ A) @p @q x"
|
||||
`(Coe (PV "i" _, V "A" _) (V "p" _) (V "q" _) (V "x" _) _),
|
||||
parseMatch term "coe [A] x"
|
||||
parseMatch term "coe A x"
|
||||
`(Coe (Unused _, V "A" _) (K Zero _) (K One _) (V "x" _) _),
|
||||
parseFails term "coe [A] @p @q",
|
||||
parseFails term "coe A @p @q x",
|
||||
parseFails term "coe [i ⇒ A] @p q x"
|
||||
parseFails term "coe A @p @q",
|
||||
parseFails term "coe (i ⇒ A) @p q x"
|
||||
],
|
||||
|
||||
"comp" :- [
|
||||
parseMatch term "comp [A] @p @q s @r { 0 𝑗 ⇒ s₀; 1 𝑘 ⇒ s₁ }"
|
||||
parseMatch term "comp A @p @q s @r { 0 𝑗 ⇒ s₀; 1 𝑘 ⇒ s₁ }"
|
||||
`(Comp (Unused _, V "A" _) (V "p" _) (V "q" _) (V "s" _) (V "r" _)
|
||||
(PV "𝑗" _, V "s₀" _) (PV "𝑘" _, V "s₁" _) _),
|
||||
parseMatch term "comp [𝑖 ⇒ A] @p @q s @r { 0 𝑗 ⇒ s₀; 1 𝑘 ⇒ s₁ }"
|
||||
parseMatch term "comp (𝑖 ⇒ A) @p @q s @r { 0 𝑗 ⇒ s₀; 1 𝑘 ⇒ s₁ }"
|
||||
`(Comp (PV "𝑖" _, V "A" _) (V "p" _) (V "q" _) (V "s" _) (V "r" _)
|
||||
(PV "𝑗" _, V "s₀" _) (PV "𝑘" _, V "s₁" _) _),
|
||||
parseMatch term "comp [A] @p @q s @r { 1 𝑗 ⇒ s₀; 0 𝑘 ⇒ s₁; }"
|
||||
parseMatch term "comp A @p @q s @r { 1 𝑗 ⇒ s₀; 0 𝑘 ⇒ s₁; }"
|
||||
`(Comp (Unused _, V "A" _) (V "p" _) (V "q" _) (V "s" _) (V "r" _)
|
||||
(PV "𝑘" _, V "s₁" _) (PV "𝑗" _, V "s₀" _) _),
|
||||
parseMatch term "comp [A] s @r { 0 𝑗 ⇒ s₀; 1 𝑘 ⇒ s₁ }"
|
||||
parseMatch term "comp A s @r { 0 𝑗 ⇒ s₀; 1 𝑘 ⇒ s₁ }"
|
||||
`(Comp (Unused _, V "A" _) (K Zero _) (K One _) (V "s" _) (V "r" _)
|
||||
(PV "𝑗" _, V "s₀" _) (PV "𝑘" _, V "s₁" _) _),
|
||||
parseFails term "comp [A] @p @q s @r { 1 𝑗 ⇒ s₀; 1 𝑘 ⇒ s₁; }",
|
||||
parseFails term "comp [A] @p @q s @r { 0 𝑗 ⇒ s₀ }",
|
||||
parseFails term "comp [A] @p @q s @r { }"
|
||||
parseFails term "comp A @p @q s @r { 1 𝑗 ⇒ s₀; 1 𝑘 ⇒ s₁; }",
|
||||
parseFails term "comp A @p @q s @r { 0 𝑗 ⇒ s₀ }",
|
||||
parseFails term "comp A @p @q s @r { }"
|
||||
],
|
||||
|
||||
"case" :- [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue