[racket] typed racket and generic interfaces, is there a workaround using properties?

From: Anthony Carrico (acarrico at memebeam.org)
Date: Sat Sep 27 21:11:08 EDT 2014

On 09/27/2014 09:49 AM, Alexander D. Knauth wrote:
> Like this, I think:  (but for some reason it seems to print it 3 times?)
> #lang typed/racket
> (struct foo () #:transparent
>   #:property prop:custom-write
>   (lambda (this out mode)
>     (displayln "whatever")))
> (print (foo))

I didn't realize #:property was legal in typed struct. I guess there
should be a documentation update here:

BTW change your program to use the given port: (displayln "whatever"
out) to avoid the double printing problem, although I'm not exactly sure
why it would have that effect.


Anthony Carrico

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.racket-lang.org/users/archive/attachments/20140927/63d8e553/attachment-0001.sig>

Posted on the users mailing list.