From 9137d5367e55bcec364273b0228ec988bbf6e47e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Aug 2008 01:15:22 +0000 Subject: [PATCH] set appripriate reader parameters for info.ss and .sxref files svn: r11349 --- collects/setup/getinfo.ss | 9 +++++---- collects/setup/scribble.ss | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/collects/setup/getinfo.ss b/collects/setup/getinfo.ss index bb3533c907..e0ac3caeed 100644 --- a/collects/setup/getinfo.ss +++ b/collects/setup/getinfo.ss @@ -1,6 +1,6 @@ #lang scheme/base -(require scheme/match scheme/contract planet/cachepath) +(require scheme/match scheme/contract planet/cachepath syntax/modread) ;; in addition to infodomain/compiled/cache.ss, getinfo will look in this ;; file to find mappings. PLaneT uses this to put info about installed @@ -29,9 +29,10 @@ x)]) (with-input-from-file file (lambda () - (begin0 (read) - (unless (eof-object? (read)) - (err "has multiple expressions"))))))) + (begin0 + (with-module-reading-parameterization read) + (unless (eof-object? (read)) + (err "has multiple expressions"))))))) (and (file-exists? file) (match (contents) [(list 'module 'info diff --git a/collects/setup/scribble.ss b/collects/setup/scribble.ss index c603a2bb6b..608e993643 100644 --- a/collects/setup/scribble.ss +++ b/collects/setup/scribble.ss @@ -10,6 +10,7 @@ scheme/file scheme/fasl scheme/serialize + syntax/modread scribble/base-render scribble/struct scribble/basic @@ -323,6 +324,9 @@ (define (read-out-sxref) (fasl->s-exp (current-input-port))) +(define (normalized-read) + (with-module-reading-parameterization read)) + (define (make-sci-cached sci info-out-file setup-printf) (when (verbose) (fprintf (current-error-port) " [Lazy ~a]\n" info-out-file)) @@ -395,7 +399,7 @@ auto-user? with-record-error setup-printf) doc))]) - (let* ([v-in (with-input-from-file info-in-file read)] + (let* ([v-in (with-input-from-file info-in-file normalized-read)] [v-out (with-input-from-file info-out-file read-out-sxref)]) (unless (and (equal? (car v-in) (list vers (doc-flags doc))) (equal? (car v-out) (list vers (doc-flags doc))))