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

From: Eric Hanchrow (offby1 at blarg.net)
Date: Tue Oct 16 08:15:36 EDT 2007

>>>>> "Matthew" == Matthew Flatt <mflatt at cs.utah.edu> writes:

    >> 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?

    Matthew> One approach is to delay the `deserialize' call until the
    Matthew> "bot.ss" module body has been evaluated.  

As far as I can tell, it is already so delayed.
    Matthew> Alternately, put the `define-serializable-struct' into a
    Matthew> module that can be `require'd by "session.ss", so that
    Matthew> the struct definition is definitely ready by the time
    Matthew> `deserialize' is called.

I actually tried that originally; it led to a confusing error.  To see
it, apply the attached patch to r66, and run ./dry-test.sh again; I see

    sighting.ss:4:0: module: identifier already provided at: deserialize-info:sighting-v0 in: (provide (all-defined))

I don't understand that error, either; nor can I find a way around it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hmm
Type: text/x-patch
Size: 1629 bytes
Desc: patch to put the struct definition in a separate module
URL: <http://lists.racket-lang.org/users/archive/attachments/20071016/b98d7937/attachment.bin>
-------------- next part --------------

Using Unix is the computing equivalent of listening only to music
by David Cassidy.
        -- Rob Pike

Posted on the users mailing list.