move most of the 'scheme' collection to the 'racket' collection
original commit: c95a39875453e7f057395a7bf626e5d2ed732e7e
This commit is contained in:
parent
b2b3c44aa4
commit
7b544af2a5
|
@ -1,3 +1,3 @@
|
||||||
(module class mzscheme
|
(module class mzscheme
|
||||||
(require scheme/private/class-internal)
|
(require racket/private/class-internal)
|
||||||
(provide-public-names))
|
(provide-public-names))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang scheme/base
|
#lang racket/base
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
|
@ -25,37 +25,37 @@
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
;; provide everything from the scheme/ implementation
|
;; provide everything from the racket/ implementation
|
||||||
;; except the arrow contracts
|
;; except the arrow contracts
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(require scheme/contract/private/base
|
(require racket/contract/private/base
|
||||||
scheme/contract/private/misc
|
racket/contract/private/misc
|
||||||
scheme/contract/private/provide
|
racket/contract/private/provide
|
||||||
scheme/contract/private/guts
|
racket/contract/private/guts
|
||||||
scheme/contract/private/ds
|
racket/contract/private/ds
|
||||||
scheme/contract/private/opt
|
racket/contract/private/opt
|
||||||
scheme/contract/private/basic-opters)
|
racket/contract/private/basic-opters)
|
||||||
|
|
||||||
(provide
|
(provide
|
||||||
opt/c define-opt/c ;(all-from "private/contract-opt.ss")
|
opt/c define-opt/c ;(all-from "private/contract-opt.ss")
|
||||||
(except-out (all-from-out scheme/contract/private/ds)
|
(except-out (all-from-out racket/contract/private/ds)
|
||||||
lazy-depth-to-look)
|
lazy-depth-to-look)
|
||||||
|
|
||||||
(all-from-out scheme/contract/private/base)
|
(all-from-out racket/contract/private/base)
|
||||||
(all-from-out scheme/contract/private/provide)
|
(all-from-out racket/contract/private/provide)
|
||||||
(except-out (all-from-out scheme/contract/private/misc)
|
(except-out (all-from-out racket/contract/private/misc)
|
||||||
check-between/c
|
check-between/c
|
||||||
string-len/c
|
string-len/c
|
||||||
check-unary-between/c)
|
check-unary-between/c)
|
||||||
(rename-out [or/c union])
|
(rename-out [or/c union])
|
||||||
(rename-out [string-len/c string/len])
|
(rename-out [string-len/c string/len])
|
||||||
(except-out (all-from-out scheme/contract/private/guts)
|
(except-out (all-from-out racket/contract/private/guts)
|
||||||
check-flat-contract
|
check-flat-contract
|
||||||
check-flat-named-contract))
|
check-flat-named-contract))
|
||||||
|
|
||||||
|
|
||||||
;; copied here because not provided by scheme/contract anymore
|
;; copied here because not provided by racket/contract anymore
|
||||||
(define (flat-contract/predicate? pred)
|
(define (flat-contract/predicate? pred)
|
||||||
(or (flat-contract? pred)
|
(or (flat-contract? pred)
|
||||||
(and (procedure? pred)
|
(and (procedure? pred)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#lang mzscheme
|
#lang mzscheme
|
||||||
|
|
||||||
(require setup/main-collects
|
(require setup/main-collects
|
||||||
scheme/local
|
racket/local
|
||||||
scheme/bool
|
racket/bool
|
||||||
(only scheme/base
|
(only scheme/base
|
||||||
build-string
|
build-string
|
||||||
build-list
|
build-list
|
||||||
|
|
|
@ -1,27 +1,9 @@
|
||||||
#lang mzscheme
|
#lang racket/base
|
||||||
|
|
||||||
;; The `first', etc. operations in this library
|
;; The `first', etc. operations in this library
|
||||||
;; work on pairs, not lists.
|
;; work on pairs, not lists.
|
||||||
|
|
||||||
(require (only scheme/base
|
(require (only-in scheme/list
|
||||||
foldl
|
|
||||||
foldr
|
|
||||||
|
|
||||||
remv
|
|
||||||
remq
|
|
||||||
remove
|
|
||||||
remv*
|
|
||||||
remq*
|
|
||||||
remove*
|
|
||||||
|
|
||||||
findf
|
|
||||||
memf
|
|
||||||
assf
|
|
||||||
|
|
||||||
filter
|
|
||||||
|
|
||||||
sort)
|
|
||||||
(only scheme/list
|
|
||||||
cons?
|
cons?
|
||||||
empty?
|
empty?
|
||||||
empty
|
empty
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang scheme/base
|
#lang racket/base
|
||||||
|
|
||||||
(require scheme/match/legacy-match)
|
(require racket/match/legacy-match)
|
||||||
(provide (all-from-out scheme/match/legacy-match))
|
(provide (all-from-out racket/match/legacy-match))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang scheme/base
|
#lang scheme/base
|
||||||
|
|
||||||
(require scheme/match/match)
|
(require racket/match/match)
|
||||||
(provide (all-from-out scheme/match/match))
|
(provide (all-from-out racket/match/match))
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#lang scheme/base
|
#lang racket/base
|
||||||
|
|
||||||
(require (for-syntax scheme/base)
|
(require (for-syntax racket/base)
|
||||||
mzlib/etc
|
racket/contract/base
|
||||||
scheme/contract/base
|
|
||||||
mzlib/list
|
mzlib/list
|
||||||
"private/port.ss")
|
"private/port.ss")
|
||||||
|
|
||||||
|
@ -118,7 +117,7 @@
|
||||||
;; 0 always (which implies that the `read' proc must not return
|
;; 0 always (which implies that the `read' proc must not return
|
||||||
;; a pipe input port).
|
;; a pipe input port).
|
||||||
(define make-input-port/read-to-peek
|
(define make-input-port/read-to-peek
|
||||||
(opt-lambda (name read fast-peek close
|
(lambda (name read fast-peek close
|
||||||
[location-proc #f]
|
[location-proc #f]
|
||||||
[count-lines!-proc void]
|
[count-lines!-proc void]
|
||||||
[init-position 1]
|
[init-position 1]
|
||||||
|
@ -440,7 +439,7 @@
|
||||||
(buffer-mode-proc mode)])))))
|
(buffer-mode-proc mode)])))))
|
||||||
|
|
||||||
(define peeking-input-port
|
(define peeking-input-port
|
||||||
(opt-lambda (orig-in [name (object-name orig-in)] [delta 0])
|
(lambda (orig-in [name (object-name orig-in)] [delta 0])
|
||||||
(make-input-port/read-to-peek
|
(make-input-port/read-to-peek
|
||||||
name
|
name
|
||||||
(lambda (s)
|
(lambda (s)
|
||||||
|
@ -452,11 +451,11 @@
|
||||||
void)))
|
void)))
|
||||||
|
|
||||||
(define relocate-input-port
|
(define relocate-input-port
|
||||||
(opt-lambda (p line col pos [close? #t])
|
(lambda (p line col pos [close? #t])
|
||||||
(transplant-to-relocate transplant-input-port p line col pos close?)))
|
(transplant-to-relocate transplant-input-port p line col pos close?)))
|
||||||
|
|
||||||
(define transplant-input-port
|
(define transplant-input-port
|
||||||
(opt-lambda (p location-proc pos [close? #t] [count-lines!-proc void])
|
(lambda (p location-proc pos [close? #t] [count-lines!-proc void])
|
||||||
(make-input-port
|
(make-input-port
|
||||||
(object-name p)
|
(object-name p)
|
||||||
(lambda (s)
|
(lambda (s)
|
||||||
|
@ -486,7 +485,7 @@
|
||||||
;; thread when write evts are active; otherwise, we use a lock semaphore.
|
;; thread when write evts are active; otherwise, we use a lock semaphore.
|
||||||
;; (Actually, the lock semaphore has to be used all the time, to guard
|
;; (Actually, the lock semaphore has to be used all the time, to guard
|
||||||
;; the flag indicating whether the manager thread is running.)
|
;; the flag indicating whether the manager thread is running.)
|
||||||
(opt-lambda ([limit (expt 2 64)] [in-name 'pipe] [out-name 'pipe])
|
(lambda ([limit (expt 2 64)] [in-name 'pipe] [out-name 'pipe])
|
||||||
(let-values ([(r w) (make-pipe limit)]
|
(let-values ([(r w) (make-pipe limit)]
|
||||||
[(more) null]
|
[(more) null]
|
||||||
[(more-last) #f]
|
[(more-last) #f]
|
||||||
|
@ -724,7 +723,7 @@
|
||||||
(values in out))))
|
(values in out))))
|
||||||
|
|
||||||
(define input-port-append
|
(define input-port-append
|
||||||
(opt-lambda (close-orig? . ports)
|
(lambda (close-orig? . ports)
|
||||||
(make-input-port
|
(make-input-port
|
||||||
(map object-name ports)
|
(map object-name ports)
|
||||||
(lambda (str)
|
(lambda (str)
|
||||||
|
@ -815,7 +814,7 @@
|
||||||
(loop half skip)))))))
|
(loop half skip)))))))
|
||||||
|
|
||||||
(define make-limited-input-port
|
(define make-limited-input-port
|
||||||
(opt-lambda (port limit [close-orig? #t])
|
(lambda (port limit [close-orig? #t])
|
||||||
(let ([got 0])
|
(let ([got 0])
|
||||||
(make-input-port
|
(make-input-port
|
||||||
(object-name port)
|
(object-name port)
|
||||||
|
@ -1208,7 +1207,7 @@
|
||||||
(loop (add1 i) (add1 j))]))))]))
|
(loop (add1 i) (add1 j))]))))]))
|
||||||
|
|
||||||
(define reencode-input-port
|
(define reencode-input-port
|
||||||
(opt-lambda (port encoding [error-bytes #f] [close? #f]
|
(lambda (port encoding [error-bytes #f] [close? #f]
|
||||||
[name (object-name port)]
|
[name (object-name port)]
|
||||||
[newline-convert? #f]
|
[newline-convert? #f]
|
||||||
[decode-error (lambda (msg port)
|
[decode-error (lambda (msg port)
|
||||||
|
@ -1345,7 +1344,7 @@
|
||||||
;; --------------------------------------------------
|
;; --------------------------------------------------
|
||||||
|
|
||||||
(define reencode-output-port
|
(define reencode-output-port
|
||||||
(opt-lambda (port encoding [error-bytes #f] [close? #f]
|
(lambda (port encoding [error-bytes #f] [close? #f]
|
||||||
[name (object-name port)]
|
[name (object-name port)]
|
||||||
[convert-newlines-to #f]
|
[convert-newlines-to #f]
|
||||||
[decode-error (lambda (msg port)
|
[decode-error (lambda (msg port)
|
||||||
|
@ -1664,7 +1663,7 @@
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
(define dup-output-port
|
(define dup-output-port
|
||||||
(opt-lambda (p [close? #f])
|
(lambda (p [close? #f])
|
||||||
(let ([new (transplant-output-port
|
(let ([new (transplant-output-port
|
||||||
p
|
p
|
||||||
(lambda () (port-next-location p))
|
(lambda () (port-next-location p))
|
||||||
|
@ -1677,7 +1676,7 @@
|
||||||
new)))
|
new)))
|
||||||
|
|
||||||
(define dup-input-port
|
(define dup-input-port
|
||||||
(opt-lambda (p [close? #f])
|
(lambda (p [close? #f])
|
||||||
(let ([new (transplant-input-port
|
(let ([new (transplant-input-port
|
||||||
p
|
p
|
||||||
(lambda () (port-next-location p))
|
(lambda () (port-next-location p))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#lang scheme/base
|
#lang racket/base
|
||||||
|
|
||||||
(provide (all-defined-out))
|
(provide (all-defined-out))
|
||||||
(require scheme/contract/private/guts)
|
(require racket/contract/private/guts)
|
||||||
|
|
||||||
(define empty-case-lambda/c
|
(define empty-case-lambda/c
|
||||||
(flat-named-contract '(case->)
|
(flat-named-contract '(case->)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
(require (for-syntax scheme/base))
|
(require (for-syntax scheme/base))
|
||||||
(require (for-template scheme/base)
|
(require (for-template scheme/base)
|
||||||
(for-template scheme/contract/private/guts)
|
(for-template racket/contract/private/guts)
|
||||||
(for-template "contract-arr-checks.ss"))
|
(for-template "contract-arr-checks.ss"))
|
||||||
|
|
||||||
(provide make-/proc ->/h ->*/h ->d/h ->d*/h ->r/h
|
(provide make-/proc ->/h ->*/h ->d/h ->d*/h ->r/h
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#lang scheme/base
|
#lang racket/base
|
||||||
|
|
||||||
(require scheme/contract/private/guts
|
(require racket/contract/private/guts
|
||||||
scheme/contract/private/opt
|
racket/contract/private/opt
|
||||||
"contract-arr-checks.ss")
|
"contract-arr-checks.ss")
|
||||||
(require (for-syntax scheme/base)
|
(require (for-syntax racket/base)
|
||||||
(for-syntax scheme/contract/private/opt-guts)
|
(for-syntax racket/contract/private/opt-guts)
|
||||||
(for-syntax scheme/contract/private/helpers)
|
(for-syntax racket/contract/private/helpers)
|
||||||
(for-syntax "contract-arr-obj-helpers.ss")
|
(for-syntax "contract-arr-obj-helpers.ss")
|
||||||
(for-syntax syntax/stx)
|
(for-syntax syntax/stx)
|
||||||
(for-syntax syntax/name))
|
(for-syntax syntax/name))
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#lang scheme/base
|
#lang racket/base
|
||||||
|
|
||||||
(provide define/contract)
|
(provide define/contract)
|
||||||
|
|
||||||
(require (for-syntax scheme/base
|
(require (for-syntax racket/base
|
||||||
unstable/srcloc
|
unstable/srcloc
|
||||||
(prefix-in a: scheme/contract/private/helpers))
|
(prefix-in a: racket/contract/private/helpers))
|
||||||
(only-in scheme/contract/private/base contract))
|
(only-in racket/contract/private/base contract))
|
||||||
|
|
||||||
;; First, we have the old define/contract implementation, which
|
;; First, we have the old define/contract implementation, which
|
||||||
;; is still used in mzlib/contract.
|
;; is still used in mzlib/contract.
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#lang scheme/base
|
#lang racket/base
|
||||||
(require "contract-arrow.ss"
|
(require "contract-arrow.ss"
|
||||||
scheme/contract/private/guts
|
racket/contract/private/guts
|
||||||
scheme/private/class-internal
|
racket/private/class-internal
|
||||||
"contract-arr-checks.ss")
|
"contract-arr-checks.ss")
|
||||||
|
|
||||||
(require (for-syntax scheme/base
|
(require (for-syntax racket/base
|
||||||
scheme/contract/private/helpers
|
racket/contract/private/helpers
|
||||||
"contract-arr-obj-helpers.ss"))
|
"contract-arr-obj-helpers.ss"))
|
||||||
|
|
||||||
(provide mixin-contract
|
(provide mixin-contract
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
mzlib/etc
|
mzlib/etc
|
||||||
mzlib/list
|
mzlib/list
|
||||||
;; core [de]serializer:
|
;; core [de]serializer:
|
||||||
scheme/private/serialize)
|
racket/private/serialize)
|
||||||
|
|
||||||
(provide define-serializable-struct
|
(provide define-serializable-struct
|
||||||
define-serializable-struct/versions
|
define-serializable-struct/versions
|
||||||
|
|
||||||
;; core [de]serializer:
|
;; core [de]serializer:
|
||||||
(all-from scheme/private/serialize))
|
(all-from racket/private/serialize))
|
||||||
|
|
||||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; define-serializable-struct
|
;; define-serializable-struct
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"private/unit-syntax.ss"))
|
"private/unit-syntax.ss"))
|
||||||
|
|
||||||
(require mzlib/etc
|
(require mzlib/etc
|
||||||
scheme/contract/base
|
racket/contract/base
|
||||||
scheme/stxparam
|
scheme/stxparam
|
||||||
unstable/location
|
unstable/location
|
||||||
"private/unit-contract.ss"
|
"private/unit-contract.ss"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
|
||||||
(module old-procs '#%kernel
|
(module old-procs '#%kernel
|
||||||
(#%require "small-scheme.ss"
|
(#%require "small-scheme.rkt"
|
||||||
"more-scheme.ss"
|
"more-scheme.rkt"
|
||||||
"misc.ss"
|
"misc.rkt"
|
||||||
"stxmz-body.ss"
|
"stxmz-body.rkt"
|
||||||
"define.ss")
|
"define.rkt")
|
||||||
|
|
||||||
(#%provide make-namespace
|
(#%provide make-namespace
|
||||||
free-identifier=?*
|
free-identifier=?*
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
(module old-rp '#%kernel
|
(module old-rp '#%kernel
|
||||||
(#%require (for-syntax '#%kernel "stx.ss" "small-scheme.ss" "stxcase-scheme.ss"))
|
(#%require (for-syntax '#%kernel "stx.rkt" "small-scheme.rkt" "stxcase-scheme.rkt"))
|
||||||
|
|
||||||
(#%provide require require-for-syntax require-for-template require-for-label
|
(#%provide require require-for-syntax require-for-template require-for-label
|
||||||
provide provide-for-syntax provide-for-label)
|
provide provide-for-syntax provide-for-label)
|
|
@ -2,8 +2,8 @@
|
||||||
;; mzscheme's `#%module-begin'
|
;; mzscheme's `#%module-begin'
|
||||||
|
|
||||||
(module stxmz-body '#%kernel
|
(module stxmz-body '#%kernel
|
||||||
(#%require "stxcase-scheme.ss" "define.ss"
|
(#%require "stxcase-scheme.rkt" "define.rkt"
|
||||||
(for-syntax '#%kernel "stx.ss"))
|
(for-syntax '#%kernel "stx.rkt"))
|
||||||
|
|
||||||
;; So that expansions print the way the MzScheme programmer expects:
|
;; So that expansions print the way the MzScheme programmer expects:
|
||||||
(#%require (rename '#%kernel #%plain-module-begin #%module-begin))
|
(#%require (rename '#%kernel #%plain-module-begin #%module-begin))
|
2
collects/scheme/mpair.rkt
Normal file
2
collects/scheme/mpair.rkt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#lang scheme/private/provider
|
||||||
|
racket/mpair
|
2
collects/scheme/package.rkt
Normal file
2
collects/scheme/package.rkt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#lang scheme/private/provider
|
||||||
|
racket/package
|
Loading…
Reference in New Issue
Block a user