summary refs log tree commit diff stats
path: root/boudin.util.scm
diff options
context:
space:
mode:
Diffstat (limited to 'boudin.util.scm')
-rw-r--r--boudin.util.scm19
1 files changed, 7 insertions, 12 deletions
diff --git a/boudin.util.scm b/boudin.util.scm index 2683730..b5c3efe 100644 --- a/boudin.util.scm +++ b/boudin.util.scm
@@ -5,17 +5,16 @@
5 edisplay 5 edisplay
6 eprint)) 6 eprint))
7 7
8(import (srfi 1) 8(import (chicken io)
9 (srfi 1)
9 (srfi 152)) 10 (srfi 152))
10 11
11(define (edisplay x) 12(define (edisplay x)
12 (parameterize ((current-output-port (current-error-port))) 13 (display x (current-error-port)))
13 (display x)))
14 14
15(define (eprint . xs) 15(define (eprint . xs)
16 (parameterize ((current-output-port (current-error-port))) 16 (for-each edisplay xs)
17 (for-each display xs) 17 (newline (current-error-port)))
18 (newline)))
19 18
20(define (assoc-ref k alist) 19(define (assoc-ref k alist)
21 (let ((k/v (and (pair? alist) 20 (let ((k/v (and (pair? alist)
@@ -60,9 +59,5 @@
60 (case-lambda 59 (case-lambda
61 (() (slurp (current-input-port))) 60 (() (slurp (current-input-port)))
62 ((port) 61 ((port)
63 (let loop ((ch (read-char port)) 62 (read-string #f port) ; CHICKEN-ism
64 (acc '())) 63 )))
65 (if (eof-object? ch)
66 (list->string (reverse acc))
67 (loop (read-char port)
68 (cons ch acc)))))))