From 81d58b1cb61d1df321c66f4c892c19ba939ce204 Mon Sep 17 00:00:00 2001 From: Jon Rafkind Date: Fri, 11 Jan 2013 16:29:28 -0700 Subject: [PATCH] [honu] fix lexical context for require forms. fixup the module name to replace _ with - --- collects/honu/core/private/honu2.rkt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/collects/honu/core/private/honu2.rkt b/collects/honu/core/private/honu2.rkt index d755c437d7..ba0edcefff 100644 --- a/collects/honu/core/private/honu2.rkt +++ b/collects/honu/core/private/honu2.rkt @@ -288,11 +288,15 @@ [pattern x:str #:with result #'x] [pattern (~seq x:not-comma ...) #:with result (with-syntax ([name + ;; use the lexical context of the original syntax + (datum->syntax (car (syntax->list #'(x.x ...))) (string->symbol (apply string-append (map (compose symbol->string syntax->datum) - (syntax->list #'(x.x ...)))))]) - #'name)])) + (syntax->list #'(x.x ...))))) + #'(x.x ...)) + ]) + (fix-module-name #'name))])) (provide honu-require) (define-honu-syntax honu-require