[plt-scheme] Combining scheme/serialize, structures, and macros?

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Sat Feb 16 17:39:09 EST 2008

Hi everyone,

I ran across a problem in one of my projects.  I've distilled the problem 
into a toy example, so hopefully someone can tell me what I'm doing wrong.
:)

The code is in:

http://git.hashcollision.org/projects/plt-misc/serialize-with-macros/

(The example above using arithmetic expr's is very contrived, but I'm 
running into the same issue with a more interesting datatype.)


The high-level problem is this: I have a macro that, at compile time, does 
some parsing and processing.  Ultimately, I produce a struct value.  I'd 
like to serialize that struct, and restore it at runtime so that value can 
cross the compile-time/run-time divide.

At runtime, however, when I try to deserialize the structure, I get a bad 
error message:

#########################################################################
test-compiler.ss:7:2: namespace-variable-value: deserialize-info:binop-v0 
is not defined
#########################################################################

This is exercised in test-compiler.ss under the "test-1" function.


Any help would be greatly appreciated.  Thanks!


Posted on the users mailing list.