diff --git a/htdp-lib/test-engine/syntax.rkt b/htdp-lib/test-engine/syntax.rkt index 5f4eb89a..79f5075f 100644 --- a/htdp-lib/test-engine/syntax.rkt +++ b/htdp-lib/test-engine/syntax.rkt @@ -37,6 +37,8 @@ (syntax-column stx) (syntax-position stx) (syntax-span stx))))) + ;; without this indirection, we get "reference to a variable that is not exported" + (define test-expr-for-use #`#,test-expr) (if (eq? 'module (syntax-local-context)) #`(define #,bogus-name #,(stepper-syntax-property @@ -48,7 +50,7 @@ ['stepper-use-val-as-final #t]) (quasisyntax/loc stx (#,checker-proc-stx - (lambda () #,test-expr) + (lambda () #,test-expr-for-use) #,@embedded-stxes #,src-info))))) 'stepper-skipto @@ -64,7 +66,7 @@ ['stepper-use-val-as-final #t]) (quasisyntax/loc stx (#,checker-proc-stx - (lambda () #,test-expr) + (lambda () #,test-expr-for-use) #,@embedded-stxes #,src-info)))))))