Fixing pr11214

This commit is contained in:
Jay McCarthy 2010-09-16 12:30:21 -06:00
parent 3498ac8744
commit 1f4c525245
2 changed files with 27 additions and 3 deletions

View File

@ -40,6 +40,32 @@
(+ f initial)))))]) (+ f initial)))))])
(check = 8 (test-m00.4 '(dispatch-start start 1))))) (check = 8 (test-m00.4 '(dispatch-start start 1)))))
(test-case
"Embedded Definitions"
(let-values ([(test-m00.4)
(make-module-eval
(module m00.4 (lib "lang.rkt" "web-server")
(provide start)
(define (start initial)
(define m 7)
(define f m)
(+ f initial))))])
(check = 8 (test-m00.4 '(dispatch-start start 1)))))
(test-case
"Embedded Definitions + Intermixed expressions"
(let-values ([(test-m00.4)
(make-module-eval
(module m00.4 (lib "lang.rkt" "web-server")
(provide start)
(define (start initial)
(define m 7)
(+ m 13)
(define f m)
(+ f initial))))])
(check = 8 (test-m00.4 '(dispatch-start start 1)))))
(test-case (test-case
"start-interaction in argument position of a function call" "start-interaction in argument position of a function call"
(let-values ([(test-m00.3) (let-values ([(test-m00.3)

View File

@ -38,7 +38,7 @@
(kernel-syntax-case (kernel-syntax-case
stx (transformer?) stx (transformer?)
[(begin) [(begin)
(anormal ctxt (syntax/loc stx (#%plain-app (#%top . void))))] (anormal ctxt (syntax/loc stx (#%plain-app void)))]
[(begin lbe) [(begin lbe)
(anormal ctxt (syntax/loc stx lbe))] (anormal ctxt (syntax/loc stx lbe))]
[(begin fbe be ...) [(begin fbe be ...)
@ -48,8 +48,6 @@
(#%plain-lambda () fbe) (#%plain-lambda () fbe)
(#%plain-lambda throw-away (#%plain-lambda throw-away
(begin be ...)))))] (begin be ...)))))]
[(begin0)
(anormal ctxt (syntax/loc stx (#%plain-app (#%top . void))))]
[(begin0 lbe) [(begin0 lbe)
(anormal ctxt (syntax/loc stx lbe))] (anormal ctxt (syntax/loc stx lbe))]
[(begin0 fbe be ...) [(begin0 fbe be ...)