File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 157157(define (check-program* stx vars props body error!)
158158 (unless (list? vars)
159159 (error! stx "Invalid arguments list ~a; must be a list " stx))
160- (define vars* (filter identifier? vars))
161- (when (list? vars)
162- (for ([var vars]
163- #:unless (identifier? var))
164- (error! stx "Argument ~a is not a variable name " var))
165- (when (check-duplicate-identifier vars*)
166- (error! stx "Duplicate argument name ~a " (check-duplicate-identifier vars*))))
167160 (define deprecated-ops (mutable-set))
161+ (define vars*
162+ (reap [sow]
163+ (when (list? vars)
164+ (for ([var (in-list vars)])
165+ (match var
166+ [(? identifier? x) (sow var)]
167+ [#`(! #,props ... #,name)
168+ (check-properties* props (immutable-bound-id-set '() ) error! deprecated-ops)
169+ (cond
170+ [(identifier? name) (sow name)]
171+ [else (error! var "Annotated argument ~a is not a variable name " name)])])))))
172+ (when (check-duplicate-identifier vars*)
173+ (error! stx "Duplicate argument name ~a " (check-duplicate-identifier vars*)))
168174 (check-properties* props (immutable-bound-id-set vars*) error! deprecated-ops)
169175 (check-expression* body (immutable-bound-id-set vars*) error! deprecated-ops)
170176 (for ([op (in-set deprecated-ops)])
You can’t perform that action at this time.
0 commit comments