mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-22 07:09:18 +02:00
write/ss only falls back on write in unknown cases.
This commit is contained in:
parent
325b3e20b3
commit
af71abc817
1 changed files with 7 additions and 0 deletions
|
@ -106,7 +106,14 @@
|
|||
((let ((type (type-of x)))
|
||||
(and (type? type) (type-printer type)))
|
||||
=> (lambda (printer) (printer x wr out)))
|
||||
((null? x) (display "()" out))
|
||||
((char? x) (display "#\\" out) (write-char x out))
|
||||
((symbol? x) (display (symbol->string x) out))
|
||||
((number? x) (display (number->string x) out))
|
||||
((eq? x #t) (display "#t" out))
|
||||
((eq? x #f) (display "#f" out))
|
||||
(else
|
||||
;; (display "#<unknown>" out)
|
||||
(write x out))))))))
|
||||
|
||||
(define write/ss write-with-shared-structure)
|
||||
|
|
Loading…
Add table
Reference in a new issue