On Monday, May 9, 2016 at 11:10:07 AM UTC-7, Matthew Butterick wrote:
> Or `format-id` could be patched to automatically unwrap any syntax object
> that contains a single datum, obviating the need for `syntax-e` (which would
> seem consistent with its handling of things like #'foo)
Actually,
On May 9, 2016, at 10:41 AM, Kevin Forchione wrote:
>
> That was a surprise. So ids can’t have numerics as part of their arguments in
> format-id? Is that correct? How would I make this work if I wanted to pass
> numbers into the format-id to generate ids like foo7, bar3,
On Mon, May 9, 2016 at 1:41 PM, Kevin Forchione wrote:
> (with-syntax ([name (format-id stx "~a-~a" #'a #'b)])
Change this line to:
(with-syntax ([name (format-id stx "~a-~a" (syntax-e #'a) (syntax-e #'b))])
Using syntax-e explicitly gets the value out of the syntax
Hi guys,
I’ve been working with Racket 6.5 refreshing my macro knowledge and ran into a
situation with format-id that baffles me. There’s an example of format-id on
the “Fear of Macros” webpage that puzzles me.
>(require (for-syntax racket/syntax))
>(define-syntax (hyphen-define/ok3 stx)
At Sun, 8 May 2016 21:40:04 -0700 (PDT), Jack Firth wrote:
> I'm writing a series of macros that attach metadata using syntax properties
> during expansion, and I'm attempting to write a #lang whose module-begin form
> expands the module and then inspects the metadata attached. The problem I'm
5 matches
Mail list logo