From 05dc137ca0fc933d5e2d42ca0b40a24cc9a873bb Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Fri, 15 Oct 2010 13:07:56 -0600 Subject: [PATCH] Fixing srcloc on module expressions because srclocs come from the cons --- collects/plai/mutator.rkt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/collects/plai/mutator.rkt b/collects/plai/mutator.rkt index 8a124f5445..3ab24e9da3 100644 --- a/collects/plai/mutator.rkt +++ b/collects/plai/mutator.rkt @@ -329,10 +329,12 @@ (raise-syntax-error 'allocator-setup "expected a literal number" #'heap-size)))] [_ (raise-syntax-error 'mutator allocator-setup-error-msg (syntax/loc #'setup (allocator-setup . setup)))]) - #`(#%module-begin + (quasisyntax/loc stx + (#%module-begin #,(allocator-setup-internal #'setup) - (mutator-top-interaction . module-expr) - ...))] + #,@(for/list ([me (in-list (syntax->list #'(module-expr ...)))]) + (quasisyntax/loc me + (mutator-top-interaction . #,me))))))] [(_ first-expr module-expr ...) (raise-syntax-error 'mutator allocator-setup-error-msg #'first-expr)] [(_)