Re: [racket-users] Turning off the sharing check for printing

2017-09-08 Thread Robby Findler
One could use a eq hash table (maybe a weak one, or maybe cooperate more with the code that's doing the printing to throw away the table) to avoid doing the sensitive code more than once? Robby On Fri, Sep 8, 2017 at 9:17 AM, Matthew Flatt wrote: > There's not a way to turn off the sharing chec

Re: [racket-users] Turning off the sharing check for printing

2017-09-08 Thread Matthew Flatt
There's not a way to turn off the sharing check. Did you find a better way to do what you want? I think the problem here is an implicit contract on values that flow to the printer, where the implicit contract constrains a value to be printable more than once. A value's printing function can be cal

[racket-users] Turning off the sharing check for printing

2017-08-31 Thread Sam Waxman
I wrote a custom printer, and the printer itself has side-effects. As such, I need to be absolutely certain that when I print something, the print function only gets called once. When checking my test cases, things were failing, and then I found out that Racket calls the print function multiple