cs: prinitng for unsafe-undefined
Although `unsafe-undefined` should never arrive at a printing function, handle it a little better if it smoehow does.
This commit is contained in:
parent
1646d294fd
commit
d358a4135b
|
@ -3,6 +3,7 @@
|
|||
racket/fixnum
|
||||
racket/symbol
|
||||
racket/keyword
|
||||
racket/unsafe/undefined
|
||||
"../common/check.rkt"
|
||||
"../port/output-port.rkt"
|
||||
"../port/input-port.rkt"
|
||||
|
@ -343,6 +344,8 @@
|
|||
(print-named "output-port" v mode o max-length)]
|
||||
[(unquoted-printing-string? v)
|
||||
(write-string/max (unquoted-printing-string-value v) o max-length)]
|
||||
[(eq? v unsafe-undefined)
|
||||
(write-string/max "#<unsafe-undefined>" o max-length)]
|
||||
[else
|
||||
;; As a last resort, fall back to the host `format`:
|
||||
(write-string/max (format "~s" v) o max-length)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user