[plt-scheme] transformer binding

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed May 7 01:01:09 EDT 2003

You cannot, as written. If you want a helper function in a macro
definition, you put the function inside the macro definition:


(module z mzscheme
  (define-syntax (g stx)
    (let ()
      (define (f x) x)
        (syntax-case stx ()
          ((_ e)
           (datum->syntax-object stx (f (syntax-object->datum #'e)))))))

You probably will want to use define-syntax-set for a more general
form.

Robby

At Tue, 06 May 2003 23:57:50 -0500, David Van Horn wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> I'm probably missing something obvious here, but how do I bind f in g's
> transformer environment here?  TIA.
> 
> (module z mzscheme
>   (define (f x) x)
>   (define-syntax (g stx)
>     (syntax-case stx ()
>       ((_ e)
>        (datum->syntax-object stx (f (syntax-object->datum #'e))))))
>   )
> 
> -d
> 
> 



Posted on the users mailing list.