Merge branch 'master' of git:plt

This commit is contained in:
John Clements 2010-04-20 16:31:36 -07:00
commit 377aa7031d
989 changed files with 6612 additions and 7037 deletions

View File

@ -173,7 +173,7 @@
(bytes=? (subbytes b 0 len) skip-path))) (bytes=? (subbytes b 0 len) skip-path)))
-inf.0))]) -inf.0))])
(let* ([sses (append (let* ([sses (append
;; Find all .ss/.scm files: ;; Find all .rkt/.ss/.scm files:
(filter extract-base-filename/ss (directory-list)) (filter extract-base-filename/ss (directory-list))
;; Add specified doc sources: ;; Add specified doc sources:
(if skip-docs? (if skip-docs?

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(provide add-plt-segment (provide add-plt-segment
get/set-dylib-path) get/set-dylib-path)

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(provide bytes->utf-16-bytes (provide bytes->utf-16-bytes
utf-16-bytes->bytes) utf-16-bytes->bytes)

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(require "config.ss") (require "config.ss")
(provide (all-from-out "config.ss")) (provide (all-from-out "config.ss"))

View File

@ -48,7 +48,7 @@
[else #f])) [else #f]))
extract-base-filename)]) extract-base-filename)])
(values (values
(mk 'extract-base-filename/ss #"ss|scm" "Scheme" #f) (mk 'extract-base-filename/ss #"rkt|ss|scm" "Racket" #f)
(mk 'extract-base-filename/c (mk 'extract-base-filename/c
#"c|cc|cxx|cpp|c[+][+]|m" "C" ".c, .cc, .cxx, .cpp, .c++, or .m") #"c|cc|cxx|cpp|c[+][+]|m" "C" ".c, .cc, .cxx, .cpp, .c++, or .m")
(mk 'extract-base-filename/kp #"kp" "constant pool" ".kp") (mk 'extract-base-filename/kp #"kp" "constant pool" ".kp")

View File

@ -2,7 +2,7 @@
(require syntax/moddep (require syntax/moddep
mzlib/class mzlib/class
scheme/private/namespace racket/private/namespace
mred) mred)
(provide eval/annotations (provide eval/annotations

View File

@ -1,7 +1,7 @@
#lang scheme/base #lang scheme/base
(require (for-syntax scheme/base) (require (for-syntax scheme/base)
(for-syntax scheme/private/struct-info) (for-syntax racket/private/struct-info)
scheme/list scheme/list
scheme/match scheme/match
unstable/struct unstable/struct

View File

@ -156,9 +156,10 @@ docsrc-filter := (+ (collects: "setup/scribble.ss") ; only with doc sources
std-docs) std-docs)
man-filter := (man: "*") man-filter := (man: "*")
tests-filter := (+ (collects: "**/tests/") (srcfile: "tests.ss")) tests-filter := (+ (collects: "**/tests/") (srcfile: "tests.ss"))
gui-filter := (- (+ (collects: "**/gui/") (srcfile: "gui.ss")) gui-filter := (- (+ (collects: "**/gui/") (srcfile: "gui.rkt"))
;; for use in mz code that works in mr too ;; for use in mz code that works in mr too
(srcfile: "scheme/gui/dynamic.ss")) (srcfile: "scheme/gui/dynamic.rkt")
(srcfile: "racket/gui/dynamic.rkt"))
tools-filter := (+ (collects: "**/tools/") (srcfile: "tools.ss")) tools-filter := (+ (collects: "**/tools/") (srcfile: "tools.ss"))
;; these are in the doc directory, but are comitted in svn and should be ;; these are in the doc directory, but are comitted in svn and should be

View File

@ -2,7 +2,7 @@
;; All of the implementation is actually in private/class-internal.ss, ;; All of the implementation is actually in private/class-internal.ss,
;; which provides extra (private) functionality to contract.ss. ;; which provides extra (private) functionality to contract.ss.
(require scheme/private/class-internal) (require racket/private/class-internal)
(provide (rename class-traced class) (provide (rename class-traced class)
(rename class*-traced class*) (rename class*-traced class*)

View File

@ -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))

View File

@ -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)

View File

@ -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

View File

@ -1,31 +1,13 @@
#lang mzscheme #lang scheme/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 cons?
foldr empty?
empty
remv last-pair))
remq
remove
remv*
remq*
remove*
findf
memf
assf
filter
sort)
(only scheme/list
cons?
empty?
empty
last-pair))
(provide first (provide first
second second

View File

@ -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))

View File

@ -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))

View File

@ -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,13 +117,13 @@
;; 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]
[buffer-mode-proc #f] [buffer-mode-proc #f]
[buffering? #f] [buffering? #f]
[on-consumed #f]) [on-consumed #f])
(define lock-semaphore (make-semaphore 1)) (define lock-semaphore (make-semaphore 1))
(define commit-semaphore (make-semaphore 1)) (define commit-semaphore (make-semaphore 1))
(define-values (peeked-r peeked-w) (make-pipe)) (define-values (peeked-r peeked-w) (make-pipe))
@ -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,13 +1207,13 @@
(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)
(error 'reencode-input-port (error 'reencode-input-port
(format "~a: ~e" msg) (format "~a: ~e" msg)
port))]) port))])
(let ([c (let ([c (bytes-open-converter encoding "UTF-8")]) (let ([c (let ([c (bytes-open-converter encoding "UTF-8")])
(if newline-convert? (mcons c #f) c))] (if newline-convert? (mcons c #f) c))]
[ready-bytes (make-bytes 1024)] [ready-bytes (make-bytes 1024)]
@ -1345,13 +1344,13 @@
;; -------------------------------------------------- ;; --------------------------------------------------
(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)
(error 'reencode-input-port (error 'reencode-input-port
(format "~a: ~e" msg) (format "~a: ~e" msg)
port))]) port))])
(let ([c (bytes-open-converter "UTF-8" encoding)] (let ([c (bytes-open-converter "UTF-8" encoding)]
[ready-bytes (make-bytes 1024)] [ready-bytes (make-bytes 1024)]
[ready-start 0] [ready-start 0]
@ -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))

View File

@ -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->)

View File

@ -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

View File

@ -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))

View File

@ -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.

View File

@ -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

View File

@ -3,15 +3,14 @@
;; used by contract.ss, which is used by port.ss --- so we ;; used by contract.ss, which is used by port.ss --- so we
;; break the cycle with this module. ;; break the cycle with this module.
(module port mzscheme (module port racket/base
(require "../etc.ss")
(provide open-output-nowhere (provide open-output-nowhere
relocate-output-port relocate-output-port
transplant-output-port transplant-output-port
transplant-to-relocate) transplant-to-relocate)
(define open-output-nowhere (define open-output-nowhere
(opt-lambda ([name 'nowhere] [specials-ok? #t]) (lambda ([name 'nowhere] [specials-ok? #t])
(make-output-port (make-output-port
name name
always-evt always-evt
@ -42,13 +41,13 @@
close?))) close?)))
(define relocate-output-port (define relocate-output-port
(opt-lambda (p line col pos [close? #t]) (lambda (p line col pos [close? #t])
(transplant-to-relocate (transplant-to-relocate
transplant-output-port transplant-output-port
p line col pos close?))) p line col pos close?)))
(define transplant-output-port (define transplant-output-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-output-port (make-output-port
(object-name p) (object-name p)
p p

View File

@ -7,7 +7,7 @@
(require (for-template scheme/base (require (for-template scheme/base
"unit-keywords.ss" "unit-keywords.ss"
"unit-runtime.ss")) "unit-runtime.ss"))
(require scheme/private/define-struct) (require racket/private/define-struct)
(provide (struct-out var-info) (provide (struct-out var-info)
(struct-out signature) (struct-out signature)

View File

@ -1,14 +1,14 @@
#lang scheme/base #lang racket/base
(require (for-syntax scheme/base (require (for-syntax racket/base
syntax/boundmap syntax/boundmap
syntax/name syntax/name
syntax/parse syntax/parse
"unit-compiletime.ss" "unit-compiletime.ss"
"unit-contract-syntax.ss" "unit-contract-syntax.ss"
"unit-syntax.ss") "unit-syntax.ss")
(for-meta 2 scheme/base) (for-meta 2 racket/base)
scheme/contract/base racket/contract/base
"unit-utils.ss" "unit-utils.ss"
"unit-runtime.ss") "unit-runtime.ss")

View File

@ -4,7 +4,7 @@
syntax/boundmap syntax/boundmap
"unit-compiletime.ss" "unit-compiletime.ss"
"unit-syntax.ss") "unit-syntax.ss")
scheme/contract/base) racket/contract/base)
(provide (for-syntax build-key (provide (for-syntax build-key
check-duplicate-sigs check-duplicate-sigs

View File

@ -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

View File

@ -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"

View File

@ -1,4 +1,4 @@
(module config mzscheme (module config racket/base
(require "private/define-config.ss") (require "private/define-config.ss")
(define-parameters (define-parameters
(PLANET-SERVER-NAME "planet.plt-scheme.org") (PLANET-SERVER-NAME "planet.plt-scheme.org")

View File

@ -1,4 +1,5 @@
(module define-config mzscheme (module define-config racket/base
(require (for-syntax racket/base))
(provide define-parameters) (provide define-parameters)

View File

@ -18,7 +18,7 @@
(and (and
(and (len . < . (bytes-length s)) (and (len . < . (bytes-length s))
(bytes=? p (subbytes s 0 len))) (bytes=? p (subbytes s 0 len)))
(let ([ext (let ([m (regexp-match #rx#"([.][a-z]+)?[.](ss|sls)$" (let ([ext (let ([m (regexp-match #rx#"([.][a-z]+)?[.](rkt|ss|sls)$"
(subbytes s len))]) (subbytes s len))])
(and m (and m
(or (not (cadr m)) (or (not (cadr m))
@ -37,7 +37,7 @@
ext))))))))) ext)))))))))
files))] files))]
[versions [versions
(let* ([eo '(#".mzscheme.ss" #".mzscheme.sls" #".ss" #".sls")] (let* ([eo '(#".mzscheme.ss" #".mzscheme.sls" #".ss" #".sls" #".rkt")]
[ext< (lambda (a b) [ext< (lambda (a b)
(> (length (member a eo)) (length (member b eo))))]) (> (length (member a eo)) (length (member b eo))))])
(sort candidate-versions (sort candidate-versions

4
collects/racket/base.rkt Normal file
View File

@ -0,0 +1,4 @@
#lang racket/private
(require "private/base.rkt")
(provide (all-from-out "private/base.rkt"))

View File

@ -1,5 +0,0 @@
#lang racket/private
(require "private/struct.rkt")
(provide (all-from-out scheme/base)
struct)

11
collects/racket/class.rkt Normal file
View File

@ -0,0 +1,11 @@
#lang racket/base
(require "contract/private/object.rkt")
(provide (all-from-out "contract/private/object.rkt"))
;; All of the implementation is actually in private/class-internal.rkt,
;; which provides extra (private) functionality to contract.rkt.
(require "private/class-internal.rkt")
(provide-public-names)
(provide generic?)

View File

@ -9,14 +9,15 @@ differences from v3:
|# |#
(require scheme/contract/exists (require racket/contract/exists
scheme/contract/regions racket/contract/regions
"contract/private/basic-opters.ss" "contract/private/basic-opters.rkt"
"contract/base.ss") "contract/base.rkt"
"private/define-struct.rkt")
(provide (all-from-out "contract/base.ss") (provide (all-from-out "contract/base.rkt")
(except-out (all-from-out scheme/contract/exists) ∃?) (except-out (all-from-out racket/contract/exists) ∃?)
(all-from-out scheme/contract/regions)) (all-from-out racket/contract/regions))
;; ====================================================================== ;; ======================================================================
;; The alternate implementation disables contracts. Its useful mainly to ;; The alternate implementation disables contracts. Its useful mainly to

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
;; A stripped down version of scheme/contract for use in ;; A stripped down version of scheme/contract for use in
;; the PLT code base where appropriate. ;; the PLT code base where appropriate.

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(require "private/guts.ss") (require "private/guts.ss")

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
#| #|
@ -20,8 +20,8 @@ v4 todo:
(require "guts.ss" (require "guts.ss"
"opt.ss" "opt.ss"
scheme/stxparam) racket/stxparam)
(require (for-syntax scheme/base) (require (for-syntax racket/base)
(for-syntax "opt-guts.ss") (for-syntax "opt-guts.ss")
(for-syntax "helpers.ss") (for-syntax "helpers.ss")
(for-syntax syntax/stx) (for-syntax syntax/stx)

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
#| #|
@ -13,8 +13,8 @@ improve method arity mismatch contract violation error messages?
recursive-contract recursive-contract
current-contract-region) current-contract-region)
(require (for-syntax scheme/base) (require (for-syntax racket/base)
scheme/stxparam racket/stxparam
unstable/srcloc unstable/srcloc
unstable/location unstable/location
"guts.ss" "guts.ss"

View File

@ -1,9 +1,9 @@
#lang scheme/base #lang racket/base
(require "guts.ss" (require "guts.ss"
"opt.ss" "opt.ss"
"base.ss") "base.ss")
(require (for-syntax scheme/base (require (for-syntax racket/base
"opt-guts.ss")) "opt-guts.ss"))
;; ;;

View File

@ -1,6 +1,6 @@
#lang scheme/base #lang racket/base
(require unstable/srcloc scheme/pretty) (require unstable/srcloc racket/pretty)
(provide blame? (provide blame?
make-blame make-blame

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(provide ensure-well-formed (provide ensure-well-formed
build-func-params build-func-params
build-clauses build-clauses
@ -6,8 +6,7 @@
generate-arglists) generate-arglists)
(require "opt-guts.ss") (require "opt-guts.ss")
(require (for-template scheme/base) (require (for-template racket/base))
(for-syntax scheme/base))
#| #|

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
#| #|
@ -18,13 +18,11 @@ it around flattened out.
|# |#
(require "guts.ss" (require "guts.ss"
"opt.ss" "opt.ss")
mzlib/etc)
(require (for-syntax scheme/base) (require (for-syntax scheme/base)
(for-syntax "ds-helpers.ss") (for-syntax "ds-helpers.ss")
(for-syntax "helpers.ss") (for-syntax "helpers.ss")
(for-syntax "opt-guts.ss") (for-syntax "opt-guts.ss"))
(for-syntax mzlib/etc))
(provide define-contract-struct (provide define-contract-struct

View File

@ -1,11 +1,11 @@
#lang scheme/base #lang racket/base
(require "helpers.ss" (require "helpers.ss"
"blame.ss" "blame.ss"
"prop.ss" "prop.ss"
scheme/pretty) racket/pretty)
(require (for-syntax scheme/base (require (for-syntax racket/base
"helpers.ss")) "helpers.ss"))
(provide (except-out (all-from-out "blame.ss") make-blame) (provide (except-out (all-from-out "blame.ss") make-blame)

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(provide mangle-id mangle-id-for-maker (provide mangle-id mangle-id-for-maker
build-struct-names build-struct-names
@ -9,8 +9,8 @@
known-good-contract?) known-good-contract?)
(require setup/main-collects (require setup/main-collects
scheme/struct-info racket/struct-info
(for-template scheme/base)) (for-template racket/base))
;; lookup-struct-info : syntax -> (union #f (list syntax syntax (listof syntax) ...)) ;; lookup-struct-info : syntax -> (union #f (list syntax syntax (listof syntax) ...))
(define (lookup-struct-info stx provide-stx) (define (lookup-struct-info stx provide-stx)

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(require "guts.ss" "blame.ss" unstable/srcloc) (require "guts.ss" "blame.ss" unstable/srcloc)

View File

@ -1,10 +1,10 @@
#lang scheme/base #lang racket/base
(require (for-syntax scheme/base (require (for-syntax racket/base
scheme/struct-info racket/struct-info
"helpers.ss" "helpers.ss"
"opt-guts.ss") "opt-guts.ss")
scheme/promise racket/promise
"opt.ss" "opt.ss"
"guts.ss") "guts.ss")

View File

@ -1,7 +1,7 @@
#lang scheme/base #lang scheme/base
(require "arrow.ss" (require "arrow.ss"
"guts.ss" "guts.ss"
scheme/private/class-internal racket/private/class-internal
scheme/stxparam) scheme/stxparam)
(require (for-syntax scheme/base)) (require (for-syntax scheme/base))

View File

@ -1,8 +1,8 @@
#lang scheme/base #lang racket/base
(require syntax/private/boundmap ;; needs to be the private one, since the public one has contracts (require syntax/private/boundmap ;; needs to be the private one, since the public one has contracts
(for-template scheme/base) (for-template racket/base)
(for-template "guts.ss") (for-template "guts.ss")
(for-syntax scheme/base)) (for-syntax racket/base))
(provide get-opter reg-opter! opter (provide get-opter reg-opter! opter
interleave-lifts interleave-lifts

View File

@ -1,13 +1,12 @@
#lang scheme/base #lang racket/base
(require "guts.ss" (require "guts.ss"
scheme/stxparam racket/stxparam)
mzlib/etc) (require (for-syntax racket/base)
(require (for-syntax scheme/base)
(for-syntax "opt-guts.ss") (for-syntax "opt-guts.ss")
(for-syntax mzlib/etc) (for-syntax racket/stxparam))
(for-syntax scheme/stxparam))
(provide opt/c define-opt/c define/opter opt-stronger-vars-ref) (provide opt/c define-opt/c define/opter opt-stronger-vars-ref
begin-lifted)
;; define/opter : id -> syntax ;; define/opter : id -> syntax
;; ;;
@ -151,6 +150,11 @@
(vector) (vector)
(begin-lifted (box #f)))))))])) (begin-lifted (box #f)))))))]))
(define-syntax (begin-lifted stx)
(syntax-case stx ()
[(_ expr)
(syntax-local-lift-expression #'expr)]))
(define-syntax-parameter define/opt-recursive-fn #f) (define-syntax-parameter define/opt-recursive-fn #f)
(define-syntax (define-opt/c stx) (define-syntax (define-opt/c stx)

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(require "blame.ss") (require "blame.ss")

View File

@ -1,14 +1,14 @@
#lang scheme/base #lang racket/base
(provide provide/contract (provide provide/contract
(for-syntax make-provide/contract-transformer)) (for-syntax make-provide/contract-transformer))
(require (for-syntax scheme/base (require (for-syntax racket/base
scheme/list racket/list
(prefix-in a: "helpers.ss")) (prefix-in a: "helpers.ss"))
"arrow.ss" "arrow.ss"
"base.ss" "base.ss"
scheme/contract/exists racket/contract/exists
"guts.ss" "guts.ss"
unstable/location unstable/location
unstable/srcloc) unstable/srcloc)

View File

@ -1,19 +1,19 @@
#lang scheme/base #lang racket/base
(provide define-struct/contract (provide define-struct/contract
define/contract define/contract
with-contract) with-contract)
(require (for-syntax scheme/base (require (for-syntax racket/base
scheme/list racket/list
scheme/struct-info racket/struct-info
syntax/define syntax/define
syntax/kerncase syntax/kerncase
syntax/parse syntax/parse
unstable/syntax unstable/syntax
(prefix-in a: "private/helpers.ss")) (prefix-in a: "private/helpers.ss"))
scheme/splicing racket/splicing
scheme/stxparam racket/stxparam
unstable/location unstable/location
"private/arrow.ss" "private/arrow.ss"
"private/base.ss" "private/base.ss"

View File

@ -1,4 +1,4 @@
(module control scheme/base (module control racket/base
(require mzlib/control) (require mzlib/control)
(provide (all-from-out mzlib/control))) (provide (all-from-out mzlib/control)))

View File

@ -1,6 +1,6 @@
#lang scheme/base #lang racket/base
(require (for-syntax scheme/base)) (require (for-syntax racket/base))
(provide prop:dict (provide prop:dict
dict? dict?
@ -268,7 +268,7 @@
[else [else
(raise-type-error 'dict-count "dict" d)])) (raise-type-error 'dict-count "dict" d)]))
(define-struct assoc-iter (head pos)) (struct assoc-iter (head pos))
(define (dict-iterate-first d) (define (dict-iterate-first d)
(cond (cond
@ -276,7 +276,7 @@
[(vector? d) (if (zero? (vector-length d)) [(vector? d) (if (zero? (vector-length d))
#f #f
0)] 0)]
[(assoc? d) (if (null? d) #f (make-assoc-iter d d))] [(assoc? d) (if (null? d) #f (assoc-iter d d))]
[(dict-struct? d) ((get-dict-iterate-first (dict-struct-ref d)) d)] [(dict-struct? d) ((get-dict-iterate-first (dict-struct-ref d)) d)]
[else [else
(raise-type-error 'dict-iterate-first "dict" d)])) (raise-type-error 'dict-iterate-first "dict" d)]))
@ -302,7 +302,7 @@
(let ([pos (cdr (assoc-iter-pos i))]) (let ([pos (cdr (assoc-iter-pos i))])
(if (null? pos) (if (null? pos)
#f #f
(make-assoc-iter d pos)))] (assoc-iter d pos)))]
[(dict-struct? d) ((get-dict-iterate-next (dict-struct-ref d)) d i)] [(dict-struct? d) ((get-dict-iterate-next (dict-struct-ref d)) d i)]
[(assoc? d) [(assoc? d)
(raise-mismatch-error (raise-mismatch-error
@ -409,7 +409,7 @@
;; ---------------------------------------- ;; ----------------------------------------
(define-struct hash-box (key)) (struct hash-box (key))
(define custom-hash-ref (define custom-hash-ref
(case-lambda (case-lambda
@ -433,8 +433,8 @@
(let ([table (hash-set (custom-hash-table d) (let ([table (hash-set (custom-hash-table d)
((custom-hash-make-box d) k) ((custom-hash-make-box d) k)
v)]) v)])
(make-immutable-custom-hash table (immutable-custom-hash table
(custom-hash-make-box d)))) (custom-hash-make-box d))))
(define (custom-hash-remove! d k) (define (custom-hash-remove! d k)
(hash-remove! (custom-hash-table d) (hash-remove! (custom-hash-table d)
@ -443,8 +443,8 @@
(define (custom-hash-remove d k) (define (custom-hash-remove d k)
(let ([table (hash-remove (custom-hash-table d) (let ([table (hash-remove (custom-hash-table d)
((custom-hash-make-box d) k))]) ((custom-hash-make-box d) k))])
(make-immutable-custom-hash table (immutable-custom-hash table
(custom-hash-make-box d)))) (custom-hash-make-box d))))
(define (custom-hash-count d) (define (custom-hash-count d)
(hash-count (custom-hash-table d))) (hash-count (custom-hash-table d)))
@ -461,7 +461,7 @@
(define (custom-hash-iterate-value d i) (define (custom-hash-iterate-value d i)
(hash-iterate-value (custom-hash-table d) i)) (hash-iterate-value (custom-hash-table d) i))
(define-struct custom-hash (table make-box) (struct custom-hash (table make-box)
#:property prop:dict #:property prop:dict
(vector custom-hash-ref (vector custom-hash-ref
custom-hash-set! custom-hash-set!
@ -482,7 +482,7 @@
(lambda (a recur) (recur (custom-hash-table a))) (lambda (a recur) (recur (custom-hash-table a)))
(lambda (a recur) (recur (custom-hash-table a))))) (lambda (a recur) (recur (custom-hash-table a)))))
(define-struct (immutable-custom-hash custom-hash) () (struct immutable-custom-hash custom-hash ()
#:property prop:dict #:property prop:dict
(vector custom-hash-ref (vector custom-hash-ref
#f #f
@ -510,7 +510,7 @@
(procedure-arity-includes? hash2 1)) (procedure-arity-includes? hash2 1))
(raise-type-error who "procedure (arity 1)" hash2)) (raise-type-error who "procedure (arity 1)" hash2))
(let () (let ()
(define-struct (box hash-box) () (struct box hash-box ()
#:property prop:equal+hash (list #:property prop:equal+hash (list
(lambda (a b recur) (lambda (a b recur)
(=? (hash-box-key a) (hash-box-key b))) (=? (hash-box-key a) (hash-box-key b)))
@ -518,16 +518,16 @@
(hash (hash-box-key v))) (hash (hash-box-key v)))
(lambda (v recur) (lambda (v recur)
(hash2 (hash-box-key v))))) (hash2 (hash-box-key v)))))
(make-custom-hash table (wrap-make-box make-box))))]) (make-custom-hash table (wrap-make-box box))))])
(let ([make-custom-hash (let ([make-custom-hash
(lambda (=? hash [hash2 (lambda (v) 10001)]) (lambda (=? hash [hash2 (lambda (v) 10001)])
(mk hash hash2 =? 'make-custom-hash make-custom-hash (make-hash) values))] (mk hash hash2 =? 'make-custom-hash custom-hash (make-hash) values))]
[make-immutable-custom-hash [make-immutable-custom-hash
(lambda (=? hash [hash2 (lambda (v) 10001)]) (lambda (=? hash [hash2 (lambda (v) 10001)])
(mk hash hash2 =? 'make-immutable-custom-hash make-immutable-custom-hash #hash() values))] (mk hash hash2 =? 'make-immutable-custom-hash immutable-custom-hash #hash() values))]
[make-weak-custom-hash [make-weak-custom-hash
(lambda (=? hash [hash2 (lambda (v) 10001)]) (lambda (=? hash [hash2 (lambda (v) 10001)])
(mk hash hash2 =? 'make-weak-custom-hash make-custom-hash (make-weak-hash) (mk hash hash2 =? 'make-weak-custom-hash custom-hash (make-weak-hash)
(lambda (make-box) (lambda (make-box)
(let ([ht (make-weak-hasheq)]) (let ([ht (make-weak-hasheq)])
(lambda (v) (lambda (v)

View File

@ -1,7 +1,7 @@
#lang scheme/base #lang racket/base
(require syntax/modcode (require syntax/modcode
(for-syntax scheme/base)) (for-syntax racket/base))
(provide enter!) (provide enter!)
@ -29,10 +29,10 @@
(enter-require mod) (enter-require mod)
(let ([ns (module->namespace mod)]) (let ([ns (module->namespace mod)])
(current-namespace ns) (current-namespace ns)
(namespace-require 'scheme/enter))) (namespace-require 'racket/enter)))
(current-namespace orig-namespace))) (current-namespace orig-namespace)))
(define-struct mod (name timestamp depends)) (struct mod (name timestamp depends))
(define loaded (make-hash)) (define loaded (make-hash))
@ -66,13 +66,13 @@
(or (current-load-relative-directory) (or (current-load-relative-directory)
(current-directory)))))]) (current-directory)))))])
;; Record module timestamp and dependencies: ;; Record module timestamp and dependencies:
(let ([mod (make-mod name (let ([a-mod (mod name
(get-timestamp path) (get-timestamp path)
(if code (if code
(apply append (apply append
(map cdr (module-compiled-imports code))) (map cdr (module-compiled-imports code)))
null))]) null))])
(hash-set! loaded path mod)) (hash-set! loaded path a-mod))
;; Evaluate the module: ;; Evaluate the module:
(eval code)) (eval code))
;; Not a module: ;; Not a module:

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(provide s-exp->fasl (provide s-exp->fasl
fasl->s-exp) fasl->s-exp)

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(provide delete-directory/files (provide delete-directory/files
copy-directory/files copy-directory/files
@ -22,7 +22,7 @@
write-to-file write-to-file
display-lines-to-file) display-lines-to-file)
(require "private/portlines.ss") (require "private/portlines.rkt")
;; utility: sorted dirlist so functions are deterministic ;; utility: sorted dirlist so functions are deterministic
(define (sorted-dirlist [dir (current-directory)]) (define (sorted-dirlist [dir (current-directory)])

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(require '#%futures) (require '#%futures)
(provide future? (provide future?

View File

@ -1,8 +1,8 @@
#lang scheme/base #lang racket/base
(require (for-syntax scheme/base) (require (for-syntax racket/base)
scheme/control racket/control
scheme/stxparam scheme/splicing) racket/stxparam racket/splicing)
(provide yield generator generator-state in-generator infinite-generator (provide yield generator generator-state in-generator infinite-generator
sequence->generator sequence->repeated-generator) sequence->generator sequence->repeated-generator)

4
collects/racket/gui.rkt Normal file
View File

@ -0,0 +1,4 @@
(module gui racket
(require racket/gui/base)
(provide (all-from-out racket)
(all-from-out racket/gui/base)))

View File

@ -0,0 +1,2 @@
#lang s-exp syntax/module-reader
racket/gui

View File

@ -0,0 +1,2 @@
#lang s-exp syntax/module-reader
scheme/gui

View File

@ -1,6 +1,6 @@
#lang scheme/base #lang racket/base
(require (for-syntax scheme/base) scheme/promise) (require (for-syntax racket/base) racket/promise)
(provide help) (provide help)

View File

@ -1,6 +1,6 @@
#lang scheme/base #lang racket/base
(require (for-syntax scheme/base (require (for-syntax racket/base
syntax/stx syntax/stx
syntax/path-spec syntax/path-spec
mzlib/private/increader mzlib/private/increader

View File

@ -1,7 +1,6 @@
#lang racket #lang racket
(require scheme/enter (require racket/enter
scheme/help racket/help)
"private/runtime.ss")
;; Set the printer: ;; Set the printer:
(current-print (let ([pretty-printer (current-print (let ([pretty-printer
@ -11,5 +10,5 @@
pretty-printer)) pretty-printer))
(provide (all-from-out racket (provide (all-from-out racket
scheme/enter racket/enter
scheme/help)) racket/help))

55
collects/racket/main.rkt Normal file
View File

@ -0,0 +1,55 @@
#lang racket/private
(require racket/base
racket/contract
racket/class
racket/unit
racket/dict
racket/include
racket/pretty
racket/math
racket/match
racket/shared
racket/set
racket/tcp
racket/udp
racket/list
racket/vector
racket/string
racket/function
racket/path
racket/file
racket/port
racket/cmdline
racket/promise
racket/bool
racket/local
racket/nest
(for-syntax racket/base))
(provide (all-from-out racket/contract
racket/class
racket/unit
racket/dict
racket/include
racket/pretty
racket/math
racket/match
racket/shared
racket/base
racket/set
racket/tcp
racket/udp
racket/list
racket/vector
racket/string
racket/function
racket/path
racket/file
racket/port
racket/cmdline
racket/promise
racket/bool
racket/local
racket/nest)
(for-syntax (all-from-out racket/base)))

View File

@ -1,8 +0,0 @@
#lang racket/private
(require (except-in scheme struct struct/ctc)
(only-in mzlib/unit struct~r/ctc)
"private/struct.rkt")
(provide (all-from-out scheme)
(rename-out [struct~r/ctc struct/ctc])
struct)

View File

@ -1,7 +1,7 @@
#lang scheme/base #lang racket/base
(require scheme/match/match (require racket/match/match
(for-syntax scheme/base)) (for-syntax racket/base))
(provide (except-out (all-from-out scheme/match/match) (provide (except-out (all-from-out racket/match/match)
define-match-expander) define-match-expander)
(rename-out [define-match-expander* define-match-expander])) (rename-out [define-match-expander* define-match-expander]))

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(require (only-in "runtime.ss" (require (only-in "runtime.ss"
match-equality-test match-equality-test

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(require (only-in "runtime.ss" (require (only-in "runtime.ss"
match-equality-test match-equality-test

View File

@ -1,9 +1,9 @@
#lang scheme/base #lang racket/base
(require (for-template scheme/base) (require (for-template racket/base)
syntax/boundmap syntax/boundmap
syntax/stx syntax/stx
scheme/struct-info racket/struct-info
"patterns.ss" "patterns.ss"
"compiler.ss" "compiler.ss"
"parse-helper.ss" "parse-helper.ss"

View File

@ -1,7 +1,7 @@
#lang scheme/base #lang racket/base
(require scheme/stxparam (require racket/stxparam
(for-syntax scheme/base)) (for-syntax racket/base))
(provide match-equality-test (provide match-equality-test
exn:misc:match? exn:misc:match?

View File

@ -1,9 +1,9 @@
#lang scheme/base #lang racket/base
(require scheme/match/match-expander (require racket/match/match-expander
(for-syntax scheme/base (for-syntax racket/base
scheme/struct-info racket/struct-info
syntax/boundmap syntax/boundmap
scheme/list)) racket/list))
(define-match-expander (define-match-expander
struct* struct*

Some files were not shown because too many files have changed in this diff Show More