[racket] filtering syntax

From: Marijn (hkBst at gentoo.org)
Date: Wed Jan 18 03:16:56 EST 2012

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 17-01-12 16:14, Sam Tobin-Hochstadt wrote:
> On Tue, Jan 17, 2012 at 4:06 AM, Marijn <hkBst at gentoo.org> wrote:
>> On 16-01-12 15:28, Sam Tobin-Hochstadt wrote:
>>> On Mon, Jan 16, 2012 at 7:57 AM, Marijn <hkBst at gentoo.org>
>>> wrote:
>>>> 
>>>> ((_ ((id rule) ...)) (with-syntax (((dep ...) (free-vars
>>>> (expand #'(rule ...)))))
>>> 
>>> You need to use `local-expand', not `expand', here.  Probably
>>> like this:
>>> 
>>> (local-expand #'(rule ...) 'expression '())
>>> 
>> 
>> If I use that instead I still get the same error. Perhaps it
>> needs to be something like:
>> 
>> (local-expand #'(rule ...) 'expression '(id ...))
>> 
>> but '(id ...) is not in the right form...
> 
> Ah, I see the problem.  You're trying to expand expressions with 
> unbound variables, and they give an expansion error as they
> should. You might be able to use the stop list to make this work,
> but the right solution is to bind the variables.

I don't understand how or where I should bind these identifiers that
I'm trying to detect are free. A working example of how to use
free-vars would really help.

Marijn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8Wf/gACgkQp/VmCx0OL2xItQCcDVKB+NzajXbsjg9JfIoUZvSP
PG4An0aV6d4XuZeBQNQqj+rtNnx6yCuz
=0a9B
-----END PGP SIGNATURE-----

Posted on the users mailing list.