We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 535ad4d commit 82efccfCopy full SHA for 82efccf
knock-plus/parse.rkt
@@ -213,7 +213,7 @@
213
['_ (list ys xs gs (Var '_))]
214
[(? symbol?) (list ys (cons p xs) gs (Var p))]
215
[(list 'quote '())
216
- (list ys xs (Lit '()))]
+ (list ys xs gs (Lit '()))]
217
[(list 'box s)
218
(match (rec s xs ys gs)
219
[(list ys xs gs p)
knock-plus/test/parse.rkt
@@ -71,6 +71,8 @@
71
(p (Match (Lit 1) (list (Var 'x)) (list (Var 'x)))))
72
(check-equal? (parse '(match 1 [x y]))
73
(p (Match (Lit 1) (list (Var 'x)) (list (Var 'y)))))
74
+ (check-equal? (parse '(match x ['() 1]))
75
+ (p (Match (Var 'x) (list (Lit '())) (list (Lit 1)))))
76
(check-exn exn:fail? (λ () (parse-closed '(match 1 [x y])))))
77
(begin ; Knock+
78
(check-equal? (parse '(match 1 [(? f?) #t]))
0 commit comments