Re: [racket] print/pretty-print weirdness

2013-11-11 Thread Matthew Flatt
Sorry for the long delay! And thanks for the smaller example, which is helpful. The problem is that the `write-proc` is called multiple times for a single print, and the printer tries to keep track of quoting modes across calls based on `eq?` identity. If you change your example to have (defi

Re: [racket] print/pretty-print weirdness

2013-11-11 Thread Christopher
Greetings again. I'm still hoping for some help from you friendly bunch of geniuses! Lest you think that the printing weirdness I described in my previous email is relegated to that world of Racket OOP classes and objects, please look at this example which uses only struct values: #lan

[racket] print/pretty-print weirdness

2013-11-05 Thread Christopher
I'm experiencing some weirdness with print and pretty-print. First of all, can someone please explain why these print the same thing: > (print 'hello (current-output-port) 0) 'hello > (print 'hello (current-output-port) 1) 'hello But these do not: > (pretty-print 'hello (current-output-port) 0)