1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-06 04:00:26 +02:00

* boot-9.scm: values?, get-values, values, call-with-values:

removed.  values and call-with-values are now primitives and
	the other two were only exported by accident.  don't define
	*values-rtd* record type or handle multiple values in
	scm-style-repl.
This commit is contained in:
Gary Houston 2000-11-26 18:28:57 +00:00
parent ce21243418
commit 3923fa6d06
2 changed files with 9 additions and 33 deletions

View file

@ -1,3 +1,11 @@
2000-11-26 Gary Houston <ghouston@arglist.com>
* boot-9.scm: values?, get-values, values, call-with-values:
removed. values and call-with-values are now primitives and
the other two were only exported by accident. don't define
*values-rtd* record type or handle multiple values in
scm-style-repl.
2000-11-07 Gary Houston <ghouston@arglist.com> 2000-11-07 Gary Houston <ghouston@arglist.com>
* popen.scm (open-output-pipe): added docstrings for open-input-pipe * popen.scm (open-output-pipe): added docstrings for open-input-pipe

View file

@ -510,36 +510,6 @@
answer answer
(loop (cons init answer) (- n 1))))) (loop (cons init answer) (- n 1)))))
;;; {Multiple return values}
(define *values-rtd*
(make-record-type "values"
'(values)))
;;; These two are needed internally in boot-9.scm.
;;; They shouldn't be visible outside this module.
(define values? (record-predicate *values-rtd*))
(define get-values (record-accessor *values-rtd* 'values))
(define values
(let ((make-values (record-constructor *values-rtd*)))
(lambda x
(if (and (not (null? x))
(null? (cdr x)))
(car x)
(make-values x)))))
(define call-with-values
(lambda (producer consumer)
(let ((result (producer)))
(if (values? result)
(apply consumer (get-values result))
(consumer result)))))
(provide 'values)
;;; {and-map and or-map} ;;; {and-map and or-map}
;;; ;;;
@ -2591,9 +2561,7 @@
(lambda (result) (lambda (result)
(if (not scm-repl-silent) (if (not scm-repl-silent)
(begin (begin
(if (values? result) (maybe-print result)
(for-each maybe-print (get-values result))
(maybe-print result))
(if scm-repl-verbose (if scm-repl-verbose
(repl-report)) (repl-report))
(force-output)))))) (force-output))))))