From 78f2ab8fa10c418a48087bd7ca87fb585c101932 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 10 Apr 2015 09:45:51 -0600 Subject: [PATCH] fix taint handling for `package` bindings --- compatibility-lib/compatibility/package.rkt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compatibility-lib/compatibility/package.rkt b/compatibility-lib/compatibility/package.rkt index 649474b..c97a7e0 100644 --- a/compatibility-lib/compatibility/package.rkt +++ b/compatibility-lib/compatibility/package.rkt @@ -20,6 +20,12 @@ package-original-identifiers)) +;; For permission to move scopes from a definition in a package +;; to a binding of the identifier when the package is opened: +(define-for-syntax code-insp + (variable-reference->module-declaration-inspector + (#%variable-reference))) + ;; ---------------------------------------- (begin-for-syntax @@ -216,8 +222,10 @@ stx id)) (define (locally sig-id) - ((make-syntax-delta-introducer sig-id (package-root-id p)) - (datum->syntax id (syntax-e sig-id) sig-id sig-id))) + (define local-id + ((make-syntax-delta-introducer (syntax-disarm sig-id code-insp) (package-root-id p)) + (datum->syntax (syntax-disarm id code-insp) (syntax-e sig-id) sig-id sig-id))) + (syntax-rearm (syntax-rearm local-id sig-id) id)) #`(begin #,@(map (lambda (sig-id impl-id) #`(#,def-stxes (#,(locally sig-id))