Oh, syntax-parameter-value has helped.

#lang racket

(require (for-syntax syntax/parse syntax/transformer)

(define-syntax-parameter my-info '())

(define-syntax (access stx)
  (syntax-parse stx
     (printf "my-info = ~v\n" (syntax-parameter-value #'my-info))

(define-syntax (save stx)
  (syntax-parse stx
    [(_ body:expr)
     #'(syntax-parameterize ((my-info
                              (cons 'new-info (syntax-parameter-value #'my-info))))


it prints

my-info = '(new-info new-info)

Seems to be exactly what I was looking for. Thanks for help!

Best regards,


You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to