[racket] struct equality?

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Sun Jul 4 21:34:36 EDT 2010

OK, this is harder than I thought. The struct is defined at the top
level, so under what conditions might it be re-defined?

Also, will an accessor of the form struct-name-field work with any
struct of name struct-name, or does it only work with structs that are
in the same scope?


On Sun, Jul 4, 2010 at 12:53 PM, Todd O'Bryan <toddobryan at gmail.com> wrote:
> That makes sense. It will probably be harder to find a small example
> than to figure out if my define-struct is running twice. I'll give
> that a try. Thanks!
> On Sun, Jul 4, 2010 at 11:23 AM, Carl Eastlund <cce at ccs.neu.edu> wrote:
>> There are a few ways to organize a program where a single "struct" or
>> "define-struct" statement gets run twice, and the resulting struct types
>> will be incompatible.  It is possible you've run into one of these cases.
>> Can you send a small program that demonstrates the problem?
>> On Jul 4, 2010 10:12 AM, "Todd O&apos;Bryan" <toddobryan at gmail.com> wrote:
>> I have a struct type that is #:transparent and I have two examples of
>> the struct.
>> When I test each of the fields for equal?-ity, they're all equal;
>> however, the two structs are not.
>> Any idea what I'm missing?
>> Todd
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users

Posted on the users mailing list.