2017-02-19 12:49:30 +00:00
|
|
|
(define-module (gash io)
|
2017-02-19 09:17:49 +00:00
|
|
|
|
2018-07-07 18:32:46 +01:00
|
|
|
#:use-module (srfi srfi-1)
|
|
|
|
|
2018-06-26 19:34:07 +01:00
|
|
|
#:export (stdout stderr))
|
2017-02-19 09:17:49 +00:00
|
|
|
|
2017-04-08 20:39:43 +01:00
|
|
|
(define (output port o)
|
2017-02-19 09:17:49 +00:00
|
|
|
(map (lambda (o) (display o port)) o)
|
|
|
|
(newline port)
|
|
|
|
(force-output port))
|
|
|
|
|
|
|
|
(define (stdout . o)
|
|
|
|
(output (current-output-port) o)
|
2018-07-07 18:32:46 +01:00
|
|
|
(last o))
|
2017-02-19 09:17:49 +00:00
|
|
|
|
|
|
|
(define (stderr . o)
|
|
|
|
(output (current-error-port) o)
|
2018-07-07 18:32:46 +01:00
|
|
|
(last o))
|