On Nov 11, 2016, at 10:16 AM, dear chap wrote:
> Hi MB
> That did the trick. Using the macro stepper didnt help much but after
> running the (message-syntax ...) I see the message object getting populated
> correctly with field objects. Why is there a difference ?
`quote` converts its input
Hi MB
That did the trick. Using the macro stepper didnt help much but after running
the (message-syntax ...) I see the message object getting populated correctly
with field objects. Why is there a difference ?
Thanks
p.s pollen is the reason I started learning Racket. Thanks !!!.
On Frida
On Nov 11, 2016, at 7:24 AM, dear chap wrote:
> (define-syntax (message-syntax stx)
> (syntax-parse stx
> ([_ name field:field_binding ...]
> #`(begin
>(define message-inst (message 'name '((field-syntax field) ...)
>
>
> I want the message object to contain the nam
Both techniques worked for me! Thanks!
I’m not sure why (format-id #’n “foo~a” [syntax-e #’n)) works when (format-id
six “foo~a” (syntax-e #’n)) does not though. Apparently I need to look into the
differences between the two contexts.
-Kevin
> On May 20, 2016, at 2:58 PM, Sam Caldwell wrote:
Kevin,
I have made this exact mistake in the past. The trouble is with the
lexical context being passed to `format-id`.
(_foo 3)
foo3
;; 3
Here, _foo is passed the syntax #'(_foo 3), which came from the same
environment as the reference, foo3.
(foo 3)
foo3
;; error ...
Here, _foo is passed the
The macro application (foo 3) expands into
#'(begin
(_foo n0)
(foo n ...))
The expansion of (_foo n0) then defines foo3, but
the scope will only include the piece of code above.
To make definitions made by sub-macros available
at
6 matches
Mail list logo