revert unnecessary refactoring
--- intended to avoid creating a dependency that already exists
Merge 5.1.2
(cherry picked from commit ab0e78122c
)
This commit is contained in:
parent
bc46623eca
commit
5a5430f91e
|
@ -1,14 +1,14 @@
|
||||||
#lang scheme/base
|
#lang scheme/base
|
||||||
(require syntax/modcode
|
(require syntax/modcode
|
||||||
syntax/modresolve
|
syntax/modresolve
|
||||||
|
syntax/modread
|
||||||
setup/main-collects
|
setup/main-collects
|
||||||
unstable/file
|
unstable/file
|
||||||
scheme/file
|
scheme/file
|
||||||
scheme/list
|
scheme/list
|
||||||
scheme/path
|
scheme/path
|
||||||
racket/promise
|
racket/promise
|
||||||
openssl/sha1
|
openssl/sha1)
|
||||||
syntax/private/modread)
|
|
||||||
|
|
||||||
(provide make-compilation-manager-load/use-compiled-handler
|
(provide make-compilation-manager-load/use-compiled-handler
|
||||||
managed-compile-zo
|
managed-compile-zo
|
||||||
|
|
|
@ -1,11 +1,27 @@
|
||||||
(module modread mzscheme
|
(module modread mzscheme
|
||||||
(require racket/contract
|
(require racket/contract)
|
||||||
"private/modread.rkt")
|
|
||||||
|
|
||||||
(provide with-module-reading-parameterization)
|
(provide with-module-reading-parameterization)
|
||||||
(provide/contract
|
(provide/contract
|
||||||
[check-module-form ((or/c syntax? eof-object?) symbol? (or/c string? path? false/c) . -> . any)])
|
[check-module-form ((or/c syntax? eof-object?) symbol? (or/c string? path? false/c) . -> . any)])
|
||||||
|
|
||||||
|
(define (with-module-reading-parameterization thunk)
|
||||||
|
(parameterize ([read-case-sensitive #t]
|
||||||
|
[read-square-bracket-as-paren #t]
|
||||||
|
[read-curly-brace-as-paren #t]
|
||||||
|
[read-accept-box #t]
|
||||||
|
[read-accept-compiled #t]
|
||||||
|
[read-accept-bar-quote #t]
|
||||||
|
[read-accept-graph #t]
|
||||||
|
[read-decimal-as-inexact #t]
|
||||||
|
[read-accept-dot #t]
|
||||||
|
[read-accept-infix-dot #t]
|
||||||
|
[read-accept-quasiquote #t]
|
||||||
|
[read-accept-reader #t]
|
||||||
|
[read-accept-lang #t]
|
||||||
|
[current-readtable #f])
|
||||||
|
(thunk)))
|
||||||
|
|
||||||
(define (raise-wrong-module-name filename expected-name name)
|
(define (raise-wrong-module-name filename expected-name name)
|
||||||
(error 'load-handler
|
(error 'load-handler
|
||||||
"expected a `module' declaration for `~a' in ~s, found: ~a"
|
"expected a `module' declaration for `~a' in ~s, found: ~a"
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
#lang racket/base
|
|
||||||
|
|
||||||
(provide with-module-reading-parameterization)
|
|
||||||
|
|
||||||
(define (with-module-reading-parameterization thunk)
|
|
||||||
(parameterize ([read-case-sensitive #t]
|
|
||||||
[read-square-bracket-as-paren #t]
|
|
||||||
[read-curly-brace-as-paren #t]
|
|
||||||
[read-accept-box #t]
|
|
||||||
[read-accept-compiled #t]
|
|
||||||
[read-accept-bar-quote #t]
|
|
||||||
[read-accept-graph #t]
|
|
||||||
[read-decimal-as-inexact #t]
|
|
||||||
[read-accept-dot #t]
|
|
||||||
[read-accept-infix-dot #t]
|
|
||||||
[read-accept-quasiquote #t]
|
|
||||||
[read-accept-reader #t]
|
|
||||||
[read-accept-lang #t]
|
|
||||||
[current-readtable #f])
|
|
||||||
(thunk)))
|
|
Loading…
Reference in New Issue
Block a user