(system-pair-set-cdr! p (system-pair-cdr p*))
(set-cell-contents! promise* p))))))
(%force promise)))))
+
+(define-print-method promise?
+ (standard-print-method 'promise
+ (lambda (promise)
+ (if (promise-forced? promise)
+ (list '(evaluated) (promise-value promise))
+ (list '(unevaluated))))))
\f
;;;; Miscellany
object
#f)
-(define (default-object? object)
+(define-integrable (default-object? object)
(eq? object #!default))
-(define (default-object)
+(define-integrable (default-object)
#!default)
(define (gc-space-status)
(positive-fixnum ,print-number)
(primitive ,print-primitive-procedure)
(procedure ,print-compound-procedure)
- (promise ,print-promise)
(ratnum ,print-number)
(record ,print-record)
(return-address ,print-return-address)
(*print-readable-hash entity context))
(else (plain 'entity))))
-(define (print-promise promise context)
- (*print-with-brackets 'promise promise context
- (if (promise-forced? promise)
- (lambda (context*)
- (*print-string " (evaluated) " context*)
- (print-object (promise-value promise) context*))
- (lambda (context*)
- (*print-string " (unevaluated)" context*)
- (if (get-param:print-with-datum?)
- (begin
- (*print-char #\space context*)
- (*print-datum promise context*)))))))
-
(define (print-tagged-object object context)
(*print-with-brackets 'tagged-object object context
(lambda (context*)