Remove most uses of mzscheme
in the core.
Remaining are: - parts of unit200 that Matthew plans to remove. - the `mzscheme` implementation itself. The implementation of `mzscheme` has been moved to the `mzscheme` collection (from the `racket` and `scheme` collections). The `scheme/mzscheme` language, which was undocumented, has been removed. This is slightly backwards-incompatible, because the `xform` handling of precompiled headers now evaluates code in a `racket/base`-like namespace, instead of in a `mzscheme`-like namespace. original commit: d54c1e4e4942c26dcbaaebcc43d5c92d507a8112
This commit is contained in:
parent
35c1d068c5
commit
b0043b013b
|
@ -1,4 +1,3 @@
|
|||
|
||||
(module sigutil mzscheme
|
||||
;; Used by unitsig.rkt
|
||||
;; (needs an overhaul, too)
|
||||
|
|
|
@ -1,3 +1,111 @@
|
|||
;;----------------------------------------------------------------------
|
||||
;; mzscheme: provide everything
|
||||
|
||||
(module main scheme/mzscheme
|
||||
(provide (all-from scheme/mzscheme)))
|
||||
(module mzscheme '#%kernel
|
||||
(#%require racket/private/more-scheme
|
||||
(all-except racket/private/misc
|
||||
collection-path
|
||||
collection-file-path)
|
||||
racket/private/letstx-scheme
|
||||
racket/private/stxcase-scheme
|
||||
racket/private/stx
|
||||
racket/private/qqstx
|
||||
racket/private/define
|
||||
mzscheme/private/stxmz-body
|
||||
mzscheme/private/old-ds
|
||||
mzscheme/private/old-rp
|
||||
mzscheme/private/old-if
|
||||
mzscheme/private/old-procs
|
||||
racket/private/map ; shadows #%kernel bindings
|
||||
racket/private/kernstruct
|
||||
racket/private/promise
|
||||
racket/private/cert
|
||||
(only racket/private/cond old-cond)
|
||||
;; shadows #%kernel bindings:
|
||||
(only racket/private/list
|
||||
assq assv assoc reverse)
|
||||
racket/private/member
|
||||
racket/tcp
|
||||
racket/udp
|
||||
'#%builtin) ; so it's attached
|
||||
|
||||
(#%provide require require-for-syntax require-for-template require-for-label
|
||||
provide provide-for-syntax provide-for-label
|
||||
(all-from-except racket/private/more-scheme case old-case
|
||||
log-fatal log-error log-warning log-info log-debug
|
||||
hash-update hash-update!)
|
||||
(rename old-case case)
|
||||
(all-from racket/private/misc)
|
||||
collection-path
|
||||
collection-file-path
|
||||
(all-from-except racket/private/stxcase-scheme _ datum datum-case with-datum)
|
||||
(all-from-except racket/private/letstx-scheme
|
||||
-define -define-syntax -define-struct
|
||||
cond old-cond else =>)
|
||||
(rename old-cond cond)
|
||||
define-struct let-struct
|
||||
identifier? ;; from racket/private/stx
|
||||
(all-from racket/private/cert)
|
||||
(all-from-except racket/private/qqstx quasidatum undatum undatum-splicing)
|
||||
(all-from racket/private/define)
|
||||
(all-from racket/private/kernstruct)
|
||||
force delay promise?
|
||||
(all-from-except '#%kernel #%module-begin #%datum
|
||||
if make-empty-namespace
|
||||
syntax->datum datum->syntax
|
||||
free-identifier=?
|
||||
free-transformer-identifier=?
|
||||
free-template-identifier=?
|
||||
free-label-identifier=?
|
||||
vector-copy!
|
||||
thread-send
|
||||
thread-receive
|
||||
thread-try-receive
|
||||
thread-receive-evt
|
||||
make-hash make-immutable-hash make-weak-hash
|
||||
make-hasheq make-immutable-hasheq make-weak-hasheq
|
||||
hash? hash-eq? hash-weak?
|
||||
hash-ref hash-set! hash-set
|
||||
hash-remove! hash-remove
|
||||
hash-copy hash-count
|
||||
hash-map hash-for-each
|
||||
hash-iterate-first hash-iterate-next
|
||||
hash-iterate-value hash-iterate-key
|
||||
log-message log-level? make-logger logger? current-logger logger-name
|
||||
make-log-receiver log-receiver?
|
||||
prop:incomplete-arity)
|
||||
(rename syntax->datum syntax-object->datum)
|
||||
(rename datum->syntax datum->syntax-object)
|
||||
(rename free-identifier=? module-identifier=?)
|
||||
(rename free-transformer-identifier=? module-transformer-identifier=?)
|
||||
(rename free-template-identifier=? module-template-identifier=?)
|
||||
(rename free-label-identifier=? module-label-identifier=?)
|
||||
(rename free-identifier=?* free-identifier=?)
|
||||
make-hash-table hash-table? make-immutable-hash-table
|
||||
(rename hash-ref hash-table-get)
|
||||
(rename hash-set! hash-table-put!)
|
||||
(rename hash-remove! hash-table-remove!)
|
||||
(rename hash-count hash-table-count)
|
||||
(rename hash-copy hash-table-copy)
|
||||
(rename hash-map hash-table-map)
|
||||
(rename hash-for-each hash-table-for-each)
|
||||
(rename hash-iterate-first hash-table-iterate-first)
|
||||
(rename hash-iterate-next hash-table-iterate-next)
|
||||
(rename hash-iterate-value hash-table-iterate-value)
|
||||
(rename hash-iterate-key hash-table-iterate-key)
|
||||
namespace-transformer-require
|
||||
transcript-on transcript-off
|
||||
(rename cleanse-path expand-path)
|
||||
(rename if* if)
|
||||
(rename list list-immutable)
|
||||
make-namespace
|
||||
#%top-interaction
|
||||
map for-each andmap ormap
|
||||
assq assv assoc reverse memq memv member
|
||||
(rename old-datum #%datum)
|
||||
(rename mzscheme-in-stx-module-begin #%module-begin)
|
||||
(rename #%module-begin #%plain-module-begin)
|
||||
(rename lambda #%plain-lambda)
|
||||
(rename #%app #%plain-app)
|
||||
(all-from racket/tcp)
|
||||
(all-from racket/udp)))
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
(module old-ds '#%kernel
|
||||
(#%require "define-struct.rkt"
|
||||
(#%require racket/private/define-struct
|
||||
(for-syntax '#%kernel
|
||||
"stxcase-scheme.rkt"))
|
||||
racket/private/stxcase-scheme))
|
||||
|
||||
(#%provide define-struct let-struct old-datum)
|
||||
|
|
@ -1,20 +1,46 @@
|
|||
|
||||
(module old-procs '#%kernel
|
||||
(#%require "small-scheme.rkt"
|
||||
"more-scheme.rkt"
|
||||
"define.rkt"
|
||||
"member.rkt")
|
||||
(#%require racket/private/small-scheme
|
||||
racket/private/more-scheme
|
||||
racket/private/define
|
||||
racket/private/member
|
||||
(only racket/private/misc collection-path collection-file-path))
|
||||
|
||||
(#%provide make-namespace
|
||||
free-identifier=?*
|
||||
namespace-transformer-require
|
||||
transcript-on
|
||||
transcript-off
|
||||
(rename new:collection-path collection-path)
|
||||
(rename new:collection-file-path collection-file-path)
|
||||
make-hash-table
|
||||
make-immutable-hash-table
|
||||
hash-table?)
|
||||
|
||||
(define reflect-var #f)
|
||||
|
||||
(define new:collection-path
|
||||
(let ([collection-path (lambda (collection . collections)
|
||||
(apply collection-path
|
||||
(lambda (s)
|
||||
(raise
|
||||
(exn:fail:filesystem
|
||||
(string-append "collection-path: " s)
|
||||
(current-continuation-marks))))
|
||||
collection collections))])
|
||||
collection-path))
|
||||
|
||||
(define new:collection-file-path
|
||||
(let ([collection-file-path (lambda (file-name collection . collections)
|
||||
(apply collection-file-path
|
||||
(lambda (s)
|
||||
(raise
|
||||
(exn:fail:filesystem
|
||||
(string-append "collection-file-path: " s)
|
||||
(current-continuation-marks))))
|
||||
file-name collection collections))])
|
||||
collection-file-path))
|
||||
|
||||
|
||||
(define make-namespace
|
||||
(case-lambda
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
(module old-rp '#%kernel
|
||||
(#%require (for-syntax '#%kernel "stx.rkt" "small-scheme.rkt" "stxcase-scheme.rkt"))
|
||||
(#%require (for-syntax '#%kernel racket/private/stx racket/private/small-scheme
|
||||
racket/private/stxcase-scheme))
|
||||
|
||||
(#%provide require require-for-syntax require-for-template require-for-label
|
||||
provide provide-for-syntax provide-for-label)
|
|
@ -2,8 +2,9 @@
|
|||
;; mzscheme's `#%module-begin'
|
||||
|
||||
(module stxmz-body '#%kernel
|
||||
(#%require "define.rkt"
|
||||
(for-syntax '#%kernel "stx.rkt"))
|
||||
;; These could probably change to just be `(require racket/base)`.
|
||||
(#%require racket/private/define
|
||||
(for-syntax '#%kernel racket/private/stx))
|
||||
|
||||
;; So that expansions print the way the Racket programmer expects:
|
||||
(#%require (rename '#%kernel #%plain-module-begin #%module-begin))
|
||||
|
@ -16,7 +17,7 @@
|
|||
(list* (quote-syntax #%plain-module-begin)
|
||||
(datum->syntax
|
||||
stx
|
||||
(list (quote-syntax #%require) '(for-syntax scheme/mzscheme)))
|
||||
(list (quote-syntax #%require) '(for-syntax mzscheme)))
|
||||
(stx-cdr stx))
|
||||
stx)
|
||||
(raise-syntax-error #f "bad syntax" stx))))
|
Loading…
Reference in New Issue
Block a user