mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 17:50:29 +02:00
Revert "Add record type printers for srfi-41 and srfi-45."
This reverts commit 4a1cdc9d5d
, which was
prematurely pushed.
This commit is contained in:
parent
4a1cdc9d5d
commit
4b76acfa38
2 changed files with 2 additions and 29 deletions
|
@ -27,7 +27,6 @@
|
|||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-8)
|
||||
#:use-module (srfi srfi-9)
|
||||
#:use-module (srfi srfi-9 gnu)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (ice-9 match)
|
||||
#:export (stream-null stream-cons stream? stream-null? stream-pair?
|
||||
|
@ -149,7 +148,7 @@
|
|||
|
||||
(define stream? stream-promise?)
|
||||
|
||||
(define %stream-null (cons 'stream 'null))
|
||||
(define %stream-null '(stream . null))
|
||||
(define stream-null (stream-eager %stream-null))
|
||||
|
||||
(define (stream-null? obj)
|
||||
|
@ -181,26 +180,6 @@
|
|||
(define-syntax-rule (stream-lambda formals body0 body1 ...)
|
||||
(lambda formals (stream-lazy (begin body0 body1 ...))))
|
||||
|
||||
(set-record-type-printer! stream-promise
|
||||
(lambda (strm port)
|
||||
(display "#<stream" port)
|
||||
(let loop ((strm strm))
|
||||
(define value (stream-promise-val strm))
|
||||
(case (stream-value-tag value)
|
||||
((eager)
|
||||
(let ((pare (stream-value-proc value)))
|
||||
(if (eq? pare %stream-null)
|
||||
(write-char #\> port)
|
||||
(let* ((kar (stream-kar pare))
|
||||
(kar-value (stream-promise-val kar)))
|
||||
(write-char #\space port)
|
||||
(case (stream-value-tag kar-value)
|
||||
((eager) (write (stream-value-proc kar-value) port))
|
||||
((lazy) (write-char #\? port)))
|
||||
(loop (stream-kdr pare))))))
|
||||
((lazy)
|
||||
(display " ...>" port))))))
|
||||
|
||||
;;; Derived stream functions and macros: (streams derived)
|
||||
|
||||
(define-syntax-rule (define-stream (name . formal) body0 body1 ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue