[racket-dev] Running into phase-error issues

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Aug 15 09:14:47 EDT 2011

At Sun, 14 Aug 2011 23:32:48 -0400, Danny Yoo wrote:
> Yes!  Here's the problem I'm trying to solve:  I'm trying to attach
> information to a module, and then be able to query for that
> information without running the module.

That makes sense. The `dynamic-require-for-syntax' function was
intended for that kind of task.

At Sun, 14 Aug 2011 23:50:12 -0400, Carl Eastlund wrote:
> I've run into the same issue.  The way I sometimes to it is to eval
> code which requires the original module for syntax, extracts the value
> during macro expansion, and produces an expression that quotes it (or
> an expression that reconstructs it, if not an s-expression).

That approach has been more successful for me, too.

I think the eventual solution is a separately loadable part of a
module, but we don't yet have that. Meanwhile, I've pushed a repair
to `dynamic-require-for-syntax'.

Posted on the dev mailing list.