/usr/lib/s9fes/help/pretty-print is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | S9 LIB (pretty-print object <option> ...) ==> unspecific
(pp object <option> ...) ==> unspecific
(pp-file string <option> ...) ==> unspecific
(pp-loop <option> ...) ==> unspecific
(pp-string string <option> ...) ==> list
(pp-string list <option> ...) ==> list
(load-from-library "pretty-print.scm")
Pretty-print Scheme objects, programs, or files. PRETTY-PRINT attempts
to figure out whether OBJECT is a valid Scheme program. If so, it prints
it as code and otherwise it prints it as data. The automatic detection
can be disabled by passing an option to these procedures (see below).
PP is just a less verbose name for PRETTY-PRINT.
PP-FILE pretty-prints all objects in the file STRING.
PP-LOOP pretty-prints all objects read from (current-input-stream).
PP-STRING pretty-prints the form in STRING and returns a list
containing one pretty-printed line per member (as strings).
When a LIST is passed to PP-STRING instead of a STRING, it
will assume it is a list of separate lines and append them with
#\NEWLINEs in between.
Any of these procedures accept the following <option>s that may be
passed to it after the object to print:
'CODE Print OBJECT as if it was a Scheme program.
'DATA Print OBJECT as if it was a Scheme object.
'SIMPLE Attempt to keep some special forms in a single line,
if they fit in one (IF, AND, OR, BEGIN, LAMBDA).
'MARGIN: n Set the right margin to N. The printer will attempt
not to write any output beyond that margin. The default
margin is at column 72.
'INDENT: n Indent all lines except for the first one by the given
number of blanks (for embedding in editors).
'OUTPUT-PORT: p
Send all output to the specified output port instead
of (current-output-port).
NOTE: This program handles only a subset of R4RS Scheme correctly
and removes all comments from its input program. Caveat utilitor.
(pp-string '("(let ((a 1) (b 2))"
"(cons a b))"))
==> ("(let ((a 1)"
" (b 2))"
" (cons a b))")
|