From cbc5759254a876e229267d2619e9e9f7f1b0427f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 20 Mar 2009 00:34:07 +0000 Subject: [PATCH] fix SRFI 38 (PR 10141) svn: r14193 --- collects/srfi/38/38.ss | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/collects/srfi/38/38.ss b/collects/srfi/38/38.ss index b124d4c5bf..ce4306df4c 100644 --- a/collects/srfi/38/38.ss +++ b/collects/srfi/38/38.ss @@ -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)))