[plt-scheme] determine free variables

From: Sam TH (samth at ccs.neu.edu)
Date: Mon Mar 24 21:15:29 EDT 2008

On Mon, Mar 24, 2008 at 8:42 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> Look at collects/web-server/lang/freevars.ss for a (syntax -> (listof
>  identifier-syntax)) function

There's also an implementation (intended for use in other libraries)
in syntax/free-vars (maybe the webserver should use that?).

sam th

>
>  (Only works on expanded code)
>
>  Jay
>
>
>
>  On Mon, Mar 24, 2008 at 5:55 PM, YC <yinso.chen at gmail.com> wrote:
>  > Hi all -
>  >
>  > What's the best approach to determine free variables at source level?
>  >
>  > What i am trying to accomplish is to take a scheme expression from a file,
>  > say
>  >
>  > (+ foo bar)
>  >
>  > and transform
>  >
>  > (lambda (foo bar)
>  >   (+ foo bar))
>  >
>  > for arbitrary scheme expressions.
>  >
>  > Are there procedures that would allow me to determine whether a symbol has a
>  > binding?  Given scheme identifier can be bound to different values, it seems
>  > like this would require some sort of runtime environment inspection - is
>  > that true?
>  >
>  > Thanks,
>  > yc
>  >
>  >
>
> > _________________________________________________
>  >   For list-related administrative tasks:
>  >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>  >
>  >
>
>
>
>  --
>  Jay McCarthy <jay.mccarthy at gmail.com>
>  http://jay.teammccarthy.org
>
>
> _________________________________________________
>   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.