From 3ba54a2a3eded1f081769f21f8f6560ae9d98f3f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 18 Oct 2012 21:13:52 -0500 Subject: [PATCH] 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 --- collects/lang/run-teaching-program.rkt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/collects/lang/run-teaching-program.rkt b/collects/lang/run-teaching-program.rkt index 97419e9dde..58f77bcf9f 100644 --- a/collects/lang/run-teaching-program.rkt +++ b/collects/lang/run-teaching-program.rkt @@ -27,7 +27,6 @@ ;; 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 state 'init) ;; state : 'init => 'require => 'done-or-exn @@ -67,7 +66,8 @@ #`(define #,(datum->syntax #f 'test~object) (namespace-variable-value 'test~object)) 'test-call #t))) '()) - ,@body-exps)))))] + ,@body-exps) + (vector (object-name port) #f #f #f #f)))))] [(require) (set! state 'done-or-exn) (stepper-skip @@ -121,9 +121,10 @@ (with-syntax ([(rewritten-bodies ...) (filter not-provide? (syntax->list (syntax (bodies ...))))]) - #`(module name lang + (syntax/loc stx + (module name lang (#%plain-module-begin - rewritten-bodies ...)))] + rewritten-bodies ...))))] [else (raise-syntax-error 'htdp-languages "internal error .1")]))