On Tue, Jan 17, 2012 at 4:06 AM, Marijn <hk...@gentoo.org> wrote: > On 16-01-12 15:28, Sam Tobin-Hochstadt wrote: >> On Mon, Jan 16, 2012 at 7:57 AM, Marijn <hk...@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. -- sam th sa...@ccs.neu.edu ____________________ Racket Users list: http://lists.racket-lang.org/users