bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 95e265e395b9903122fef316f8e2578c6258cec3
parent 621334e1cbf622f5c2179f2428845fd23f221714
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Thu, 25 Feb 2010 22:51:36 +0000

fix binding of variables when using defproc and MIT-style curry notation

svn: r18343

original commit: 8dea57007149b5ba39706dd9f7cb730161f7e441

Diffstat:
Mcollects/scribble/private/manual-vars.ss | 39+++++++++++++++++++++++----------------
1 file changed, 23 insertions(+), 16 deletions(-)

diff --git a/collects/scribble/private/manual-vars.ss b/collects/scribble/private/manual-vars.ss @@ -47,22 +47,29 @@ (for-each (lambda (kind s-exp) (case (syntax-e kind) [(proc) - (for-each - (lambda (arg) - (if (identifier? arg) - (unless (or (eq? (syntax-e arg) '...) - (eq? (syntax-e arg) '...+) - (eq? (syntax-e arg) '_...superclass-args...) - (memq (syntax-e arg) lits)) - (bound-identifier-mapping-put! ht arg #t)) - (syntax-case arg () - [(kw arg . rest) - (keyword? (syntax-e #'kw)) - (bound-identifier-mapping-put! ht #'arg #t)] - [(arg . rest) - (identifier? #'arg) - (bound-identifier-mapping-put! ht #'arg #t)]))) - (cdr (syntax->list s-exp)))] + (letrec ([do-proc + (lambda (s-exp) + (let ([s-exp (syntax->list s-exp)]) + (for-each + (lambda (arg) + (if (identifier? arg) + (unless (or (eq? (syntax-e arg) '...) + (eq? (syntax-e arg) '...+) + (eq? (syntax-e arg) '_...superclass-args...) + (memq (syntax-e arg) lits)) + (bound-identifier-mapping-put! ht arg #t)) + (syntax-case arg () + [(kw arg . rest) + (keyword? (syntax-e #'kw)) + (bound-identifier-mapping-put! ht #'arg #t)] + [(arg . rest) + (identifier? #'arg) + (bound-identifier-mapping-put! ht #'arg #t)]))) + (cdr s-exp)) + (unless (identifier? (car s-exp)) + ;; Curried: + (do-proc (car s-exp)))))]) + (do-proc s-exp))] [(form form/none form/maybe non-term) (let loop ([form (case (syntax-e kind) [(form) (if (identifier? s-exp)