diff --git a/.travis.yml b/.travis.yml index a24ae18..6609f1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ env: # The `debug` package used just for the tests does not work on 6.1 and 6.1.1 #- RACKET_VERSION=6.1 #- RACKET_VERSION=6.1.1 + # in v6.2, error "#%module-begin: cannot use identifier tainted by macro transformation" on files which use #lang repltest typed/racket - RACKET_VERSION=6.2 - RACKET_VERSION=6.3 - RACKET_VERSION=6.4 diff --git a/lang/reader.rkt b/lang/reader.rkt index 1bd763d..1a18748 100644 --- a/lang/reader.rkt +++ b/lang/reader.rkt @@ -49,26 +49,22 @@ (reader chr (narrow-until-prompt in) src line col pos)) (define/with-syntax (mod nam lang (modbeg . body)) - (eval-syntax (replace-top-loc #'(expand #'orig-mod) - (syntax-source #'here) - #'orig-mod) + (eval-syntax (syntax/loc #'orig-mod (expand #'orig-mod)) (variable-reference->namespace (#%variable-reference))) #;(parameterize ([current-namespace (variable-reference->namespace (#%variable-reference))]) (expand #'orig-mod))) ;; quasisyntax/loc Necessary so that the generated code has the correct srcloc - (replace-top-loc - #`(mod nam lang - (modbeg - (module* test racket/base - (require repltest/private/run-interactions) - ;; TODO: set-port-next-location! for (open-input-string …) - (run-interactions (open-input-string #,(port->string in)) - (#%variable-reference))) - . body)) - (syntax-source #'here) - #'mod)) + (quasisyntax/loc #'mod + (mod nam lang + (modbeg + (module* test racket/base + (require repltest/private/run-interactions) + ;; TODO: set-port-next-location! for (open-input-string …) + (run-interactions (open-input-string #,(port->string in)) + (#%variable-reference))) + . body)))) (define-values (repltest-read repltest-read-syntax repltest-get-info) (make-meta-reader