From f5078fb50b12d6e93647a821b674b9e68504d2dd Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 10 Aug 2016 18:59:06 -0700 Subject: [PATCH] remove `shared-syntax` --- beautiful-racket-lib/br/define.rkt | 10 ++++------ beautiful-racket-lib/br/main.rkt | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/beautiful-racket-lib/br/define.rkt b/beautiful-racket-lib/br/define.rkt index 55282f3..782a6e6 100644 --- a/beautiful-racket-lib/br/define.rkt +++ b/beautiful-racket-lib/br/define.rkt @@ -43,9 +43,8 @@ (begin-for-syntax ;; expose the caller context within br:define macros with syntax parameter (require (for-syntax racket/base) racket/stxparam) - (provide caller-stx shared-syntax) - (define-syntax-parameter caller-stx (λ(stx) (error 'caller-stx-not-parameterized))) - (define-syntax-parameter shared-syntax (λ(stx) (error 'shared-syntax-not-parameterized)))) + (provide caller-stx) + (define-syntax-parameter caller-stx (λ(stx) (error 'caller-stx-not-parameterized)))) (define-syntax (define-cases stx) @@ -172,10 +171,9 @@ (λ (stx) (define result (syntax-parameterize ([caller-stx (make-rename-transformer #'stx)]) - (syntax-parameterize ([shared-syntax (make-shared-syntax-macro caller-stx)]) - (syntax-case stx LITERALS + (syntax-case stx LITERALS [pat . result-exprs] ... - else-clause)))) + else-clause))) (if (syntax? result) result (datum->syntax #'id result)))))] diff --git a/beautiful-racket-lib/br/main.rkt b/beautiful-racket-lib/br/main.rkt index bc30815..b51a6cd 100644 --- a/beautiful-racket-lib/br/main.rkt +++ b/beautiful-racket-lib/br/main.rkt @@ -6,7 +6,7 @@ (all-from-out racket/list racket/string racket/format racket/match racket/port br/syntax br/datum br/debug br/cond racket/function br/define) (for-syntax (all-from-out racket/base racket/syntax br/syntax br/debug)) - (for-syntax caller-stx shared-syntax with-shared-id with-calling-site-id)) ; from br/define + (for-syntax caller-stx with-shared-id with-calling-site-id)) ; from br/define ;; todo: activate at-exp reader by default