let case be the head of an application too
This commit is contained in:
parent
4291afd51b
commit
59e7a457a6
2 changed files with 71 additions and 57 deletions
|
@ -400,7 +400,15 @@ tests = "parser" :- [
|
|||
`(Case (PQ Any _) (V "n" {}) (Unused _, NAT _)
|
||||
(CaseNat (Nat 0 _) (Unused _, PQ One _, PV "ih" _, V "ih" {}) _) _),
|
||||
parseFails term "caseω n return A of { zero ⇒ a }",
|
||||
parseFails term "caseω n return ℕ of { succ ⇒ 5 }"
|
||||
parseFails term "caseω n return ℕ of { succ ⇒ 5 }",
|
||||
parseMatch term
|
||||
"case1 f s return x ⇒ A x of { (l, r) ⇒ r l } x"
|
||||
`(App
|
||||
(Case (PQ One _) (App (V "f" {}) (V "s" {}) _)
|
||||
(PV "x" _, App (V "A" {}) (V "x" {}) _)
|
||||
(CasePair (PV "l" _, PV "r" _)
|
||||
(App (V "r" {}) (V "l" {}) _) _) _)
|
||||
(V "x" {}) _)
|
||||
],
|
||||
|
||||
"definitions" :-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue