File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
redex-doc/redex/scribblings/ref Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -138,23 +138,27 @@ sets @racket[dc-for-text-size] and the latter does not.
138
138
@ex[(term->pict nums (+ 1 (+ 3 4 )))]
139
139
}
140
140
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?)]{
146
147
Like @racket[render-term], except that the @racket[term] argument is evaluated,
147
148
and expected to return a term. Then, @racket[pretty-write] is used
148
149
to determine where the line breaks go, using the @racket[width] argument
149
150
as a maximum width (via @racket[pretty-print-columns]).
150
151
152
+ If @racket[filename] is provided, the pict is saved as a pdf to that file.
153
+
151
154
152
155
@ex[(render-term/pretty-write nums '(+ (1 1 1 ) (1 0 1 )))]
153
156
}
154
157
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)])
158
162
pict?]{
159
163
Like @racket[term->pict], but with the same change that
160
164
@racket[render-term/pretty-write] has from @racket[render-term].
You can’t perform that action at this time.
0 commit comments