fix SRFI 38 (PR 10141)

svn: r14193
This commit is contained in:
Matthew Flatt 2009-03-20 00:34:07 +00:00
parent 55dd268c64
commit cbc5759254

View File

@ -1,8 +1,14 @@
#lang scheme/base
(provide s:read s:write)
(define (write-with-shared-structure val [port (current-output-port)] [optarg #f])
(parameterize ([print-graph #t]) (write val port)))
(define (read-with-shared-structure [port (current-input-port)] [optarg #f])
(parameterize ([read-accept-graph #t])
(read port)))
(provide write-with-shared-structure
(rename-out [write-with-shared-structure write/ss])
read-with-shared-structure
(rename-out [read-with-shared-structure read/ss]))
(define (s:write . args)
(parameterize ([print-graph #t]) (apply write args)))
(define (s:read . args)
(parameterize ([read-accept-graph #t]) (apply read args)))