adjust the teaching languages interactions with

drracket so they put the 'source' field into the
syntax objects that they create (at the very top)

this allows the debugger to connect the syntax objects
to the file that's open in drracket (the way this worked
changed a while back, but I didn't check the teaching
languages to see if the debugger was supposed to work there)

closes PR 13159

please merge to the release branch
This commit is contained in:
Robby Findler 2012-10-18 21:13:52 -05:00
parent 05e0836b88
commit 3ba54a2a3e

View File

@ -27,7 +27,6 @@
;; the user has added. Also, any 'provide' expressions are stripped out. ;; the user has added. Also, any 'provide' expressions are stripped out.
(define (expand-teaching-program port reader language-module teachpacks [module-name '#%htdp] [enable-testing? #t]) (define (expand-teaching-program port reader language-module teachpacks [module-name '#%htdp] [enable-testing? #t])
(define state 'init) (define state 'init)
;; state : 'init => 'require => 'done-or-exn ;; state : 'init => 'require => 'done-or-exn
@ -67,7 +66,8 @@
#`(define #,(datum->syntax #f 'test~object) (namespace-variable-value 'test~object)) #`(define #,(datum->syntax #f 'test~object) (namespace-variable-value 'test~object))
'test-call #t))) 'test-call #t)))
'()) '())
,@body-exps)))))] ,@body-exps)
(vector (object-name port) #f #f #f #f)))))]
[(require) [(require)
(set! state 'done-or-exn) (set! state 'done-or-exn)
(stepper-skip (stepper-skip
@ -121,9 +121,10 @@
(with-syntax ([(rewritten-bodies ...) (with-syntax ([(rewritten-bodies ...)
(filter not-provide? (filter not-provide?
(syntax->list (syntax (bodies ...))))]) (syntax->list (syntax (bodies ...))))])
#`(module name lang (syntax/loc stx
(module name lang
(#%plain-module-begin (#%plain-module-begin
rewritten-bodies ...)))] rewritten-bodies ...))))]
[else [else
(raise-syntax-error 'htdp-languages "internal error .1")])) (raise-syntax-error 'htdp-languages "internal error .1")]))