From 1cea73c9922cd9206dc407e2aa087fb499009c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 17 Apr 2017 21:21:08 +0200 Subject: [PATCH] Improve scrloc --- dotlambda/implementation.rkt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/dotlambda/implementation.rkt b/dotlambda/implementation.rkt index 5df651a..3fb3054 100644 --- a/dotlambda/implementation.rkt +++ b/dotlambda/implementation.rkt @@ -43,9 +43,13 @@ #'(define-syntax (name stx2) (syntax-case stx2 () [(_ . body) - #`(wrapped-#%module-begin - . #,(fold-syntax (replace-dots #'-λ #'-define-syntax #'-mrt) - #'body))]))])) + (datum->syntax + stx2 + `(,#'wrapped-#%module-begin + . ,(fold-syntax (replace-dots #'-λ #'-define-syntax #'-mrt) + #'body)) + stx2 + stx2)]))])) (define-syntax (make-#%top-interaction stx) (syntax-case stx () @@ -54,9 +58,13 @@ #'(define-syntax (name stx2) (syntax-case stx2 () [(_ . body) - #`(wrapped-#%top-interaction - . #,(fold-syntax (replace-dots #'-λ #'-define-syntax #'-mrt) - #'body))]))])) + (datum->syntax + stx2 + `(,#'wrapped-#%top-interaction + . ,(fold-syntax (replace-dots #'-λ #'-define-syntax #'-mrt) + #'body)) + stx2 + stx2)]))])) (define-for-syntax (make-λ l args e percent? -λ -define-syntax -mrt) (define percent*