[racket] Macros and literal-id

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Tue Aug 9 01:34:33 EDT 2011

On 2011-08-09 01:15:01 -0400, Harry Spier wrote:
>    Are there any actual examples in the on-line documentation (guide or
>    reference) showing the use of "literal-id" in a syntax-rules statement.
>    I.e. in:
>    (define-syntax id
>      (syntax-rules (literal-id ...)
>        [pattern template]
>        ...))

I looked through the Guide quickly but didn't see any. It looks like the
only examples of using literal ids are for syntax-id-rules.

>    And if not, would it be possible for someone to give a simple example of
>    its use.

If you want syntax-rules examples in particular, I would look at the
cond example with else as a keyword. It's actually explained much better
than I can in PLAI (with motivation for why you want it) so you ought to
look at page 340 of the book (sec. 36.1.4):


Posted on the users mailing list.