removed current-pretty-printer (it was never released and it is

superceded by pretty-print-parameters).
This commit is contained in:
Robby Findler 2010-09-26 16:43:09 -05:00
parent f87aa7ec61
commit a6dea9b85c
5 changed files with 17 additions and 26 deletions

View File

@ -103,8 +103,4 @@
[default-pretty-printer
(-> any/c output-port? exact-nonnegative-integer? (is-a?/c text%)
void?)]
[pretty-print-parameters (parameter/c (-> (-> any) any))]
[current-pretty-printer
(parameter/c
(-> any/c output-port? exact-nonnegative-integer? (is-a?/c text%)
void?))])
[pretty-print-parameters (parameter/c (-> (-> any) any))])

View File

@ -9,7 +9,6 @@
size-editor-snip%
size-text%
default-pretty-printer
current-pretty-printer
pretty-print-parameters
initial-char-width
resizing-pasteboard-mixin
@ -44,8 +43,6 @@
(λ ()
(pretty-print v port)))))
(define current-pretty-printer (make-parameter default-pretty-printer))
(define reflowing-snip<%>
(interface ()
reflow-program))

View File

@ -50,10 +50,10 @@ todo:
(define updown-label (pick-label "" "^"))
(define back-label (pick-label "" "<-"))
(define (stepper red term [pp (current-pretty-printer)])
(define (stepper red term [pp default-pretty-printer])
(stepper/seed red (list term) pp))
(define (stepper/seed red seed [pp (current-pretty-printer)])
(define (stepper/seed red seed [pp default-pretty-printer])
(define term (car seed))
;; all-nodes-ht : hash[sexp -o> (is-a/c node%)]
(define all-nodes-ht (make-hash))

View File

@ -130,7 +130,7 @@
(define (traces/ps reductions pre-exprs filename
#:multiple? [multiple? #f]
#:pred [pred (λ (x) #t)]
#:pp [pp (current-pretty-printer)]
#:pp [pp default-pretty-printer]
#:racket-colors? [racket-colors? #t]
#:scheme-colors? [scheme-colors? racket-colors?]
#:colors [colors '()]
@ -241,7 +241,7 @@
(define (traces reductions pre-exprs
#:multiple? [multiple? #f]
#:pred [pred (λ (x) #t)]
#:pp [pp (current-pretty-printer)]
#:pp [pp default-pretty-printer]
#:colors [colors '()]
#:racket-colors? [racket-colors? #t]
#:scheme-colors? [scheme-colors? racket-colors?]

View File

@ -1458,7 +1458,7 @@ exploring reduction sequences.
[#:pp pp
(or/c (any -> string)
(any output-port number (is-a?/c text%) -> void))
(current-pretty-printer)]
default-pretty-printer]
[#:colors colors
(listof
(cons/c string?
@ -1577,7 +1577,7 @@ inserted into the editor by this library have a
[#:pp pp
(or/c (any -> string)
(any output-port number (is-a?/c text%) -> void))
(current-pretty-printer)]
default-pretty-printer]
[#:colors colors
(listof
(cons/c string?
@ -1607,7 +1607,7 @@ just before the PostScript is created with the graph pasteboard.
[t any/c]
[pp (or/c (any -> string)
(any output-port number (is-a?/c text%) -> void))
(current-pretty-printer)])
default-pretty-printer])
void?]{
This function opens a stepper window for exploring the
@ -1615,14 +1615,21 @@ behavior of its third argument in the reduction system
described by its first two arguments.
The @racket[pp] argument is the same as to the
@racket[traces] functions (above).
@racket[traces] functions (above) but is here for
backwards compatibility only and
should not be changed for most uses, but instead adjusted with
@racket[pretty-print-parameters]. Specifically, the
highlighting shown in the stepper window can be wrong if
@racket[default-pretty-printer] does not print sufficiently similarly
to how @racket[pretty-print] prints (when adjusted by
@racket[pretty-print-parameters]'s behavior, of course).
}
@defproc[(stepper/seed [reductions reduction-relation?]
[seed (cons/c any/c (listof any/c))]
[pp (or/c (any -> string)
(any output-port number (is-a?/c text%) -> void))
(current-pretty-printer)])
default-pretty-printer])
void?]{
Like @racket[stepper], this function opens a stepper window, but it
@ -1759,15 +1766,6 @@ color used to draw the label on the edge.
}
@defparam[current-pretty-printer pp (-> any/c
output-port?
exact-nonnegative-integer?
(is-a?/c text%)
void?)]{
A parameter that is used by the graphics tools to render
expressions. Defaults to @racket[default-pretty-printer].
}
@defproc[(default-pretty-printer [v any/c] [port output-port?] [width exact-nonnegative-integer?] [text (is-a?/c text%)]) void?]{
This is the default value of @racket[pp] used by @racket[traces] and