Skip to content

Commit 957935b

Browse files
florencerfindler
authored andcommitted
update pretty-write function docs to match implementation
1 parent 3e61b37 commit 957935b

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

redex-doc/redex/scribblings/ref/typesetting.scrbl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,27 @@ sets @racket[dc-for-text-size] and the latter does not.
138138
@ex[(term->pict nums (+ 1 (+ 3 4)))]
139139
}
140140

141-
@defproc[(render-term/pretty-write [lang compiled-lang?]
142-
[term any/c]
143-
[filename path-string?]
144-
[#:width width #f])
145-
void?]{
141+
@defproc[(render-term/pretty-write
142+
[lang compiled-lang?]
143+
[term any/c]
144+
[filename (or/c path-string? #f) #f]
145+
[#:width width (or/c exact-positive-integer? 'infinity) (pretty-print-columns)])
146+
(or/c void? pict?)]{
146147
Like @racket[render-term], except that the @racket[term] argument is evaluated,
147148
and expected to return a term. Then, @racket[pretty-write] is used
148149
to determine where the line breaks go, using the @racket[width] argument
149150
as a maximum width (via @racket[pretty-print-columns]).
150151

152+
If @racket[filename] is provided, the pict is saved as a pdf to that file.
153+
151154

152155
@ex[(render-term/pretty-write nums '(+ (1 1 1) (1 0 1)))]
153156
}
154157

155-
@defproc[(term->pict/pretty-write [lang compiled-lang?]
156-
[term any/c]
157-
[#:width width #f])
158+
@defproc[(term->pict/pretty-write
159+
[lang compiled-lang?]
160+
[term any/c]
161+
[#:width width (or/c exact-positive-integer? 'infinity) (pretty-print-columns)])
158162
pict?]{
159163
Like @racket[term->pict], but with the same change that
160164
@racket[render-term/pretty-write] has from @racket[render-term].

0 commit comments

Comments
 (0)