Permalink
Browse files

errortrace repair

Closes PR 12629
  • Loading branch information...
1 parent 415b1ea commit 99639c1999739ccc697c62fc9a58fe03a16c6514 @mflatt mflatt committed Mar 13, 2012
View
5 collects/errortrace/errortrace-lib.rkt
@@ -53,8 +53,9 @@
(free-identifier=? a b phase 0))
[(begin-for-syntax body ...)
(syntax-rearm
- (map (handle-top-form (add1 phase))
- (syntax->list #'(body ...)))
+ #`(begin-for-syntax
+ #,@(map (handle-top-form (add1 phase))
+ (syntax->list #'(body ...))))
expr)]
[(module . _)
(transform-all-modules expr proc #f)]
View
14 collects/tests/errortrace/begin.rkt
@@ -0,0 +1,14 @@
+#lang racket/base
+
+(provide begin-for-syntax-tests)
+
+(define (begin-for-syntax-tests)
+ (define ns (make-base-namespace))
+ (parameterize ([current-namespace ns])
+ (dynamic-require 'errortrace #f)
+ (eval '(module m racket/base
+ (require (for-syntax racket/base))
+ (begin-for-syntax 1 2)))))
+
+(module+ main
+ (begin-for-syntax-tests))
View
4 collects/tests/errortrace/main.rkt
@@ -4,11 +4,13 @@
"wrap.rkt"
"alert.rkt"
"phase-1.rkt"
- "phase-1-eval.rkt")
+ "phase-1-eval.rkt"
+ "begin.rkt")
(wrap-tests)
(test do (alert-tests))
(phase-1-tests)
(phase-1-eval-tests)
+(begin-for-syntax-tests)

0 comments on commit 99639c1

Please sign in to comment.