[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrapping `define-syntax'

From: Julian Graham
Subject: Re: wrapping `define-syntax'
Date: Thu, 16 Apr 2009 23:42:35 -0400

Hi Andy,

Thanks for the hand-holding! I was struggling.

> Rebinding define-syntax lexically should be possible with let-syntax or
> something like that, but I think there might be bugs with (define-syntax
> foo bar).

Whaddya know!  The following actually works quite nicely:

(let-syntax ((canonical-define-syntax (syntax-rules () ((_ keyw expr)
(define-syntax keyw expr)))))
  (canonical-define-syntax foo (syntax-rules () ((_) (display foo)))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]