pull out the right bindings from the right places
svn: r11882 original commit: c0bc68f35b85b511c1d8cb82679d892cb763953e
This commit is contained in:
parent
1c19af99c4
commit
c954445908
|
@ -1,22 +1,5 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require scheme/promise)
|
||||
|
||||
;; output
|
||||
|
||||
(provide output)
|
||||
(define (output x [p (current-output-port)])
|
||||
(let loop ([x x])
|
||||
(cond [(or (void? x) (not x) (null? x)) (void)]
|
||||
[(pair? x) (loop (car x)) (loop (cdr x))]
|
||||
[(promise? x) (loop (force x))]
|
||||
[(keyword? x) (loop (keyword->string x))]
|
||||
[(and (procedure? x) (procedure-arity-includes? x 0)) (loop (x))]
|
||||
[(bytes? x) (write-bytes x p)]
|
||||
[(string? x) (write-string x p)]
|
||||
[(char? x) (write-char x p)]
|
||||
[(number? x) (write x p)]
|
||||
[(symbol? x) (display x p)]
|
||||
;; generic fallback
|
||||
[else (error 'output "don't know how to render value: ~v" x)]))
|
||||
(void))
|
||||
(require scheme/promise "text/output.ss" "text/syntax-utils.ss")
|
||||
(provide (all-from-out scheme/promise "text/output.ss")
|
||||
begin/text include/text)
|
||||
|
|
Loading…
Reference in New Issue
Block a user