[racket-users] Re: Can `parameterize` work with pretty printing?

2020-01-03 Thread Ryan Kramer
I found `make-tentative-pretty-print-output-port` and `tentative-pretty-print-port-transfer` which looks like it might be the right way to go. I changed `write-now` as follows: (define (write-now proc x port mode) (if (pretty-printing) (let* ([alt-port

[racket-users] Can `parameterize` work with pretty printing?

2020-01-03 Thread Ryan Kramer
I am `gen:custom-write` and `make-constructor-style-printer` on an object graph that may contain cycles. Within my custom write procedure, I use `parameterize` to register an object into dictionary and later in the writing process I can check that dictionary, detect the cycle, and do more