[racket] shared requires define-struct?

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Tue Feb 8 16:53:03 EST 2011

I think this is a bug...

#lang racket
(struct lyst (kar kdr)
  #:mutable
  #:transparent)

(define-struct liist (kar kdr)
  #:mutable
  #:transparent)

(shared ([a (lyst 7 a)])
  a)

(shared ([b (make-liist 7 b)])
  b)

produces

(lyst 7 #<undefined>)
#0=(liist 7 #0#)

In other words, you have to use define-struct and get the make-blah
constructor in order for shared to work.

Please tell me that's not how it's supposed to work...

Todd


Posted on the users mailing list.