[plt-scheme] "define-values: cannot change identifier" when using "deserialize"

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Oct 16 07:57:02 EDT 2007

At Mon, 15 Oct 2007 19:40:41 -0700, Eric Hanchrow wrote:
> >>>>> "Matthew" == Matthew Flatt <mflatt at cs.utah.edu> writes:
> 
>     Matthew> Meanwhile, I hope the above at least suggests a
>     Matthew> workaround for your program.
> 
> Thanks for doing the research, but I'm afraid I understand neither
> dynamic-require nor deserialize enough to guess the workaround.  Could
> you spell it out?

One approach is to delay the `deserialize' call until the "bot.ss"
module body has been evaluated. Alternately, put the
`define-serializable-struct' into a module that can be `require'd by
"session.ss", so that the struct definition is definitely ready by the
time `deserialize' is called.

Matthew



Posted on the users mailing list.