improve error handling for `defproc'

Closes PR 12780

original commit: e8d9d4e9ca5149398ead0a3a664405d8aa7a5b70
This commit is contained in:
Matthew Flatt 2012-07-02 10:07:52 -06:00
parent d7bf77fba7
commit 54e7b17c5e

View File

@ -104,11 +104,13 @@
(bound-identifier-mapping-put! ht arg #t)) (bound-identifier-mapping-put! ht arg #t))
(syntax-case arg () (syntax-case arg ()
[(kw arg . rest) [(kw arg . rest)
(keyword? (syntax-e #'kw)) (and (keyword? (syntax-e #'kw))
(identifier? #'arg))
(bound-identifier-mapping-put! ht #'arg #t)] (bound-identifier-mapping-put! ht #'arg #t)]
[(arg . rest) [(arg . rest)
(identifier? #'arg) (identifier? #'arg)
(bound-identifier-mapping-put! ht #'arg #t)]))) (bound-identifier-mapping-put! ht #'arg #t)]
[else (void)])))
(cdr s-exp)) (cdr s-exp))
(unless (identifier? (car s-exp)) (unless (identifier? (car s-exp))
;; Curried: ;; Curried: