[plt-scheme] define-syntax-alias
You should instead use
(define-syntax foo (make-rename-transformer #'bar))
which works in more cases.
At Mon, 26 Oct 2009 13:43:16 -0600, Jon Rafkind wrote:
> Would anyone else appreciate this function `define-syntax-alias' in the
> core? Maybe in syntax/stx or something.
>
> (require (for-syntax syntax/stx))
> (define-syntax (define-syntax-alias stx)
> (syntax-case stx ()
> [(_ a b)
> #'(define-syntax (a stx)
> #`(b #,@(stx-cdr stx)))]))
>
> (define-syntax (bar stx)
> (syntax-case stx ()
> [(_ a b ...) #'a]))
> (define-syntax-alias foo bar)
> (foo 1 2 3 4)
>
> ==> 1