[plt-scheme] determine free variables

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sat Mar 29 16:09:08 EDT 2008

On Sat, Mar 29, 2008 at 12:19 PM, Sam TH <samth at ccs.neu.edu> wrote:
>  >  I just looked up the docs for identifier-binding and see what you say.
>  >  I'm not sure what the right answer is. These identifiers are *not*
>  >  bound at the top-level. Perhaps because I don't fully expand again
>  >  after introducing them their binding status is not marked when
>  >  free-vars walks over them?
>
>  Indeed, if you introduce bindings, they will have an
>  `identifier-binding' of #f until a renaming is applied via the
>  expansion of `let' or `lambda'.

Hmm, I thought that sticking a (local-expand stx 'module empty) before
the phase where I use free-vars would solve the problem, but it
doesn't. That's the way I know of to get expansions to happen. Is
there something else I'm ignorant of?

Jay

-- 
Jay McCarthy <jay.mccarthy at gmail.com>
http://jay.teammccarthy.org


Posted on the users mailing list.