Re: [racket-users] Redefine how Racket prints

2017-03-07 Thread Matthew Flatt
You can change `print` for a specific port with `port-print-handler`. There's also the `global-port-print-handler` parameter, but setting that changes `print` only for ports that uses the default printer. The blue-versus-purple distinction in DrRacket is built into the output port that DrRacket su

[racket-users] Redefine how Racket prints

2017-03-06 Thread Vasily Rybakov
I want to change how Racket prints some values both in REPL and when using (print), (println), e.t.c. Suppose that I want change like this (gives as simple example): (define (print~ datum [out (current-output-port)] [quote-depth 0]) (if (number? datum) (print `',datum out 1) (print