[plt-scheme] variable or syntactic binding

From: Jos Koot (jos.koot at telefonica.net)
Date: Fri Dec 18 09:45:43 EST 2009

Thanks very much, that's precisely what I was looking for. Before asking my question I browsed the docs for over an hour. I am a bad 
browser, I suppose. Thanks again, Jos

----- Original Message ----- 
From: "Sam TH" <samth at ccs.neu.edu>
To: "Jos Koot" <jos.koot at telefonica.net>
Cc: "plt-scheme" <plt-scheme at list.cs.brown.edu>
Sent: Friday, December 18, 2009 3:30 PM
Subject: Re: [plt-scheme] variable or syntactic binding

`syntax-local-value' is useful here:

#lang scheme

(define-syntax m 5)
(define n 6)

  (printf "slv: m ~a~n" (syntax-local-value #'m (lambda _ #f)))
  (printf "slv: n ~a~n" (syntax-local-value #'n (lambda _ #f))))

On Fri, Dec 18, 2009 at 9:16 AM, Jos Koot <jos.koot at telefonica.net> wrote:
> Examining an id-stx in syntax-case, is it possible to find out if it has a
> variable binding or a syntactic binding? I have not found any info on this
> in the docs. I have tried procedures identifier-binding and
> identifier-transformer-binding. The former returns a true value for an
> id-stx with a syntactic binding. The latter returns false for such an
> id-stx. The expander does have to know the difference, I suppose.
> Thanks, Jos
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme

sam th
samth at ccs.neu.edu

Posted on the users mailing list.