In HtDP, the structs are printed using the (make-XXX ...) constructor style either by default in REPL or via print. How do I get the same behavior for pretty printing?
I have been able to print values in constructor style via the pconvert library:
(require (only-in lang/htdp-intermediate-lambda
define-struct
make-posn)
mzlib/pconvert)
(install-converting-printer)
(constructor-style-printing #t)
(define-struct game [snake foods obstacles ticks])
(define g
(make-game "snake" (list) (list (make-posn 3 4)) 0))
g
However, the pconvert printer does not apply to pretty-print. The best I can get is
Is this for use with the teaching languages? If it is for #lang-based language, there may be a way to get the language to cough up its printer and that might end up being more modular.