[racket-dev] generate-temporaries and #%top

From: Ryan Culpepper (ryanc at ccs.neu.edu)
Date: Wed Jul 10 16:39:47 EDT 2013

This sounds like a job for the zero-values define-syntaxes trick, 
documented here:



On 07/10/2013 03:40 PM, Carl Eastlund wrote:
> I'm having trouble with some of the features of define-generics in
> top-level contexts.  Specifically, if I generate any names with
> generate-temporaries, and there are forward references to them in the
> expanded code, then the forward reference fails to expand because #%top
> is not bound in the context of the temporary name.  This problem doesn't
> come up in module or lexical bindings because all the definitions are
> bound, not using #%top, by the time the forward reference is expanded.
> So are generate-temporaries identifiers simply dangerous to use for
> anything that might wind up at the top level?  Or is there a smarter way
> to use them that I'm missing?
> Carl Eastlund
> _________________________
>    Racket Developers list:
>    http://lists.racket-lang.org/dev

Posted on the dev mailing list.