From de8271c982ce1d5dad9143f64e533bd5dde1420e Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Fri, 13 Jun 2014 16:40:52 +0400 Subject: [PATCH] Drop %self magic: More troubles then result --- lisp/syntax/functional.scm | 2 +- lisp/syntax/implicit.scm | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/lisp/syntax/functional.scm b/lisp/syntax/functional.scm index cc711f1..5b0f1f6 100644 --- a/lisp/syntax/functional.scm +++ b/lisp/syntax/functional.scm @@ -80,4 +80,4 @@ (syntax-violation 'unsyntax-keywords "expected keyword as car" %syntax)) (cons (cons key #'value) - (%self #'(rest ...))))]) + (unsyntax-keywords #'(rest ...))))]) diff --git a/lisp/syntax/implicit.scm b/lisp/syntax/implicit.scm index e1ea7d0..547ef8a 100644 --- a/lisp/syntax/implicit.scm +++ b/lisp/syntax/implicit.scm @@ -22,9 +22,9 @@ ;;; Code: (define-module (syntax implicit) #:export (define-syntax-cases - define-transformer - ;; Generalization - (datum->syntax* . datum->syntax))) + define-transformer + ;; Generalization + (datum->syntax* . datum->syntax))) (use-modules (srfi srfi-1)) (define-syntax-parameter %syntax @@ -44,16 +44,14 @@ (define-syntax define-syntax-cases (lambda (x) (syntax-case x () - [(_ (name kw ...) clause ...) - (and (identifier? #'name) - (every identifier? #'(kw ...))) - (with-syntax ((%self (datum->syntax x '%self))) - #'(define-syntax name - (lambda (env) - (syntax-parameterize ([%syntax (const #'env)]) - (with-syntax ((%self (datum->syntax env '%self))) - (syntax-case env (kw ...) - clause ...))))))]))) + [(_ (name kw ...) clause ...) + (and (identifier? #'name) + (every identifier? #'(kw ...))) + #'(define-syntax name + (lambda (env) + (syntax-parameterize ([%syntax (const #'env)]) + (syntax-case env (kw ...) + clause ...))))]))) (define-syntax-cases (define-transformer) [(_ name body ...) -- 2.11.4.GIT