diff options
author | Chris K. Jester-Young <cky944@gmail.com> | 2013-04-04 22:18:40 -0400 |
---|---|---|
committer | Chris K. Jester-Young <cky944@gmail.com> | 2013-04-04 22:22:43 -0400 |
commit | 4a1cdc9d5d643d05fa7a18febc7c12070f3ef6d9 (patch) | |
tree | b41d3de2e2497f2dfc706da8002e62e2d5c56c63 /module/srfi/srfi-45.scm | |
parent | cdd3d6c9f423d5b95f05193fe3c27d50b56957e9 (diff) | |
download | guile-4a1cdc9d5d643d05fa7a18febc7c12070f3ef6d9.tar.gz |
Add record type printers for srfi-41 and srfi-45.
* module/srfi/srfi-41.scm: Add record type printer for streams.
* module/srfi/srfi-45.scm: Add record type printer for promises.
Diffstat (limited to 'module/srfi/srfi-45.scm')
-rw-r--r-- | module/srfi/srfi-45.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/srfi/srfi-45.scm b/module/srfi/srfi-45.scm index 51947700c..ae08f9b92 100644 --- a/module/srfi/srfi-45.scm +++ b/module/srfi/srfi-45.scm @@ -39,7 +39,8 @@ eager promise?) #:replace (delay force promise?) - #:use-module (srfi srfi-9)) + #:use-module (srfi srfi-9) + #:use-module (srfi srfi-9 gnu)) (cond-expand-provide (current-module) '(srfi-45)) @@ -76,3 +77,8 @@ ;; (*) These two lines re-fetch and check the original promise in case ;; the first line of the let* caused it to be forced. For an example ;; where this happens, see reentrancy test 3 below. + +(set-record-type-printer! promise + (lambda (promise port) + (define content (promise-val promise)) + (format port "#<~a ~s>" (value-tag content) (value-proc content)))) |