Hi all,

Suppose, I have a datum that represents valid racket code, like '(test #:a 
a #:b b #: c).  I'd love to render (arbitrarily deeply nested) datums like 
this to a string that displays like this:

(test
  #:a a
  #:b b
  #:c c)

Pretty printing almost works:

(displayln
   (pretty-format
    '(test #:a a #:b b #:c c)
   24))

'(test
  #:a
  a
  #:b
  b
  #:c
  c)

I thought that fiddling with the columns parameter would help, but it 
doesn't:

(displayln
   (pretty-format
    '(test #:a a #:b b #:c c)
   25))

(test #:a a #:b b #:c c)

Maybe there's some way can get racket/pretty to do what I want -- though I 
didn't see anything jump out at me in docs.

I was about to write my own pretty printer, but I figured that with so much 
stuff out there for typesetting Racket code (e.g in Scribble), I should at 
least ask if someone knows of something that does what I want: Basically, 
magically formats datums according to Rackety indentation idioms.  

Thanks,
Stephen

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to