diff --git a/collects/racket/private/namespace.rkt b/collects/racket/private/namespace.rkt index c8b87be730..8d79ad8fad 100644 --- a/collects/racket/private/namespace.rkt +++ b/collects/racket/private/namespace.rkt @@ -19,14 +19,14 @@ [ns (parameterize ([current-namespace this-ns]) ; ensures correct phase (make-empty-namespace))]) (namespace-attach-module this-ns - 'scheme/base + 'racket/base ns) ns)) (define (make-base-namespace) (let ([ns (make-base-empty-namespace)]) (parameterize ([current-namespace ns]) - (namespace-require 'scheme/base)) + (namespace-require 'racket/base)) ns)) ;; ---------------------------------------- diff --git a/collects/scheme/signature/lang.ss b/collects/racket/signature/lang.rkt similarity index 100% rename from collects/scheme/signature/lang.ss rename to collects/racket/signature/lang.rkt diff --git a/collects/racket/signature/lang/reader.ss b/collects/racket/signature/lang/reader.ss new file mode 100644 index 0000000000..363b95d86f --- /dev/null +++ b/collects/racket/signature/lang/reader.ss @@ -0,0 +1,2 @@ +#lang s-exp syntax/module-reader +racket/signature/lang diff --git a/collects/scheme/unit/lang.ss b/collects/racket/unit/lang.rkt similarity index 100% rename from collects/scheme/unit/lang.ss rename to collects/racket/unit/lang.rkt diff --git a/collects/racket/unit/lang/reader.ss b/collects/racket/unit/lang/reader.ss new file mode 100644 index 0000000000..9d47cb1147 --- /dev/null +++ b/collects/racket/unit/lang/reader.ss @@ -0,0 +1,2 @@ +#lang s-exp syntax/module-reader +racket/unit/lang diff --git a/collects/scheme/signature/lang/reader.ss b/collects/scheme/signature/lang/reader.ss index c8ddd4d63c..363b95d86f 100644 --- a/collects/scheme/signature/lang/reader.ss +++ b/collects/scheme/signature/lang/reader.ss @@ -1,2 +1,2 @@ #lang s-exp syntax/module-reader -scheme/signature/lang +racket/signature/lang diff --git a/collects/scheme/unit/lang/reader.ss b/collects/scheme/unit/lang/reader.ss index 2d0a549281..9d47cb1147 100644 --- a/collects/scheme/unit/lang/reader.ss +++ b/collects/scheme/unit/lang/reader.ss @@ -1,2 +1,2 @@ #lang s-exp syntax/module-reader -scheme/unit/lang +racket/unit/lang diff --git a/collects/scribble/eval.ss b/collects/scribble/eval.ss index 603c7201be..c2c01634c4 100644 --- a/collects/scribble/eval.ss +++ b/collects/scribble/eval.ss @@ -1,20 +1,20 @@ -(module eval scheme/base +(module eval racket/base (require "manual.ss" "struct.ss" "scheme.ss" "decode.ss" - scheme/file + racket/file scheme/sandbox - scheme/promise + racket/promise mzlib/string - (for-syntax scheme/base)) + (for-syntax racket/base)) (provide interaction interaction-eval interaction-eval-show - schemeblock+eval - schememod+eval + racketblock+eval (rename-out [racketblock+eval schemeblock+eval]) + racketmod+eval (rename-out [racketmod+eval schememod+eval]) def+int defs+int examples @@ -38,8 +38,8 @@ (define maxlen 60) - (namespace-require 'scheme/base) - (namespace-require '(for-syntax scheme/base)) + (namespace-require 'racket/base) + (namespace-require '(for-syntax racket/base)) (define (literal-string style s) (let ([m (regexp-match #rx"^(.*)( +)(.*)$" s)]) @@ -325,31 +325,31 @@ [(_ #:eval ev e) (do-interaction-eval-show ev (quote-expr e))] [(_ e) (do-interaction-eval-show #f (quote-expr e))])) - (define-syntax schemeinput* + (define-syntax racketinput* (syntax-rules (eval:alts code:comment) - [(_ (code:comment . rest)) (schemeblock (code:comment . rest))] - [(_ (eval:alts a b)) (schemeinput* a)] - [(_ e) (schemeinput e)])) + [(_ (code:comment . rest)) (racketblock (code:comment . rest))] + [(_ (eval:alts a b)) (racketinput* a)] + [(_ e) (racketinput e)])) - (define-code schemeblock+line (to-paragraph/prefix (hspace 2) + (define-code racketblock+line (to-paragraph/prefix (hspace 2) (hspace 2) (list " "))) - (define-syntax (schemedefinput* stx) + (define-syntax (racketdefinput* stx) (syntax-case stx (define define-values define-struct) [(_ (define . rest)) (syntax-case stx () - [(_ e) #'(schemeblock+line e)])] + [(_ e) #'(racketblock+line e)])] [(_ (define-values . rest)) (syntax-case stx () - [(_ e) #'(schemeblock+line e)])] + [(_ e) #'(racketblock+line e)])] [(_ (define-struct . rest)) (syntax-case stx () - [(_ e) #'(schemeblock+line e)])] + [(_ e) #'(racketblock+line e)])] [(_ (code:line (define . rest) . rest2)) (syntax-case stx () - [(_ e) #'(schemeblock+line e)])] - [(_ e) #'(schemeinput* e)])) + [(_ e) #'(racketblock+line e)])] + [(_ e) #'(racketinput* e)])) (define (do-titled-interaction ev t shows evals) (interleave t @@ -358,41 +358,41 @@ (define-syntax titled-interaction (syntax-rules () - [(_ #:eval ev t schemeinput* e ...) - (do-titled-interaction ev t (list (schemeinput* e) ...) (list (quote-expr e) ...))] - [(_ t schemeinput* e ...) - (titled-interaction #:eval (make-base-eval) t schemeinput* e ...)])) + [(_ #:eval ev t racketinput* e ...) + (do-titled-interaction ev t (list (racketinput* e) ...) (list (quote-expr e) ...))] + [(_ t racketinput* e ...) + (titled-interaction #:eval (make-base-eval) t racketinput* e ...)])) (define-syntax interaction (syntax-rules () - [(_ #:eval ev e ...) (titled-interaction #:eval ev #f schemeinput* e ...)] - [(_ e ...) (titled-interaction #f schemeinput* e ...)])) + [(_ #:eval ev e ...) (titled-interaction #:eval ev #f racketinput* e ...)] + [(_ e ...) (titled-interaction #f racketinput* e ...)])) - (define-syntax schemeblock+eval + (define-syntax racketblock+eval (syntax-rules () [(_ #:eval ev e ...) (let ([eva ev]) (#%expression (begin (interaction-eval #:eval eva e) ... - (schemeblock e ...))))] + (racketblock e ...))))] [(_ e ...) - (schemeblock+eval #:eval (make-base-eval) e ...)])) + (racketblock+eval #:eval (make-base-eval) e ...)])) - (define-syntax schememod+eval + (define-syntax racketmod+eval (syntax-rules () [(_ #:eval ev name e ...) (let ([eva ev]) (#%expression (begin (interaction-eval #:eval eva e) ... - (schememod name e ...))))] + (racketmod name e ...))))] [(_ name e ...) - (schememod+eval #:eval (make-base-eval) name e ...)])) + (racketmod+eval #:eval (make-base-eval) name e ...)])) (define-syntax def+int (syntax-rules () [(_ #:eval ev def e ...) (let ([eva ev]) - (column (list (schemeblock+eval #:eval eva def) + (column (list (racketblock+eval #:eval eva def) blank-line (interaction #:eval eva e ...))))] [(_ def e ...) @@ -402,7 +402,7 @@ (syntax-rules () [(_ #:eval ev [def ...] e ...) (let ([eva ev]) - (column (list (schemeblock+eval #:eval eva def ...) + (column (list (racketblock+eval #:eval eva def ...) blank-line (interaction #:eval eva e ...))))] [(_ [def ...] e ...) @@ -421,27 +421,27 @@ (define-syntax examples (syntax-rules () [(_ #:eval ev e ...) - (titled-interaction #:eval ev (pick-example-title e ...) schemeinput* e ...)] + (titled-interaction #:eval ev (pick-example-title e ...) racketinput* e ...)] [(_ e ...) - (titled-interaction (pick-example-title e ...) schemeinput* e ...)])) + (titled-interaction (pick-example-title e ...) racketinput* e ...)])) (define-syntax examples* (syntax-rules () [(_ #:eval ev example-title e ...) - (titled-interaction #:eval ev example-title schemeinput* e ...)] + (titled-interaction #:eval ev example-title racketinput* e ...)] [(_ example-title e ...) - (titled-interaction example-title schemeinput* e ...)])) + (titled-interaction example-title racketinput* e ...)])) (define-syntax defexamples (syntax-rules () [(_ #:eval ev e ...) - (titled-interaction #:eval ev (pick-example-title e ...) schemedefinput* e ...)] + (titled-interaction #:eval ev (pick-example-title e ...) racketdefinput* e ...)] [(_ e ...) - (titled-interaction (pick-example-title e ...) schemedefinput* e ...)])) + (titled-interaction (pick-example-title e ...) racketdefinput* e ...)])) (define-syntax defexamples* (syntax-rules () [(_ #:eval ev example-title e ...) - (titled-interaction #:eval ev example-title schemedefinput* e ...)] + (titled-interaction #:eval ev example-title racketdefinput* e ...)] [(_ example-title e ...) - (titled-interaction example-title schemedefinput* e ...)])) + (titled-interaction example-title racketdefinput* e ...)])) (define blank-line (make-paragraph (list 'nbsp))) diff --git a/collects/scribble/private/manual-scheme.ss b/collects/scribble/private/manual-scheme.ss index 622b89d64f..016a2afdff 100644 --- a/collects/scribble/private/manual-scheme.ss +++ b/collects/scribble/private/manual-scheme.ss @@ -1,38 +1,57 @@ -#lang scheme/base +#lang racket/base (require "../decode.ss" "../struct.ss" "../scheme.ss" "../search.ss" "../basic.ss" - scheme/list + racket/list "manual-utils.ss" "manual-style.ss" - (for-syntax scheme/base) - (for-label scheme/base)) + (for-syntax racket/base) + (for-label racket/base)) -(provide schemeblock SCHEMEBLOCK schemeblock/form - schemeblock0 SCHEMEBLOCK0 schemeblock0/form - schemeblockelem - schemeinput - schememod - scheme SCHEME scheme/form schemeresult schemeid - schememodname - schememodlink indexed-scheme - schemelink) +(provide racketblock RACKETBLOCK racketblock/form + racketblock0 RACKETBLOCK0 racketblock0/form + racketblockelem + racketinput + racketmod + racket RACKET racket/form racketresult racketid + racketmodname + racketmodlink indexed-racket + racketlink + + (rename-out [racketblock schemeblock] + [RACKETBLOCK SCHEMEBLOCK] + [racketblock/form schemeblock/form] + [racketblock0 schemeblock0] + [RACKETBLOCK0 SCHEMEBLOCK0] + [racketblock0/form schemeblock0/form] + [racketblockelem schemeblockelem] + [racketinput schemeinput] + [racketmod schememod] + [racket scheme] + [RACKET SCHEME] + [racket/form scheme/form] + [racketresult schemeresult] + [racketid schemeid] + [racketmodname schememodname] + [racketmodlink schememodlink] + [indexed-racket indexed-scheme] + [racketlink schemelink])) -(define-code schemeblock0 to-paragraph) -(define-code schemeblock (to-paragraph/prefix (hspace 2) (hspace 2) "")) -(define-code SCHEMEBLOCK (to-paragraph/prefix (hspace 2) (hspace 2) "") +(define-code racketblock0 to-paragraph) +(define-code racketblock (to-paragraph/prefix (hspace 2) (hspace 2) "")) +(define-code RACKETBLOCK (to-paragraph/prefix (hspace 2) (hspace 2) "") UNSYNTAX) -(define-code SCHEMEBLOCK0 to-paragraph UNSYNTAX) +(define-code RACKETBLOCK0 to-paragraph UNSYNTAX) (define interaction-prompt (make-element 'tt (list "> " ))) -(define-code schemeinput +(define-code racketinput (to-paragraph/prefix (make-element #f (list (hspace 2) interaction-prompt)) (hspace 4) "")) -(define-syntax (schememod stx) +(define-syntax (racketmod stx) (syntax-case stx () [(_ #:file filename lang rest ...) (with-syntax ([modtag (datum->syntax @@ -45,7 +64,7 @@ `(as-modname-link ',#'lang (to-element ',#'lang)) - #'(scheme lang))))) + #'(racket lang))))) #'lang)] [(file ...) (if (syntax-e #'filename) @@ -55,9 +74,9 @@ `(code:comment (unsyntax (t "In \"" ,(syntax-e #'filename) "\":"))) #'filename)) null)]) - (syntax/loc stx (schemeblock file ... modtag rest ...)))] + (syntax/loc stx (racketblock file ... modtag rest ...)))] [(_ lang rest ...) - (syntax/loc stx (schememod #:file #f lang rest ...))])) + (syntax/loc stx (racketmod #:file #f lang rest ...))])) (define (to-element/result s) (make-element result-color (list (to-element/no-color s)))) @@ -91,25 +110,25 @@ (make-shaped-parens s val) s)) -(define-code schemeblockelem to-element) +(define-code racketblockelem to-element) -(define-code scheme to-element unsyntax keep-s-expr add-sq-prop) -(define-code SCHEME to-element UNSYNTAX keep-s-expr add-sq-prop) -(define-code schemeresult to-element/result unsyntax keep-s-expr add-sq-prop) -(define-code schemeid to-element/id unsyntax keep-s-expr add-sq-prop) -(define-code *schememodname to-element unsyntax keep-s-expr add-sq-prop) +(define-code racket to-element unsyntax keep-s-expr add-sq-prop) +(define-code RACKET to-element UNSYNTAX keep-s-expr add-sq-prop) +(define-code racketresult to-element/result unsyntax keep-s-expr add-sq-prop) +(define-code racketid to-element/id unsyntax keep-s-expr add-sq-prop) +(define-code *racketmodname to-element unsyntax keep-s-expr add-sq-prop) -(define-syntax schememodname +(define-syntax racketmodname (syntax-rules (unsyntax) - [(schememodname #,n) + [(racketmodname #,n) (let ([sym n]) (as-modname-link sym (to-element sym)))] - [(schememodname n) - (as-modname-link 'n (*schememodname n))])) + [(racketmodname n) + (as-modname-link 'n (*racketmodname n))])) -(define-syntax schememodlink +(define-syntax racketmodlink (syntax-rules (unsyntax) - [(schememodlink n content ...) + [(racketmodlink n content ...) (*as-modname-link 'n (elem #:style #f content ...))])) (define (as-modname-link s e) @@ -122,10 +141,10 @@ (list e) `(mod-path ,(format "~s" s)))) -(define-syntax-rule (indexed-scheme x) - (add-scheme-index 'x (scheme x))) +(define-syntax-rule (indexed-racket x) + (add-racket-index 'x (racket x))) -(define (add-scheme-index s e) +(define (add-racket-index s e) (let ([k (cond [(and (pair? s) (eq? (car s) 'quote)) (format "~s" (cadr s))] [(string? s) s] [else (format "~s" s)])]) @@ -139,11 +158,11 @@ #'(let ([ellipses #f]) (base a)))]))) -(define-/form schemeblock0/form schemeblock0) -(define-/form schemeblock/form schemeblock) -(define-/form scheme/form scheme) +(define-/form racketblock0/form racketblock0) +(define-/form racketblock/form racketblock) +(define-/form racket/form racket) -(define (*schemelink stx-id id . s) +(define (*racketlink stx-id id . s) (let ([content (decode-content s)]) (make-delayed-element (lambda (r p ri) @@ -151,11 +170,11 @@ (make-link-element #f content - (or (find-scheme-tag p ri stx-id #f) + (or (find-racket-tag p ri stx-id #f) `(undef ,(format "--UNDEFINED:~a--" (syntax-e stx-id))))))) (lambda () content) (lambda () content)))) -(define-syntax-rule (schemelink id . content) - (*schemelink (quote-syntax id) 'id . content)) +(define-syntax-rule (racketlink id . content) + (*racketlink (quote-syntax id) 'id . content)) diff --git a/collects/scribble/private/manual-style.ss b/collects/scribble/private/manual-style.ss index 14ed919311..5c7087aa9c 100644 --- a/collects/scribble/private/manual-style.ss +++ b/collects/scribble/private/manual-style.ss @@ -1,4 +1,4 @@ -#lang scheme/base +#lang racket/base (require "../decode.ss" "../struct.ss" "../base.ss" @@ -7,9 +7,9 @@ (only-in "../core.ss" make-style plain) "manual-utils.ss" "on-demand.ss" - scheme/list - scheme/contract - scheme/string) + racket/list + racket/contract + racket/string) (provide (rename-out [hyperlink link]) (rename-out [other-doc other-manual]) @@ -23,12 +23,26 @@ (() () #:rest (listof pre-content?) . ->* . element?)) (define-syntax-rule (provide-styling id ...) (provide/contract [id styling-f/c] ...)) -(provide-styling schememodfont schemeoutput - schemeerror schemefont schemevalfont schemeresultfont schemeidfont schemevarfont - schemeparenfont schemekeywordfont schememetafont +(provide-styling racketmodfont racketoutput + racketerror racketfont racketvalfont racketresultfont racketidfont racketvarfont + racketparenfont racketkeywordfont racketmetafont onscreen defterm filepath exec envvar Flag DFlag PFlag DPFlag math procedure indexed-file indexed-envvar idefterm pidefterm) +(define-syntax-rule (provide-scheme-styling [rid sid] ...) + (provide/contract [rename rid sid styling-f/c] ...)) +(provide-scheme-styling [racketmodfont schememodfont] + [racketoutput schemeoutput] + [racketerror schemeerror] + [racketfont schemefont] + [racketvalfont schemevalfont] + [racketresultfont schemeresultfont] + [racketidfont schemeidfont] + [racketvarfont schemevarfont] + [racketparenfont schemeparenfont] + [racketkeywordfont schemekeywordfont] + [racketmetafont schememetafont]) + (provide void-const undefined-const) (provide/contract @@ -68,23 +82,23 @@ (define (idefterm . str) (let ([c (decode-content str)]) (make-element 'italic c))) -(define (schemefont . str) +(define (racketfont . str) (apply tt str)) -(define (schemevalfont . str) +(define (racketvalfont . str) (make-element value-color (decode-content str))) -(define (schemeresultfont . str) +(define (racketresultfont . str) (make-element result-color (decode-content str))) -(define (schemeidfont . str) +(define (racketidfont . str) (make-element symbol-color (decode-content str))) -(define (schemevarfont . str) +(define (racketvarfont . str) (make-element variable-color (decode-content str))) -(define (schemeparenfont . str) +(define (racketparenfont . str) (make-element paren-color (decode-content str))) -(define (schememetafont . str) +(define (racketmetafont . str) (make-element meta-color (decode-content str))) -(define (schememodfont . str) +(define (racketmodfont . str) (make-element module-color (decode-content str))) -(define (schemekeywordfont . str) +(define (racketkeywordfont . str) (make-element keyword-color (decode-content str))) (define (filepath . str) (make-element 'tt (append (list "\"") (decode-content str) (list "\"")))) @@ -124,9 +138,9 @@ (define (procedure . str) (make-element result-color `("#"))) -(define (schemeoutput . str) +(define (racketoutput . str) (make-element output-color (decode-content str))) -(define (schemeerror . str) +(define (racketerror . str) (make-element error-color (decode-content str))) (define (t . str) @@ -150,13 +164,13 @@ (define (hash-lang) (make-link-element module-link-color - (list (schememodfont "#lang")) + (list (racketmodfont "#lang")) `(part ,(doc-prefix '(lib "scribblings/guide/guide.scrbl") "hash-lang")))) (define-on-demand void-const - (schemeresultfont "#")) + (racketresultfont "#")) (define-on-demand undefined-const - (schemeresultfont "#")) + (racketresultfont "#")) (define (link url #:underline? [underline? #t] diff --git a/collects/scribble/scheme.ss b/collects/scribble/scheme.ss index 9e18e73634..15ba5c77b7 100644 --- a/collects/scribble/scheme.ss +++ b/collects/scribble/scheme.ss @@ -667,7 +667,8 @@ (null? s) (hash? s) (graph-defn? s) - (graph-reference? s)) + (graph-reference? s) + (struct-proxy? s)) (gen-typeset c multi-line? prefix1 prefix suffix color? qq?) (typeset-atom c (letrec ([mk diff --git a/collects/scribble/search.ss b/collects/scribble/search.ss index 796ef57582..f5187add3c 100644 --- a/collects/scribble/search.ss +++ b/collects/scribble/search.ss @@ -1,10 +1,11 @@ -(module search scheme/base +(module search racket/base (require "struct.ss" "basic.ss" setup/main-collects syntax/modcode) - (provide find-scheme-tag) + (provide find-racket-tag + (rename-out [find-racket-tag find-scheme-tag])) (define module-info-cache (make-hasheq)) @@ -21,7 +22,7 @@ (with-handlers* ([exn:fail? (lambda (exn) (fail-thunk))]) (thunk))) - (define (find-scheme-tag part ri stx/binding phase-level) + (define (find-racket-tag part ri stx/binding phase-level) ;; The phase-level argument is used only when `stx/binding' ;; is an identifier. ;; @@ -169,7 +170,7 @@ ;; have changed in inconsistent ways. So just say #f ;; for now. #; - (error 'find-scheme-tag + (error 'find-racket-tag "dead end when looking for binding source: ~e" id) (loop queue rqueue need-result?))))) diff --git a/collects/scribble/urls.ss b/collects/scribble/urls.ss index ba8f053830..c4604c2533 100644 --- a/collects/scribble/urls.ss +++ b/collects/scribble/urls.ss @@ -1,8 +1,10 @@ +#lang racket/base -(module urls mzscheme - (provide (all-defined)) +(provide (all-defined-out) + (rename-out [url:drracket url:drscheme] + [url:download-drracket url:download-drscheme])) - (define url:drscheme "http://www.drscheme.org/") - (define url:download-drscheme "http://download.plt-scheme.org/drscheme/") - - (define url:planet "http://planet.plt-scheme.org/")) +(define url:drracket "http://racket-lang.org/") +(define url:download-drracket "http://racket-lang.org/") + +(define url:planet "http://planet.plt-scheme.org/") diff --git a/collects/scribblings/foreign/foreign.scrbl b/collects/scribblings/foreign/foreign.scrbl index 52b73ab995..2e553f7967 100644 --- a/collects/scribblings/foreign/foreign.scrbl +++ b/collects/scribblings/foreign/foreign.scrbl @@ -5,10 +5,9 @@ @author["Eli Barzilay"] -@defmodule[scheme/foreign #:use-sources ('#%foreign - racket/unsafe/ffi)] +@defmodule[racket/unsafe/ffi #:use-sources ('#%foreign)] -The @schememodname[scheme/foreign] library enables the direct use of +The @schememodname[racket/unsafe/ffi] library enables the direct use of C-based APIs within Scheme programs---without writing any new C code. From the Scheme perspective, functions and data with a C-based API are @idefterm{foreign}, hence the term @defterm{foreign @@ -16,10 +15,6 @@ interface}. Furthermore, since most APIs consist mostly of functions, the foreign interface is sometimes called a @defterm{foreign function interface}, abbreviated @deftech{FFI}. -@bold{Important:} Many of the bindings documented here (the ones in -sections with titles starting ``Unsafe'') are available only after an -@scheme[(unsafe!)] declaration in the importing module. - @table-of-contents[] @include-section["intro.scrbl"] diff --git a/collects/scribblings/foreign/intro.scrbl b/collects/scribblings/foreign/intro.scrbl index b1adcfc51b..7fd62d3783 100644 --- a/collects/scribblings/foreign/intro.scrbl +++ b/collects/scribblings/foreign/intro.scrbl @@ -12,23 +12,13 @@ information in @|InsideMzScheme|, which defines how PLT Scheme interacts with C APIs in general. Since using the FFI entails many safety concerns that Scheme -programmers can normally ignore, merely importing -@schememodname[scheme/foreign] with @scheme[(require scheme/foreign)] -does not import all of the FFI functionality. Only safe functionality -is immediately imported. For example, @scheme[ptr-equal?] can never -cause memory corruption or an invalid memory access, so it is -immediately available on import. - -Use @scheme[(@#,indexed-scheme[unsafe!])] at the top-level of a -module that imports @schememodname[scheme/foreign] to make unsafe -features accessible. (For additional safety, the @scheme[unsafe!] is -itself protected; see @secref[#:doc '(lib -"scribblings/reference/reference.scrbl") "modprotect"].) Using this -macro should be considered as a declaration that your code is itself -unsafe, therefore can lead to serious problems in case of bugs: it is -your responsibility to provide a safe interface. Bindings that become -available only via @scheme[unsafe!] are documented in this manual in -sections with titles starting ``Unsafe.'' +programmers can normally ignore, the library name includes +@schemeidfont{unsafe}. Importing the library macro should be +considered as a declaration that your code is itself unsafe, therefore +can lead to serious problems in case of bugs: it is your +responsibility to provide a safe interface. If your library provides +an unsafe interface, then it should have @schemeidfont{unsafe} in its +name, too. For examples of common FFI usage patterns, see the defined interfaces in the @filepath{ffi} collection. diff --git a/collects/scribblings/foreign/unsafe.scrbl b/collects/scribblings/foreign/unsafe.scrbl index 416c847937..a24b3b2307 100644 --- a/collects/scribblings/foreign/unsafe.scrbl +++ b/collects/scribblings/foreign/unsafe.scrbl @@ -3,28 +3,3 @@ @title{Macros for Unsafety} -@defform[(unsafe!)]{ - -Makes most of the bindings documented in this module available. See -@secref["intro"] for information on why this declaration is required.} - - -@defform/subs[#:literals (unsafe rename-out) - (provide* provide-star-spec ...) - ([provide-star-spec (unsafe id) - (unsafe (rename-out [id external-id])) - provide-spec])]{ - -Like @scheme[provide], but @scheme[id]s under @scheme[unsafe] are not -actually provided. Instead, they are collected for introduction into -an importing module via a macro created by @scheme[define-unsafer]. - -Providing users with unsafe operations without using this facility -should be considered a bug in your code.} - -@defform[(define-unsafer id)]{ - -Cooperates with @scheme[provide*] to define @scheme[id] as a -@scheme[unsafe!]-like form that introduces definitions for each -binding provided as @scheme[unsafe]. The @scheme[define-unsafer] form -must occur after all the @scheme[provide*] forms to which it refers.} diff --git a/collects/scribblings/foreign/utils.ss b/collects/scribblings/foreign/utils.ss index 27f7732ac7..60e78cc8b5 100644 --- a/collects/scribblings/foreign/utils.ss +++ b/collects/scribblings/foreign/utils.ss @@ -1,20 +1,20 @@ -#lang scheme/base +#lang racket/base (require scribble/manual scribble/struct scribble/decode (only-in "../inside/utils.ss" cpp) - (for-syntax scheme/base) - (for-label scheme/base - scheme/contract - (except-in "unsafe-foreign.ss" ->))) + (for-syntax racket/base) + (for-label racket/base + racket/contract + (except-in racket/unsafe/ffi ->))) (provide cpp InsideMzScheme (all-from-out scribble/manual) - (for-label (all-from-out scheme/base - scheme/contract - "unsafe-foreign.ss"))) + (for-label (all-from-out racket/base + racket/contract + racket/unsafe/ffi))) (define InsideMzScheme diff --git a/collects/scribblings/gui/dynamic.scrbl b/collects/scribblings/gui/dynamic.scrbl index 3d5b77d6db..3f4eab8421 100644 --- a/collects/scribblings/gui/dynamic.scrbl +++ b/collects/scribblings/gui/dynamic.scrbl @@ -1,21 +1,21 @@ #lang scribble/doc @(require "common.ss" - (for-label scheme/gui/dynamic)) + (for-label racket/gui/dynamic)) @title{Dynamic Loading} -@defmodule[scheme/gui/dynamic]{The @schememodname[scheme/gui/dynamic] -library provides functions for dynamically accessing the PLT Scheme -GUI toolbox, instead of directly requiring @scheme[scheme/gui] or -@scheme[scheme/gui/base].} +@defmodule[racket/gui/dynamic]{The @racketmodname[racket/gui/dynamic] +library provides functions for dynamically accessing the PLT Racket +GUI toolbox, instead of directly requiring @racket[racket/gui] or +@racket[racket/gui/base].} @defproc[(gui-available?) boolean?]{ -Returns @scheme[#t] if dynamic access to the GUI bindings are +Returns @racket[#t] if dynamic access to the GUI bindings are available---that is, that the program is being run as a @exec{mred}-based application, as opposed to a pure -@exec{mzscheme}-based application, and that GUI modules are attached -to the namespace in which @scheme[scheme/gui/dynamic] was +@exec{mzracket}-based application, and that GUI modules are attached +to the namespace in which @racket[racket/gui/dynamic] was instantiated. This predicate can be used in code that optionally uses GUI elements @@ -24,5 +24,5 @@ when they are available.} @defproc[(gui-dynamic-require [sym symbol?]) any]{ -Like @scheme[dynamic-require], but specifically to access exports of -@scheme[scheme/gui/base].} +Like @racket[dynamic-require], but specifically to access exports of +@racket[racket/gui/base].} diff --git a/collects/scribblings/gui/gui.scrbl b/collects/scribblings/gui/gui.scrbl index 06abcca664..30d2b000c0 100644 --- a/collects/scribblings/gui/gui.scrbl +++ b/collects/scribblings/gui/gui.scrbl @@ -5,21 +5,21 @@ @author["Matthew Flatt" "Robert Bruce Findler" "John Clements"] -@declare-exporting[scheme/gui/base scheme/gui #:use-sources (mred)] +@declare-exporting[racket/gui/base racket/gui #:use-sources (mred)] This reference manual describes the GUI toolbox that is part of PLT - Scheme and whose core is implemented by the MrEd executable. + Racket and whose core is implemented by the MrEd executable. -@defmodule*/no-declare[(scheme/gui/base)]{The -@schememodname[scheme/gui/base] library provides all of the class, +@defmodule*/no-declare[(racket/gui/base)]{The +@racketmodname[racket/gui/base] library provides all of the class, interface, and procedure bindings defined in this manual. At run time, this library needs primitive graphics support that the MrEd executable -provides; this library cannot run in MzScheme.} +provides; this library cannot run in MzRacket.} -@defmodulelang*/no-declare[(scheme/gui)]{The -@schememodname[scheme/gui] language combines all bindings of the -@schememodname[scheme] language and the -@schememodname[scheme/gui/base] modules.} +@defmodulelang*/no-declare[(racket/gui)]{The +@racketmodname[racket/gui] language combines all bindings of the +@racketmodname[racket] language and the +@racketmodname[racket/gui/base] modules.} @table-of-contents[] diff --git a/collects/scribblings/quick/images/exprs.dat b/collects/scribblings/quick/images/exprs.dat index e07575e6c7..cb78daca61 100644 --- a/collects/scribblings/quick/images/exprs.dat +++ b/collects/scribblings/quick/images/exprs.dat @@ -3,88 +3,88 @@ ((2) 0 () 0 () () (c begin c "art gallery")) ((2) 0 () 0 () () "art gallery") ((2) 0 () 0 () () (c circle c 10)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img0") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img0") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c rectangle c 10 c 20)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img1") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img1") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c circle c 10 c 20)) -((2) 1 (((lib "scriblib/private/gui-eval-exn.ss") . deserialize-info:gui-exn-v0)) 0 () () (0 "procedure circle: expects 1 argument, given 2: 10 20")) +((2) 1 (((lib "scriblib/private/gui-eval-exn.rkt") . deserialize-info:gui-exn-v0)) 0 () () (0 "procedure circle: expects 1 argument, given 2: 10 20")) ((2) 0 () 0 () () (c hc-append c (c circle c 10) c (c rectangle c 10 c 20))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img2") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img2") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c define c c c (c circle c 10))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c define c r c (c rectangle c 10 c 20))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () r) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img3") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img3") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c hc-append c c c r)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img4") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img4") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c hc-append c 20 c c c r c c)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img5") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img5") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c define c (c square c n) c (c filled-rectangle c n c n))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c square c 10)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img6") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img6") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c define c (c four c p) c (c define c two-p c (c hc-append c p c p)) c (c vc-append c two-p c two-p))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c four c (c circle c 10))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img7") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img7") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c define c (c checker c p1 c p2) c (c let c (c (c p12 c (c hc-append c p1 c p2)) c (c p21 c (c hc-append c p2 c p1))) c (c vc-append c p12 c p21)))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c checker c (c colorize c (c square c 10) c "red") c (c colorize c (c square c 10) c "black"))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img8") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img8") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c define c (c checkerboard c p) c (c let* c (c (c rp c (c colorize c p c "red")) c (c bp c (c colorize c p c "black")) c (c c c (c checker c rp c bp)) c (c c4 c (c four c c))) c (c four c c4)))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c checkerboard c (c square c 10))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img9") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img9") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () circle) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#")))) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#")))) ((2) 0 () 0 () () (c define c (c series c mk) c (c hc-append c 4 c (c mk c 5) c (c mk c 10) c (c mk c 20)))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c series c circle)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img10") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img10") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c series c square)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img11") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img11") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c series c (c lambda c (c size) c (c checkerboard c (c square c size))))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img12") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img12") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c define c (c rgb-series c mk) c (c vc-append c (c series c (c lambda c (c sz) c (c colorize c (c mk c sz) c "red"))) c (c series c (c lambda c (c sz) c (c colorize c (c mk c sz) c "green"))) c (c series c (c lambda c (c sz) c (c colorize c (c mk c sz) c "blue")))))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c rgb-series c circle)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img13") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img13") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c rgb-series c square)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img14") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img14") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c define c (c rgb-maker c mk) c (c lambda c (c sz) c (c vc-append c (c colorize c (c mk c sz) c "red") c (c colorize c (c mk c sz) c "green") c (c colorize c (c mk c sz) c "blue"))))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c series c (c rgb-maker c circle))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img15") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img15") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c series c (c rgb-maker c square))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img16") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img16") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c list c "red" c "green" c "blue")) ((2) 0 () 0 () () (c "red" c "green" c "blue")) ((2) 0 () 0 () () (c list c (c circle c 10) c (c square c 10))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 2 ("[image]" (c ".pdf" c ".png")) () (c (0 #f (c (? . 0)) (u . "images/img17") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img18") (? . 1) 1.0))) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 2 ("[image]" (c ".pdf" c ".png")) () (c (0 #f (c (? . 0)) (u . "images/img17") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img18") (? . 1) 1.0))) ((2) 0 () 0 () () (c define c (c rainbow c p) c (c map c (c lambda c (c color) c (c colorize c p c color)) c (c list c "red" c "orange" c "yellow" c "green" c "blue" c "purple")))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c rainbow c (c square c 5))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 2 ("[image]" (c ".pdf" c ".png")) () (c (0 #f (c (? . 0)) (u . "images/img19") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img20") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img21") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img22") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img23") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img24") (? . 1) 1.0))) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 2 ("[image]" (c ".pdf" c ".png")) () (c (0 #f (c (? . 0)) (u . "images/img19") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img20") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img21") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img22") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img23") (? . 1) 1.0) c (0 #f (c (? . 0)) (u . "images/img24") (? . 1) 1.0))) ((2) 0 () 0 () () (c apply c vc-append c (c rainbow c (c square c 5)))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img25") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img25") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c require c slideshow/flash)) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c filled-flash c 40 c 30)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img26") (c ".pdf" c ".png") 1.0)) -((2) 0 () 0 () () (c require c (c planet c "random.ss" c (c "schematics" c "random.plt" c 1 c 0)))) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img26") (c ".pdf" c ".png") 1.0)) +((2) 0 () 0 () () (c require c (c planet c "random.rkt" c (c "schematics" c "random.plt" c 1 c 0)))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c random-gaussian)) ((2) 0 () 0 () () 0.7386912134436788) ((2) 0 () 0 () () (c require c slideshow/code)) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c code c (c circle c 10))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img27") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img27") (c ".pdf" c ".png") 1.0)) ((2) 0 () 0 () () (c define-syntax c pict+code c (c syntax-rules c () c (c (c pict+code c expr) c (c hc-append c 10 c expr c (c code c expr)))))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c pict+code c (c circle c 10))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img28") (c ".pdf" c ".png") 1.0)) -((2) 0 () 0 () () (c require c scheme/class c scheme/gui/base)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img28") (c ".pdf" c ".png") 1.0)) +((2) 0 () 0 () () (c require c racket/class c racket/gui/base)) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c define c f c (c new c frame% c (c label c "My Art") c (c width c 300) c (c height c 300) c (c alignment c (c quote c (c center c center)))))) ((2) 0 () 0 () () (void)) @@ -95,8 +95,8 @@ ((2) 0 () 0 () () (c define c (c add-drawing c p) c (c let c (c (c drawer c (c make-pict-drawer c p))) c (c new c canvas% c (c parent c f) c (c style c (c quote c (c border))) c (c paint-callback c (c lambda c (c self c dc) c (c drawer c dc c 0 c 0))))))) ((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (c add-drawing c (c pict+code c (c circle c 10)))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#(struct:object:canvas% ...)")))) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#(struct:object:canvas% ...)")))) ((2) 0 () 0 () () (c add-drawing c (c colorize c (c filled-flash c 50 c 30) c "yellow"))) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#(struct:object:canvas% ...)")))) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#(struct:object:canvas% ...)")))) ((2) 0 () 0 () () (c scale c (c bitmap c (c build-path c (c collection-path c "scribblings/quick") c "art.png")) c 0.5)) -((2) 1 (((lib "scribble/core.ss") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img29") (c ".pdf" c ".png") 1.0)) +((2) 1 (((lib "scribble/core.rkt") . deserialize-info:image-element-v0)) 0 () () (0 #f (c "[image]") (u . "images/img29") (c ".pdf" c ".png") 1.0)) diff --git a/collects/scribblings/quick/images/img0.pdf b/collects/scribblings/quick/images/img0.pdf index fdf8c77dfe..25438957a6 100644 Binary files a/collects/scribblings/quick/images/img0.pdf and b/collects/scribblings/quick/images/img0.pdf differ diff --git a/collects/scribblings/quick/images/img1.pdf b/collects/scribblings/quick/images/img1.pdf index 07a6e30c61..0cb18631b6 100644 Binary files a/collects/scribblings/quick/images/img1.pdf and b/collects/scribblings/quick/images/img1.pdf differ diff --git a/collects/scribblings/quick/images/img10.pdf b/collects/scribblings/quick/images/img10.pdf index 934fe974d6..5d70606044 100644 --- a/collects/scribblings/quick/images/img10.pdf +++ b/collects/scribblings/quick/images/img10.pdf @@ -42,10 +42,10 @@ endobj - -PLT Scheme - -Untitledmflatt@Macintosh \(Matthew Flatt\) + +PLT Scheme + +Untitledmflatt@Macintosh \(Matthew Flatt\) @@ -55,8 +55,8 @@ endstream endobj 2 0 obj <>endobj xref @@ -73,7 +73,7 @@ xref 0000000640 00000 n trailer << /Size 10 /Root 1 0 R /Info 2 0 R -/ID [<359940CD83EE8F3FC014C34CE1255CDE><359940CD83EE8F3FC014C34CE1255CDE>] +/ID [<773F739C40C01D398B1ACA4FA8323A87><773F739C40C01D398B1ACA4FA8323A87>] >> startxref 2278 diff --git a/collects/scribblings/quick/images/img11.pdf b/collects/scribblings/quick/images/img11.pdf index b71cc76089..bbf27fdc69 100644 Binary files a/collects/scribblings/quick/images/img11.pdf and b/collects/scribblings/quick/images/img11.pdf differ diff --git a/collects/scribblings/quick/images/img12.pdf b/collects/scribblings/quick/images/img12.pdf index 03e4c972c7..bf80744b7b 100644 Binary files a/collects/scribblings/quick/images/img12.pdf and b/collects/scribblings/quick/images/img12.pdf differ diff --git a/collects/scribblings/quick/images/img13.pdf b/collects/scribblings/quick/images/img13.pdf index f67ca20c7c..c0045d2a2c 100644 Binary files a/collects/scribblings/quick/images/img13.pdf and b/collects/scribblings/quick/images/img13.pdf differ diff --git a/collects/scribblings/quick/images/img14.pdf b/collects/scribblings/quick/images/img14.pdf index 56bb978304..9b4e55ba98 100644 --- a/collects/scribblings/quick/images/img14.pdf +++ b/collects/scribblings/quick/images/img14.pdf @@ -42,10 +42,10 @@ endobj - -PLT Scheme - -Untitledmflatt@Macintosh \(Matthew Flatt\) + +PLT Scheme + +Untitledmflatt@Macintosh \(Matthew Flatt\) @@ -55,8 +55,8 @@ endstream endobj 2 0 obj <>endobj xref @@ -73,7 +73,7 @@ xref 0000000577 00000 n trailer << /Size 10 /Root 1 0 R /Info 2 0 R -/ID [] +/ID [] >> startxref 2215 diff --git a/collects/scribblings/quick/images/img15.pdf b/collects/scribblings/quick/images/img15.pdf index 4375287b58..b84d3dd08b 100644 Binary files a/collects/scribblings/quick/images/img15.pdf and b/collects/scribblings/quick/images/img15.pdf differ diff --git a/collects/scribblings/quick/images/img16.pdf b/collects/scribblings/quick/images/img16.pdf index 3c16549a1a..10364af170 100644 --- a/collects/scribblings/quick/images/img16.pdf +++ b/collects/scribblings/quick/images/img16.pdf @@ -42,10 +42,10 @@ endobj - -PLT Scheme - -Untitledmflatt@Macintosh \(Matthew Flatt\) + +PLT Scheme + +Untitledmflatt@Macintosh \(Matthew Flatt\) @@ -55,8 +55,8 @@ endstream endobj 2 0 obj <>endobj xref @@ -73,7 +73,7 @@ xref 0000000588 00000 n trailer << /Size 10 /Root 1 0 R /Info 2 0 R -/ID [<3F728FBF71FC3EE42151B158C78C6E47><3F728FBF71FC3EE42151B158C78C6E47>] +/ID [<2D22C5E6138860AE600CF56ED7C7E964><2D22C5E6138860AE600CF56ED7C7E964>] >> startxref 2226 diff --git a/collects/scribblings/quick/images/img17.pdf b/collects/scribblings/quick/images/img17.pdf index 92fd33a72a..423035879b 100644 Binary files a/collects/scribblings/quick/images/img17.pdf and b/collects/scribblings/quick/images/img17.pdf differ diff --git a/collects/scribblings/quick/images/img18.pdf b/collects/scribblings/quick/images/img18.pdf index c017abb110..766c59b57a 100644 Binary files a/collects/scribblings/quick/images/img18.pdf and b/collects/scribblings/quick/images/img18.pdf differ diff --git a/collects/scribblings/quick/images/img19.pdf b/collects/scribblings/quick/images/img19.pdf index 45b4b91d19..b8e14fbdc0 100644 Binary files a/collects/scribblings/quick/images/img19.pdf and b/collects/scribblings/quick/images/img19.pdf differ diff --git a/collects/scribblings/quick/images/img2.pdf b/collects/scribblings/quick/images/img2.pdf index 2f95dc5f10..94573b751b 100644 --- a/collects/scribblings/quick/images/img2.pdf +++ b/collects/scribblings/quick/images/img2.pdf @@ -44,10 +44,10 @@ endobj - -PLT Scheme - -Untitledmflatt@Macintosh \(Matthew Flatt\) + +PLT Scheme + +Untitledmflatt@Macintosh \(Matthew Flatt\) @@ -57,8 +57,8 @@ endstream endobj 2 0 obj <>endobj xref @@ -75,7 +75,7 @@ xref 0000000546 00000 n trailer << /Size 10 /Root 1 0 R /Info 2 0 R -/ID [] +/ID [<0A1E7255A8DE9CB04AA60879F660024B><0A1E7255A8DE9CB04AA60879F660024B>] >> startxref 2184 diff --git a/collects/scribblings/quick/images/img20.pdf b/collects/scribblings/quick/images/img20.pdf index 7377683ff3..c26e315d45 100644 Binary files a/collects/scribblings/quick/images/img20.pdf and b/collects/scribblings/quick/images/img20.pdf differ diff --git a/collects/scribblings/quick/images/img21.pdf b/collects/scribblings/quick/images/img21.pdf index 0d081d40bc..0a66ba9f0d 100644 Binary files a/collects/scribblings/quick/images/img21.pdf and b/collects/scribblings/quick/images/img21.pdf differ diff --git a/collects/scribblings/quick/images/img22.pdf b/collects/scribblings/quick/images/img22.pdf index 5b6ef6524b..93e545155f 100644 Binary files a/collects/scribblings/quick/images/img22.pdf and b/collects/scribblings/quick/images/img22.pdf differ diff --git a/collects/scribblings/quick/images/img23.pdf b/collects/scribblings/quick/images/img23.pdf index 1308619bbe..5abb060e1a 100644 Binary files a/collects/scribblings/quick/images/img23.pdf and b/collects/scribblings/quick/images/img23.pdf differ diff --git a/collects/scribblings/quick/images/img24.pdf b/collects/scribblings/quick/images/img24.pdf index f6af0e500c..42da18e9e2 100644 Binary files a/collects/scribblings/quick/images/img24.pdf and b/collects/scribblings/quick/images/img24.pdf differ diff --git a/collects/scribblings/quick/images/img25.pdf b/collects/scribblings/quick/images/img25.pdf index e8d08c445a..cb04e4b6a3 100644 --- a/collects/scribblings/quick/images/img25.pdf +++ b/collects/scribblings/quick/images/img25.pdf @@ -43,10 +43,10 @@ endobj - -PLT Scheme - -Untitledmflatt@Macintosh \(Matthew Flatt\) + +PLT Scheme + +Untitledmflatt@Macintosh \(Matthew Flatt\) @@ -56,8 +56,8 @@ endstream endobj 2 0 obj <>endobj xref @@ -74,7 +74,7 @@ xref 0000000577 00000 n trailer << /Size 10 /Root 1 0 R /Info 2 0 R -/ID [] +/ID [] >> startxref 2215 diff --git a/collects/scribblings/quick/images/img26.pdf b/collects/scribblings/quick/images/img26.pdf index d3f53f6e63..d979ba6be1 100644 --- a/collects/scribblings/quick/images/img26.pdf +++ b/collects/scribblings/quick/images/img26.pdf @@ -42,10 +42,10 @@ endobj - -PLT Scheme - -Untitledmflatt@Macintosh \(Matthew Flatt\) + +PLT Scheme + +Untitledmflatt@Macintosh \(Matthew Flatt\) @@ -55,8 +55,8 @@ endstream endobj 2 0 obj <>endobj xref @@ -73,7 +73,7 @@ xref 0000000622 00000 n trailer << /Size 10 /Root 1 0 R /Info 2 0 R -/ID [<5B1279F9960652F0F9499AE6C2394568><5B1279F9960652F0F9499AE6C2394568>] +/ID [<6C51B73DC3A90C9A3E8D707F4552676C><6C51B73DC3A90C9A3E8D707F4552676C>] >> startxref 2260 diff --git a/collects/scribblings/quick/images/img27.pdf b/collects/scribblings/quick/images/img27.pdf index 885aa953ec..4c0667c991 100644 Binary files a/collects/scribblings/quick/images/img27.pdf and b/collects/scribblings/quick/images/img27.pdf differ diff --git a/collects/scribblings/quick/images/img28.pdf b/collects/scribblings/quick/images/img28.pdf index f11402b45e..63cf5f2e8f 100644 Binary files a/collects/scribblings/quick/images/img28.pdf and b/collects/scribblings/quick/images/img28.pdf differ diff --git a/collects/scribblings/quick/images/img29.pdf b/collects/scribblings/quick/images/img29.pdf index 4c132036eb..709afd4a14 100644 Binary files a/collects/scribblings/quick/images/img29.pdf and b/collects/scribblings/quick/images/img29.pdf differ diff --git a/collects/scribblings/quick/images/img3.pdf b/collects/scribblings/quick/images/img3.pdf index 42c8531d15..d0d2fbb178 100644 Binary files a/collects/scribblings/quick/images/img3.pdf and b/collects/scribblings/quick/images/img3.pdf differ diff --git a/collects/scribblings/quick/images/img4.pdf b/collects/scribblings/quick/images/img4.pdf index f00b183fa2..b97703e6c6 100644 --- a/collects/scribblings/quick/images/img4.pdf +++ b/collects/scribblings/quick/images/img4.pdf @@ -44,10 +44,10 @@ endobj - -PLT Scheme - -Untitledmflatt@Macintosh \(Matthew Flatt\) + +PLT Scheme + +Untitledmflatt@Macintosh \(Matthew Flatt\) @@ -57,8 +57,8 @@ endstream endobj 2 0 obj <>endobj xref @@ -75,7 +75,7 @@ xref 0000000546 00000 n trailer << /Size 10 /Root 1 0 R /Info 2 0 R -/ID [<6E7272D6B2731DC8CB2BE347FB5EA742><6E7272D6B2731DC8CB2BE347FB5EA742>] +/ID [<18F7F7D89292F20542678B75862EDC0C><18F7F7D89292F20542678B75862EDC0C>] >> startxref 2184 diff --git a/collects/scribblings/quick/images/img5.pdf b/collects/scribblings/quick/images/img5.pdf index 772d873b33..f04c3d80a8 100644 Binary files a/collects/scribblings/quick/images/img5.pdf and b/collects/scribblings/quick/images/img5.pdf differ diff --git a/collects/scribblings/quick/images/img6.pdf b/collects/scribblings/quick/images/img6.pdf index 9e307630d5..495d919428 100644 Binary files a/collects/scribblings/quick/images/img6.pdf and b/collects/scribblings/quick/images/img6.pdf differ diff --git a/collects/scribblings/quick/images/img7.pdf b/collects/scribblings/quick/images/img7.pdf index d2bcfd4e61..5d91589518 100644 Binary files a/collects/scribblings/quick/images/img7.pdf and b/collects/scribblings/quick/images/img7.pdf differ diff --git a/collects/scribblings/quick/images/img8.pdf b/collects/scribblings/quick/images/img8.pdf index 9d824c8753..6666f2d535 100644 Binary files a/collects/scribblings/quick/images/img8.pdf and b/collects/scribblings/quick/images/img8.pdf differ diff --git a/collects/scribblings/quick/images/img9.pdf b/collects/scribblings/quick/images/img9.pdf index ebc458cd74..e106eda746 100644 Binary files a/collects/scribblings/quick/images/img9.pdf and b/collects/scribblings/quick/images/img9.pdf differ diff --git a/collects/scribblings/quick/mreval.ss b/collects/scribblings/quick/mreval.ss index f717181c70..14c1c969c3 100644 --- a/collects/scribblings/quick/mreval.ss +++ b/collects/scribblings/quick/mreval.ss @@ -1,11 +1,11 @@ -#lang scheme/base +#lang racket/base (require scriblib/gui-eval) (provide (rename-out [gui-interaction mr-interaction] [gui-interaction-eval mr-interaction-eval] - [gui-schememod+eval mr-schememod+eval] - [gui-schemeblock+eval mr-schemeblock+eval] + [gui-racketmod+eval mr-racketmod+eval] + [gui-racketblock+eval mr-racketblock+eval] [gui-def+int mr-def+int] [gui-defs+int mr-defs+int] [gui-interaction-eval-show mr-interaction-eval-show])) diff --git a/collects/scribblings/quick/quick.scrbl b/collects/scribblings/quick/quick.scrbl index 6874191c7b..cffa661195 100644 --- a/collects/scribblings/quick/quick.scrbl +++ b/collects/scribblings/quick/quick.scrbl @@ -7,20 +7,20 @@ @; ---------------------------------------------------------------------- @(require scribble/manual - "mreval.ss" - "keep.ss" + "mreval.rkt" + "keep.rkt" scribble/urls scribble/struct - scheme/class + racket/class - (for-label scheme/base - scheme/gui/base - scheme/class + (for-label racket/base + racket/gui/base + racket/class slideshow slideshow/code slideshow/flash) - (for-syntax scheme/base)) + (for-syntax racket/base)) @; ---------------------------------------------------------------------- @@ -31,14 +31,14 @@ endeavours, the picture library supports interesting and enlightening examples. After all, a picture is worth five hundred ``hello world''s. Along the same lines, we assume that you will run the examples using -@link[url:download-drscheme]{DrRacket}. Using DrRacket is the fastest +@link[url:download-drracket]{DrRacket}. Using DrRacket is the fastest way to get a sense of what the language and system feels like, even if you eventually use Racket with Emacs, vi, or some other editor. @; ---------------------------------------------------------------------- @section{Ready...} -@link[url:download-drscheme]{Download Racket}, install, and then +@link[url:download-drracket]{Download Racket}, install, and then start DrRacket. @; ---------------------------------------------------------------------- @@ -49,7 +49,7 @@ part of a library for creating slide presentations. Copy the following into the @defterm{definitions area}, which is the top text area that you see in DrRacket: -@schememod[slideshow] +@racketmod[slideshow] Then click the @onscreen{Run} button. You'll see the text caret move to the bottom text area, which is the @defterm{interactions area}. @@ -64,7 +64,7 @@ use the language declared in the source via the @menuitem["Language" When you type an expression after the @onscreen{>} in the interactions window and hit Enter, DrRacket evaluates the expression and prints its result. An expression can be just a value, such as the number -@scheme[5] or the string @scheme["art gallery"]: +@racket[5] or the string @racket["art gallery"]: @mr-interaction[5 "art gallery"] @@ -74,15 +74,15 @@ function arguments, and then a close parenthesis, like this: @mr-interaction[(circle 10)] -A result from the @scheme[circle] function is a picture value, which +A result from the @racket[circle] function is a picture value, which prints as an expression result in much the same way that numbers or -strings print. The argument to @scheme[circle] determines the +strings print. The argument to @racket[circle] determines the circle's size in pixels. As you might guess, there's a -@scheme[rectangle] function that takes two arguments instead of one: +@racket[rectangle] function that takes two arguments instead of one: @mr-interaction[(rectangle 10 20)] -Try giving @scheme[circle] the wrong number of arguments, just to see +Try giving @racket[circle] the wrong number of arguments, just to see what happens: @mr-interaction[(circle 10 20)] @@ -90,28 +90,28 @@ what happens: Note that DrRacket highlights in pink the expression that triggered the error (but pink highlighting is not shown in this documentation). -In addition to basic picture constructors like @scheme[circle] and -@scheme[rectangle], there's a @scheme[hc-append] function that +In addition to basic picture constructors like @racket[circle] and +@racket[rectangle], there's a @racket[hc-append] function that combines pictures. When you start composing function calls in Racket, it looks like this: @mr-interaction[(hc-append (circle 10) (rectangle 10 20))] -The hyphen in the name @scheme[hc-append] is just a part of the -identifier; it's not @schemeidfont{hc} minus -@schemeidfont{append}. The function name starts with @scheme[h] +The hyphen in the name @racket[hc-append] is just a part of the +identifier; it's not @racketidfont{hc} minus +@racketidfont{append}. The function name starts with @racket[h] because it combines pictures horizontally, and the next letter is -@scheme[c] because the pictures are centered vertically. +@racket[c] because the pictures are centered vertically. If you wonder what other functions exist---perhaps a way to stack pictures vertically and left-aligned?---move the text caret to the -name @scheme[hc-append] and press the F1 key in DrRacket. A browser +name @racket[hc-append] and press the F1 key in DrRacket. A browser window will open, and it will give you a link to the documentation for -@scheme[hc-append]. Click the link, and you'll see lots of other +@racket[hc-append]. Click the link, and you'll see lots of other functions. If you're reading this in HTML form, you can also just click on -@scheme[hc-append] or any other imported identifier that is used in +@racket[hc-append] or any other imported identifier that is used in this tutorial. @; ---------------------------------------------------------------------- @@ -122,34 +122,34 @@ simpler to give them names. Move back to the definitions area (the top area) and add two definitions, so that the complete content of the definitions area looks like this: -@mr-schememod+eval[ +@mr-racketmod+eval[ slideshow (define c (circle 10)) (define r (rectangle 10 20)) ] -Then click @onscreen{Run} again. Now, you can just type @scheme[c] or -@scheme[r]: +Then click @onscreen{Run} again. Now, you can just type @racket[c] or +@racket[r]: @mr-interaction[r (hc-append c r) (hc-append 20 c r c)] -As you can see, the @scheme[hc-append] function accepts an optional +As you can see, the @racket[hc-append] function accepts an optional number argument before the picture arguments, and it accepts any number of picture arguments. When a number is provided, it specifies the amount of space to add between pictures. -We could have evaluated the @scheme[define] forms for @scheme[c] and -@scheme[r] in the interactions area instead of the definitions +We could have evaluated the @racket[define] forms for @racket[c] and +@racket[r] in the interactions area instead of the definitions area. In practice, though, the definitions area is where your program lives---it's the file that you save---while the interaction area is for transient explorations and debugging tasks. Let's add a function definition to the program. A function definition -uses @scheme[define], just like our shape definitions, but with an +uses @racket[define], just like our shape definitions, but with an open parenthesis before the function name, and names for the function arguments before the matching close parenthesis: -@mr-schemeblock+eval[ +@mr-racketblock+eval[ (define (square n) (code:comment @#,t{A semi-colon starts a line comment.}) (code:comment @#,t{The expression below is the function body.}) @@ -173,7 +173,7 @@ definition area. @; ---------------------------------------------------------------------- @section{Local Binding} -The @scheme[define] form can be used in some places to create local +The @racket[define] form can be used in some places to create local bindings. For example, it can be used inside a function body: @mr-def+int[ @@ -183,10 +183,10 @@ bindings. For example, it can be used inside a function body: (four (circle 10)) ] -More typically, Racketeers use the @scheme[let] or @scheme[let*] form -for local binding. An advantage of @scheme[let] is that it can be used +More typically, Racketeers use the @racket[let] or @racket[let*] form +for local binding. An advantage of @racket[let] is that it can be used in any expression position. Also, it binds many identifiers at once, -instead of requiring a separate @scheme[define] for each identifier: +instead of requiring a separate @racket[define] for each identifier: @mr-def+int[ (define (checker p1 p2) @@ -197,8 +197,8 @@ instead of requiring a separate @scheme[define] for each identifier: (colorize (square 10) "black")) ] -A @scheme[let] form binds many identifiers at the same time, so the -bindings cannot refer to each other. The @scheme[let*] form, in +A @racket[let] form binds many identifiers at the same time, so the +bindings cannot refer to each other. The @racket[let*] form, in contrast, allows later bindings to use earlier bindings: @mr-def+int[ @@ -214,13 +214,13 @@ contrast, allows later bindings to use earlier bindings: @; ---------------------------------------------------------------------- @section{Functions are Values} -Instead of calling @scheme[circle] as a function, try evaluating just -@scheme[circle] as an expression: +Instead of calling @racket[circle] as a function, try evaluating just +@racket[circle] as an expression: @mr-interaction[circle] -That is, the identifier @scheme[circle] is bound to a function -(a.k.a. ``procedure''), just like @scheme[c] is bound to a +That is, the identifier @racket[circle] is bound to a function +(a.k.a. ``procedure''), just like @racket[c] is bound to a circle. Unlike a circle picture, there's not a simple way of completely printing the function, so DrRacket just prints @procedure{circle}. @@ -239,30 +239,30 @@ arguments: When calling a function that accepts a function argument, the argument function often isn't needed anywhere else. Having to write -down the function via @scheme[define] would be a hassle, because you +down the function via @racket[define] would be a hassle, because you have to make up a name and find a place to put the function -definition. The alternative is to use @scheme[lambda], which creates an +definition. The alternative is to use @racket[lambda], which creates an anonymous function: @mr-interaction[(series (lambda (size) (checkerboard (square size))))] -The parenthesized names after a @scheme[lambda] are the arguments to +The parenthesized names after a @racket[lambda] are the arguments to the function, and the expression after the argument names is the function body. Using the word ``lambda'' instead of ``function'' or ``procedure'' is part of Racket's history and culture. -A @scheme[define] form for a function is really a shorthand for a -simple @scheme[define] using @scheme[lambda] as the value. For -example, the @scheme[series] definition could be written as +A @racket[define] form for a function is really a shorthand for a +simple @racket[define] using @racket[lambda] as the value. For +example, the @racket[series] definition could be written as -@schemeblock[ +@racketblock[ (define series (lambda (mk) (hc-append 4 (mk 5) (mk 10) (mk 20)))) ] Most Racketeers prefer to use the shorthand function form with -@scheme[define] instead of expanding to @scheme[lambda]. +@racket[define] instead of expanding to @racket[lambda]. @; ---------------------------------------------------------------------- @section{Lexical Scope} @@ -270,12 +270,12 @@ Most Racketeers prefer to use the shorthand function form with Racket is a lexically scoped language, which means that whenever an identifier is used as an expression, something in the textual environment of the expression determines the identifier's -binding. This rule applies to identifiers in a @scheme[lambda] body as +binding. This rule applies to identifiers in a @racket[lambda] body as well as anywhere else. -For example, in the following @scheme[rgb-series] function the uses -of @scheme[mk] in each @scheme[lambda] form to refer to the argument of -@scheme[rgb-series], since that's the binding that is textually in +For example, in the following @racket[rgb-series] function the uses +of @racket[mk] in each @racket[lambda] form to refer to the argument of +@racket[rgb-series], since that's the binding that is textually in scope: @mr-def+int[ @@ -288,7 +288,7 @@ scope: (rgb-series square) ] -Here's another example, where @scheme[rgb-maker] takes a function and +Here's another example, where @racket[rgb-maker] takes a function and returns a new one that remembers and uses the original function. @mr-def+int[ @@ -301,9 +301,9 @@ returns a new one that remembers and uses the original function. (series (rgb-maker square)) ] -Note how composing functions via @scheme[rgb-maker] creates a +Note how composing functions via @racket[rgb-maker] creates a different alignment of objects within the picture compared to using -@scheme[rgb-series]. +@racket[rgb-series]. @; ---------------------------------------------------------------------- @section{Lists} @@ -312,25 +312,23 @@ Racket inherits much of its style from the language Lisp, whose name originally stood for ``LISt Processor,'' and lists remain an important part of Racket. -The @scheme[list] function takes any number of arguments and returns +The @racket[list] function takes any number of arguments and returns a list containing the given values: @mr-interaction[(list "red" "green" "blue") (list (circle 10) (square 10))] -As you can see, a list prints as a pair of parentheses wrapped around +As you can see, a list prints as a backquoted pair of parentheses wrapped around the printed form of the list elements. There's room for confusion here, because parentheses are used for both expressions, such as -@scheme[(circle 10)], and printed results, such as -@schemeresult[("red" "green" "blue")]. This connection between -expressions and printed results is no coincidence, but we save that -bit of culture for @seclink[#:doc '(lib -"scribblings/guide/guide.scrbl") "quoting-lists"]{discussion -elsewhere}. In the documentation and in DrRacket, result parentheses -are printed in blue, unlike expression parentheses. +@racket[(circle 10)], and printed results, such as +@racketresult[`("red" "green" "blue")]. The backquote is the key difference, +as @seclink[#:doc '(lib "scribblings/guide/guide.scrbl") "quoting-lists"]{discussed +elsewhere}. To help emphasize the difference, in the documentation and in DrRacket, +result parentheses are printed in blue, unlike expression parentheses. If you have a list, then you'll eventually want to do something with -each of the elements. The @scheme[map] function takes a list and a +each of the elements. The @racket[map] function takes a list and a function to apply to each element of the list; it returns a new list to combine the function's results: @@ -342,21 +340,21 @@ to combine the function's results: (rainbow (square 5)) ] -Another function that works with lists is @scheme[apply]. Like -@scheme[map], it takes a function and a list, but a function given -to @scheme[apply] should take all of the arguments at once, instead of -each one individually. The @scheme[apply] function is especially +Another function that works with lists is @racket[apply]. Like +@racket[map], it takes a function and a list, but a function given +to @racket[apply] should take all of the arguments at once, instead of +each one individually. The @racket[apply] function is especially useful with functions that take any number of arguments, such as -@scheme[vc-append]: +@racket[vc-append]: @mr-interaction[ (apply vc-append (rainbow (square 5))) ] -Note that @scheme[(vc-append (rainbow (square 5)))] would not work, -because @scheme[vc-append] does not want a list as an argument; it +Note that @racket[(vc-append (rainbow (square 5)))] would not work, +because @racket[vc-append] does not want a list as an argument; it wants a picture as an argument, and it is willing to accept any number -of them. The @scheme[apply] function bridges the gap between a +of them. The @racket[apply] function bridges the gap between a function that wants many arguments and a list of those arguments as a single value. @@ -365,17 +363,17 @@ single value. Since your program in the definitions window starts with -@schememod[slideshow] +@racketmod[slideshow] all of the code that you put in the definitions window is inside a module. Furthermore, the module initially imports everything from the -module designated by @schememodname[slideshow], which exports +module designated by @racketmodname[slideshow], which exports picture-making functions as well as more commonly used functions -such as @scheme[list] and @scheme[map]. +such as @racket[list] and @racket[map]. -To import additional libraries, use the @scheme[require] form. For -example, the library @schememodname[slideshow/flash] provides a -@scheme[filled-flash] function: +To import additional libraries, use the @racket[require] form. For +example, the library @racketmodname[slideshow/flash] provides a +@racket[filled-flash] function: @mr-def+int[ (require slideshow/flash) @@ -389,10 +387,10 @@ Modules are named and distributed in various ways: @item{Some modules are packaged in the Racket distribution or otherwise installed into a hierarchy of @defterm{collections}. For example, the module name - @schememodname[slideshow/flash] means ``the module implemented - in the file @filepath{flash.ss} that is located in the + @racketmodname[slideshow/flash] means ``the module implemented + in the file @filepath{flash.rkt} that is located in the @filepath{slideshow} collection.'' When a module name includes - no slash, then it refers to a @filepath{main.ss} file.} + no slash, then it refers to a @filepath{main.rkt} file.} @item{Some modules are distributed through the @link[url:planet]{@PLaneT} server, and they can be @@ -400,42 +398,42 @@ Modules are named and distributed in various ways: that you evaluate the following fragment: @mr-def+int[ - (require (planet "random.ss" ("schematics" "random.plt" 1 0))) + (require (planet "random.rkt" ("schematics" "random.plt" 1 0))) (random-gaussian) ] DrRacket automatically downloads version 1.0 of the @filepath{random.plt} library and then imports the - @filepath{random.ss} module.} + @filepath{random.rkt} module.} @item{Some modules live relative to other modules, without necessarily belonging to any particular collection or package. For example, in DrRacket, if you save your definitions so far in a - file @filepath{quick.ss} and add the line + file @filepath{quick.rkt} and add the line - @schemeblock[(provide rainbow square)] + @racketblock[(provide rainbow square)] then you can open a new tab or window in DrRacket, type the new - program @filepath{use.ss} in the same directory as - @filepath{quick.ss}: + program @filepath{use.rkt} in the same directory as + @filepath{quick.rkt}: - @schememod[ - scheme - (require "quick.ss") + @racketmod[ + racket + (require "quick.rkt") (rainbow (square 5)) ] - and when you run @filepath{use.ss}, a rainbow list of squares - is the output. Note that @filepath{use.ss} is written using - the initial import @schememodname[scheme], which does not + and when you run @filepath{use.rkt}, a rainbow list of squares + is the output. Note that @filepath{use.rkt} is written using + the initial import @racketmodname[racket], which does not supply any picture-making functions itself---but does provide - @scheme[require] and the function-calling syntax.} + @racket[require] and the function-calling syntax.} ] Racketeers typically write new programs and libraries as modules that import each other through relative paths, and that use existing -libraries from collections and @scheme[planet]. When a program or +libraries from collections and @racket[planet]. When a program or library developed this way seems useful to others, it can be uploaded as a @PLaneT package or distributed in the more old-fashioned way as an installable collection archive (in either case without modifying @@ -453,13 +451,13 @@ Here's another library to try: Instead of a circle, the result is a picture of the code that, if it were used as an expression, would produce a circle. In other words, -@scheme[code] is not a function, but instead a new syntactic form for +@racket[code] is not a function, but instead a new syntactic form for creating pictures; the bit between the opening parenthesis with -@scheme[code] is not an expression, but instead manipulated by the -@scheme[code] syntactic form. +@racket[code] is not an expression, but instead manipulated by the +@racket[code] syntactic form. This helps explain what we meant in the previous section when we said -that @schememodname[scheme] provides @scheme[require] and the +that @racketmodname[racket] provides @racket[require] and the function-calling syntax. Libraries are not restricted to exporting values, such as functions; they can also define new syntactic forms. In this sense, Racket isn't exactly a language at all; it's @@ -467,7 +465,7 @@ more of an idea for how to structure a language so that you can extend it or create entirely new languages. One way to introduce a new syntactic form is through -@scheme[define-syntax] with @scheme[syntax-rules]: +@racket[define-syntax] with @racket[syntax-rules]: @mr-def+int[ (define-syntax pict+code @@ -479,27 +477,27 @@ One way to introduce a new syntactic form is through (pict+code (circle 10)) ] -This kind of definition is a macro. The @scheme[(pict+code expr)] part +This kind of definition is a macro. The @racket[(pict+code expr)] part is a pattern for uses of the macro; instances of the pattern in a program are replaced by instances of the corresponding template, which -is @scheme[(hc-append 10 expr (code expr))]. In particular, -@scheme[(pict+code (circle 10))] matches the pattern with -@scheme[(circle 10)] as @scheme[expr], so it is replaced with -@scheme[(hc-append 10 (circle 10) (code (circle 10)))]. +is @racket[(hc-append 10 expr (code expr))]. In particular, +@racket[(pict+code (circle 10))] matches the pattern with +@racket[(circle 10)] as @racket[expr], so it is replaced with +@racket[(hc-append 10 (circle 10) (code (circle 10)))]. Of course, the sword of syntactic extension cuts both ways: inventing a new language can make it easier to say what you want, but harder for others to understand. As it happens, the developers of Racket are constantly giving talks and writing papers that involve Racket code, and it's worthwhile for everyone who works on those products to know -about @scheme[code]. +about @racket[code]. In fact, you might want to take a look at the @keep-file["quick.scrbl"] @link["quick.scrbl"]{source of this document}. You'll see that it -starts with @schemefont{#lang}, but otherwise doesn't look a lot +starts with @racketfont{#lang}, but otherwise doesn't look a lot like Racket; nevertheless, we build this document by running its source as a Racket program. We have to use a lot more than -@scheme[syntax-rules] to extend Racket's syntax enough for writing +@racket[syntax-rules] to extend Racket's syntax enough for writing documents, but Racket's syntactic extension can take you a long way. @; ---------------------------------------------------------------------- @@ -508,18 +506,18 @@ documents, but Racket's syntactic extension can take you a long way. An object system is another example of a sophisticated language extension that is worth learning and using for Racket users. Objects are sometimes better than functions, even when you have -@scheme[lambda], and objects work especially well for graphical user +@racket[lambda], and objects work especially well for graphical user interfaces. The API for Racket's GUI and graphics system is expressed in terms of objects and classes. The class system itself is implemented by the -@schememodname[scheme/class] library, and the -@schememodname[scheme/gui/base] library provides the GUI and drawing +@racketmodname[racket/class] library, and the +@racketmodname[racket/gui/base] library provides the GUI and drawing classes. By convention, the classes are given names that end with -@scheme[%]: +@racket[%]: @mr-defs+int[ -[(require scheme/class scheme/gui/base) +[(require racket/class racket/gui/base) (define f (new frame% [label "My Art"] [width 300] [height 300] @@ -529,18 +527,18 @@ classes. By convention, the classes are given names that end with @(mr-interaction-eval (send f show #f)) -The @scheme[new] form creates an instance of a class, where -initialization arguments like @scheme[label] and @scheme[width] are -provided by name. The @scheme[send] form calls a method of the object, -such as @scheme[show], with arguments after the method name; the -argument @scheme[#t] in this case is the boolean constant ``true.'' +The @racket[new] form creates an instance of a class, where +initialization arguments like @racket[label] and @racket[width] are +provided by name. The @racket[send] form calls a method of the object, +such as @racket[show], with arguments after the method name; the +argument @racket[#t] in this case is the boolean constant ``true.'' -Pictures generated with @schememodname[slideshow] encapsulate a +Pictures generated with @racketmodname[slideshow] encapsulate a function that uses the graphics toolbox's drawing commands to render the picture to a drawing context, such as a canvas in a frame. The -@scheme[make-pict-drawer] function from @schememodname[slideshow] +@racket[make-pict-drawer] function from @racketmodname[slideshow] exposes a picture's drawing function. We can use -@scheme[make-pict-drawer] in a canvas-painting callback to draw a +@racket[make-pict-drawer] in a canvas-painting callback to draw a picture into a canvas: @mr-def+int[ @@ -571,8 +569,8 @@ that's how a frame manages its children by default. This introduction to Racket purposely avoids many of the traditional ways of introducing and distinguishing Lisp or Racket: prefix arithmetic notation, symbols, quoting and quasiquoting lists, -@scheme[eval], first-class continuations, and the idea that all syntax -is really just a @scheme[lambda] in disguise. While those are all part +@racket[eval], first-class continuations, and the idea that all syntax +is really just a @racket[lambda] in disguise. While those are all part of Racket, they are not the main ingredients of day-to-day programming in Racket. diff --git a/collects/scribblings/reference/async-channels.scrbl b/collects/scribblings/reference/async-channels.scrbl index 4030c5fc7a..22de9ad336 100644 --- a/collects/scribblings/reference/async-channels.scrbl +++ b/collects/scribblings/reference/async-channels.scrbl @@ -1,16 +1,16 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/async-channel)) + (for-label racket/async-channel)) @(define async-eval (lambda () (let ([the-eval (make-base-eval)]) - (the-eval '(require scheme/async-channel)) + (the-eval '(require racket/async-channel)) the-eval))) @title[#:tag "async-channel"]{Buffered Asynchronous Channels} -@note-lib-only[scheme/async-channel] +@note-lib-only[racket/async-channel] @margin-note/ref{See also @secref["threadmbox"].} diff --git a/collects/scribblings/reference/booleans.scrbl b/collects/scribblings/reference/booleans.scrbl index 740b00b2f2..5fce281a2f 100644 --- a/collects/scribblings/reference/booleans.scrbl +++ b/collects/scribblings/reference/booleans.scrbl @@ -218,7 +218,7 @@ values. For opaque structure types, @scheme[equal?] is the same as @section{Boolean Synonyms} -@note-lib[scheme/bool] +@note-lib[racket/bool] @defthing[true boolean?]{A synonym for @scheme[#t].} diff --git a/collects/scribblings/reference/class.scrbl b/collects/scribblings/reference/class.scrbl index 0fa70a1852..dc6218ed6e 100644 --- a/collects/scribblings/reference/class.scrbl +++ b/collects/scribblings/reference/class.scrbl @@ -1,8 +1,8 @@ #lang scribble/doc @(require "mz.ss" - scheme/class - (for-syntax scheme/base) - (for-label scheme/trait)) + racket/class + (for-syntax racket/base) + (for-label racket/trait)) @(begin @@ -70,14 +70,14 @@ ) -@(interaction-eval #:eval class-eval (require scheme/class)) +@(interaction-eval #:eval class-eval (require racket/class)) @title[#:tag "mzlib:class" #:style 'toc]{Classes and Objects} @guideintro["classes"]{classes and objects} -@note-lib[scheme/class #:use-sources (racket/private/class-internal)] +@note-lib[racket/class #:use-sources (racket/private/class-internal)] A @deftech{class} specifies @@ -1275,7 +1275,7 @@ Evaluation of a @scheme[mixin] form checks that the @section[#:tag "trait"]{Traits} -@note-lib-only[scheme/trait] +@note-lib-only[racket/trait] A @deftech{trait} is a collection of methods that can be converted to a @tech{mixin} and then applied to a @tech{class}. Before a trait is diff --git a/collects/scribblings/reference/cmdline.scrbl b/collects/scribblings/reference/cmdline.scrbl index 237c72a1bc..147d90b5c6 100644 --- a/collects/scribblings/reference/cmdline.scrbl +++ b/collects/scribblings/reference/cmdline.scrbl @@ -1,10 +1,10 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/cmdline)) + (for-label racket/cmdline)) @title{Command-Line Parsing} -@note-lib[scheme/cmdline] +@note-lib[racket/cmdline] @defform/subs[#:literals (multi once-each once-any final jelp-labels args help-labels =>) diff --git a/collects/scribblings/reference/concurrency.scrbl b/collects/scribblings/reference/concurrency.scrbl index cf384281ae..be2c6f312c 100644 --- a/collects/scribblings/reference/concurrency.scrbl +++ b/collects/scribblings/reference/concurrency.scrbl @@ -6,7 +6,7 @@ PLT Scheme supports multiple threads of control within a program, thread-local storage, some primitive synchronization mechanisms, and a framework for composing synchronization abstractions. In addition, the -@scheme[scheme/future] library provides some support for parallelism +@scheme[racket/future] library provides some support for parallelism to improve performance. @local-table-of-contents[] diff --git a/collects/scribblings/reference/contracts.scrbl b/collects/scribblings/reference/contracts.scrbl index 343bd3bdf5..1195ccf56c 100644 --- a/collects/scribblings/reference/contracts.scrbl +++ b/collects/scribblings/reference/contracts.scrbl @@ -5,7 +5,7 @@ @(define contract-eval (lambda () (let ([the-eval (make-base-eval)]) - (the-eval '(require scheme/contract)) + (the-eval '(require racket/contract)) the-eval))) @title[#:tag "contracts" #:style 'toc]{Contracts} @@ -17,7 +17,7 @@ another. Programmers specify the behavior of a module exports via @scheme[provide/contract] and the contract system enforces those constraints. -@note-lib[scheme/contract #:use-sources (racket/contract/private/ds +@note-lib[racket/contract #:use-sources (racket/contract/private/ds racket/contract/private/base racket/contract/private/guts racket/contract/private/misc diff --git a/collects/scribblings/reference/control-lib.scrbl b/collects/scribblings/reference/control-lib.scrbl index 2af91d9930..ed46da84cc 100644 --- a/collects/scribblings/reference/control-lib.scrbl +++ b/collects/scribblings/reference/control-lib.scrbl @@ -1,17 +1,17 @@ #lang scribble/doc -@(require "mz.ss" - (for-label scheme/control)) +@(require (except-in "mz.ss" set) + (for-label racket/control)) @title{Classical Control Operators} -@note-lib-only[scheme/control] +@note-lib-only[racket/control] @(define control-eval (let ([the-eval (make-base-eval)]) - (the-eval '(require scheme/control)) + (the-eval '(require racket/control)) the-eval)) -The @scheme[scheme/control] library provides various control operators +The @scheme[racket/control] library provides various control operators from the research literature on higher-order control operators, plus a few extra convenience forms. These control operators are implemented in terms of @scheme[call-with-continuation-prompt], diff --git a/collects/scribblings/reference/define-struct.scrbl b/collects/scribblings/reference/define-struct.scrbl index fbc45d9af6..408b26aa13 100644 --- a/collects/scribblings/reference/define-struct.scrbl +++ b/collects/scribblings/reference/define-struct.scrbl @@ -1,19 +1,19 @@ #lang scribble/doc @(require "mz.ss" - (for-syntax scheme/base) - (for-label scheme/serialize)) + (for-syntax racket/base) + (for-label racket/serialize)) @(define posn-eval (make-base-eval)) -@(interaction-eval #:eval posn-eval (require (for-syntax scheme/base))) +@(interaction-eval #:eval posn-eval (require (for-syntax racket/base))) -@title[#:tag "define-struct"]{Defining Structure Types: @scheme[define-struct]} +@title[#:tag "define-struct"]{Defining Structure Types: @scheme[struct]} @guideintro["define-struct"]{@scheme[define-struct]} -@defform/subs[(define-struct id-maybe-super (field ...) - struct-option ...) - ([id-maybe-super id - (id super-id)] +@defform/subs[(struct id maybe-super (field ...) + struct-option ...) + ([maybe-super code:blank + super-id] [field field-id [field-id field-option ...]] [struct-option #:mutable @@ -34,7 +34,7 @@ Creates a new @techlink{structure type} (or uses a pre-existing structure type if @scheme[#:prefab] is specified), and binds transformers and variables related to the @tech{structure type}. -A @scheme[define-struct] form with @math{n} @scheme[field]s defines up +A @scheme[struct] form with @math{n} @scheme[field]s defines up to @math{4+2n} names: @itemize[ @@ -42,16 +42,15 @@ to @math{4+2n} names: @item{@schemeidfont{struct:}@scheme[id], a @deftech{structure type descriptor} value that represents the @tech{structure type}.} - @item{@scheme[constructor-id] (which defaults to - @schemeidfont{make-}@scheme[id]), a @deftech{constructor} - procedure that takes @math{m} arguments and returns a new - instance of the @tech{structure type}, where @math{m} is the - number of @scheme[field]s that do not include an - @scheme[#:auto] option.} + @item{@scheme[constructor-id] (which defaults to @scheme[id]), a + @deftech{constructor} procedure that takes @math{m} arguments + and returns a new instance of the @tech{structure type}, where + @math{m} is the number of @scheme[field]s that do not include + an @scheme[#:auto] option.} @item{@scheme[id]@schemeidfont{?}, a @deftech{predicate} procedure that returns @scheme[#t] for instances of the @tech{structure - type} (constructed by @schemeidfont{make-}@scheme[id] or the + type} (constructed by @scheme[constructor-id] or the @tech{constructor} for a subtype) and @scheme[#f] for any other value.} @@ -125,7 +124,7 @@ If the @scheme[#:omit-define-syntaxes] option is supplied, then @scheme[id] is not bound as a transformer. If the @scheme[#:omit-define-values] option is supplied, then none of the usual variables are bound, but @scheme[id] is bound. If both are -supplied, then the @scheme[define-struct] form is equivalent to +supplied, then the @scheme[struct] form is equivalent to @scheme[(begin)]. If @scheme[#:auto] is supplied as a @scheme[field-option], then the @@ -147,27 +146,28 @@ For serialization, see @scheme[define-serializable-struct]. @defexamples[ #:eval posn-eval -(define-struct posn (x y [z #:auto]) - #:auto-value 0 - #:transparent) -(make-posn 1 2) -(posn? (make-posn 1 2)) -(posn-y (make-posn 1 2)) +(struct posn (x y [z #:auto]) + #:auto-value 0 + #:transparent) +(posn 1 2) +(posn? (posn 1 2)) +(posn-y (posn 1 2)) ] @defs+int[ #:eval posn-eval -[(define-struct (color-posn posn) (hue) #:mutable) - (define cp (make-color-posn 1 2 "blue"))] +[(struct color-posn posn (hue) #:mutable) + (define cp (color-posn 1 2 "blue"))] (color-posn-hue cp) cp (set-posn-z! cp 3) ]} + @defform[(struct-field-index field-id)]{ This form can only appear as an expression within a -@scheme[define-struct] form; normally, it is used with +@scheme[struct] form; normally, it is used with @scheme[#:property], especially for a property like @scheme[prop:procedure]. The result of a @scheme[struct-field-index] expression is an exact, non-negative integer that corresponds to the @@ -176,13 +176,37 @@ position within the structure declaration of the field named by @defexamples[ #:eval posn-eval -(define-struct mood-procedure (base rating) - #:property prop:procedure (struct-field-index base)) -(define happy+ (make-mood-procedure add1 10)) +(struct mood-procedure (base rating) + #:property prop:procedure (struct-field-index base)) +(define happy+ (mood-procedure add1 10)) (happy+ 2) (mood-procedure-rating happy+) ]} + +@defform/subs[(define-struct id-maybe-super (field ...) + struct-option ...) + ([id-maybe-super id + (id super-id)])]{ + +Like @scheme[struct], except that the syntax for supplying a +@scheme[super-id] is different, and the default constructor name +use a @schemeidfont{make-} prefix on @scheme[id]. + +This form is provided for backward compatibility; @scheme[struct] is +preferred. + +@defexamples[ +#:eval posn-eval +(define-struct posn (x y [z #:auto]) + #:auto-value 0 + #:transparent) +(make-posn 1 2) +(posn? (make-posn 1 2)) +(posn-y (make-posn 1 2)) +]} + + @defform[(define-struct/derived (id . rest-form) id-maybe-super (field ...) struct-option ...)]{ diff --git a/collects/scribblings/reference/dicts.scrbl b/collects/scribblings/reference/dicts.scrbl index e71170058d..c811a74596 100644 --- a/collects/scribblings/reference/dicts.scrbl +++ b/collects/scribblings/reference/dicts.scrbl @@ -3,7 +3,7 @@ scribble/eval) @(define dict-eval (make-base-eval)) -@(interaction-eval #:eval dict-eval (require scheme/dict)) +@(interaction-eval #:eval dict-eval (require racket/dict)) @title[#:tag "dicts"]{Dictionaries} @@ -24,7 +24,7 @@ values. The following datatypes are all dictionaries: ] -@note-lib[scheme/dict] +@note-lib[racket/dict] @defproc[(dict? [v any/c]) boolean?]{ diff --git a/collects/scribblings/reference/encodings.scrbl b/collects/scribblings/reference/encodings.scrbl index d19a2b02af..73141ac6c9 100644 --- a/collects/scribblings/reference/encodings.scrbl +++ b/collects/scribblings/reference/encodings.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/port)) + (for-label racket/port)) @title[#:tag "encodings"]{Encodings and Locales} diff --git a/collects/scribblings/reference/enter.scrbl b/collects/scribblings/reference/enter.scrbl index 7c5141c774..35d894de01 100644 --- a/collects/scribblings/reference/enter.scrbl +++ b/collects/scribblings/reference/enter.scrbl @@ -1,10 +1,10 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/enter)) + (for-label racket/enter)) @title[#:tag "enter"]{Interactive Module Loading} -@note-init-lib[scheme/enter] +@note-init-lib[racket/enter] @defform*[[(enter! module-path) (enter! #f)]]{ @@ -27,7 +27,7 @@ are first loaded (either directly or indirectly through transitive @scheme[require]s) via @scheme[enter!]. After switching namespaces to the designated module, @scheme[enter!] -automatically requires @scheme[scheme/enter] into the namespace, so +automatically requires @scheme[racket/enter] into the namespace, so that @scheme[enter!] can be used to switch namespaces again. When it loads or re-loads a module from a file, @scheme[enter!] prints diff --git a/collects/scribblings/reference/eval-model.scrbl b/collects/scribblings/reference/eval-model.scrbl index a1b77ded73..b0692ded20 100644 --- a/collects/scribblings/reference/eval-model.scrbl +++ b/collects/scribblings/reference/eval-model.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require scribble/struct scribble/scheme - (for-syntax scheme/base) + (for-syntax racket/base) "mz.ss" "prog-steps.ss") diff --git a/collects/scribblings/reference/exns.scrbl b/collects/scribblings/reference/exns.scrbl index 7582b1cb6d..5e00b7d9af 100644 --- a/collects/scribblings/reference/exns.scrbl +++ b/collects/scribblings/reference/exns.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require scribble/bnf "mz.ss" - (for-label scheme/fixnum)) + (for-label racket/fixnum)) @title[#:tag "exns"]{Exceptions} diff --git a/collects/scribblings/reference/file-ports.scrbl b/collects/scribblings/reference/file-ports.scrbl index 12f3e1ef82..b93002bcfc 100644 --- a/collects/scribblings/reference/file-ports.scrbl +++ b/collects/scribblings/reference/file-ports.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "mz.ss" - scheme/file) + racket/file) @(begin ;; ignore expressions at the top-level so that they don't print # @@ -12,8 +12,8 @@ (define file-eval (lambda () (let ([the-eval (make-base-eval)]) - (the-eval '(require (for-syntax scheme/base) - scheme/file)) + (the-eval '(require (for-syntax racket/base) + racket/file)) (the-eval '(define some-file (make-temporary-file))) (the-eval '(define some-other-file (make-temporary-file))) the-eval))) diff --git a/collects/scribblings/reference/filesystem.scrbl b/collects/scribblings/reference/filesystem.scrbl index 64bc2ee002..54019bc9a1 100644 --- a/collects/scribblings/reference/filesystem.scrbl +++ b/collects/scribblings/reference/filesystem.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require "mz.ss" (for-label framework/preferences - scheme/runtime-path + racket/runtime-path setup/dirs)) @title{Filesystem} @@ -398,9 +398,9 @@ can be particularly slow under Windows.} @;------------------------------------------------------------------------ @section[#:tag "runtime-path"]{Declaring Paths Needed at Run Time} -@note-lib-only[scheme/runtime-path] +@note-lib-only[racket/runtime-path] -The @schememodname[scheme/runtime-path] library provides forms for +The @schememodname[racket/runtime-path] library provides forms for accessing files and directories at run time using a path that are usually relative to an enclosing source file. Unlike using @scheme[collection-path], @scheme[define-runtime-path] exposes each @@ -409,7 +409,7 @@ so that files and directories needed at run time are carried along in a distribution. In addition to the bindings described below, -@schememodname[scheme/runtime-path] provides @scheme[#%datum] in +@schememodname[racket/runtime-path] provides @scheme[#%datum] in @tech{phase level} 1, since string constants are often used as compile-time expressions with @scheme[define-runtime-path]. @@ -426,7 +426,7 @@ result of @scheme[expr]. The path is normally computed by taking a relative path result from @scheme[expr] and adding it to a path for the enclosing file (which is computed as described below). However, tools like the executable creator can also arrange (by colluding with -@schememodname[scheme/runtime-path]) to have a different base path +@schememodname[racket/runtime-path]) to have a different base path substituted in a generated executable. If @scheme[expr] produces an absolute path, it is normally returned directly, but again may be replaced by an executable creator. In all cases, the executable @@ -579,7 +579,7 @@ bound through @scheme[define-runtime-module-path].} @;------------------------------------------------------------------------ @section[#:tag "file-lib"]{More File and Directory Utilities} -@note-lib[scheme/file] +@note-lib[racket/file] @defproc[(file->string [path path-string?] [#:mode mode-flag (or/c 'binary 'text) 'binary]) diff --git a/collects/scribblings/reference/futures.scrbl b/collects/scribblings/reference/futures.scrbl index 45b44228b0..b327351f0c 100644 --- a/collects/scribblings/reference/futures.scrbl +++ b/collects/scribblings/reference/futures.scrbl @@ -1,18 +1,15 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme - scheme/base - scheme/contract - scheme/future)) + (for-label racket/future)) @(define future-eval (make-base-eval)) -@(interaction-eval #:eval future-eval (require scheme/future)) +@(interaction-eval #:eval future-eval (require racket/future)) @title[#:tag "futures"]{Futures for Parallelism} @guideintro["effective-futures"]{futures} -@note-lib[scheme/future] +@note-lib[racket/future] @margin-note{Currently, parallel support for @scheme[future] is enabled by default for Windows, Linux x86/x86_64, and Mac OS X @@ -21,7 +18,7 @@ x86/x86_64. To enable support for other platforms, use Scheme.} The @scheme[future] and @scheme[touch] functions from -@schememodname[scheme/future] provide access to parallelism as +@schememodname[racket/future] provide access to parallelism as supported by the hardware and operation system. In contrast to @scheme[thread], which provides concurrency for arbitrary computations without parallelism, @scheme[future] provides diff --git a/collects/scribblings/reference/help.scrbl b/collects/scribblings/reference/help.scrbl index 7e2d4dc906..bdd8bc56ab 100644 --- a/collects/scribblings/reference/help.scrbl +++ b/collects/scribblings/reference/help.scrbl @@ -2,9 +2,9 @@ @(require "mz.ss" scribble/core scribble/html-properties - (for-label scheme/help + (for-label racket/help net/url - scheme/gui)) + racket/gui/base)) @; Beware of this hard-wired link to the main doc page: @(define main-doc-page @@ -18,7 +18,7 @@ @title{Interactive Help} -@note-init-lib[scheme/help] +@note-init-lib[racket/help] @deftogether[( @defidform[help] @@ -67,8 +67,8 @@ introduces a binding without actually executing the documentation, but cannot or do not want to run the providing module. @schemeblock[ -(require scheme/gui) (code:comment @#,t{does not work in @exec{mzscheme}}) -(require (for-label scheme/gui)) (code:comment @#,t{ok in @exec{mzscheme}}) +(require racket/gui) (code:comment @#,t{does not work in @exec{mzscheme}}) +(require (for-label racket/gui)) (code:comment @#,t{ok in @exec{mzscheme}}) (help frame%) ] @@ -82,7 +82,7 @@ The @scheme[(help id #:from module-path)] variant is similar to @scheme[for-label] in a temporary namespace.) @schemeblock[ -(help frame% #:from scheme/gui) (code:comment @#,t{equivalent to the above}) +(help frame% #:from racket/gui) (code:comment @#,t{equivalent to the above}) ] The @scheme[(help #:search datum ...)] form is similar to diff --git a/collects/scribblings/reference/include.scrbl b/collects/scribblings/reference/include.scrbl index 2fe0004d92..6e5f3f9ccd 100644 --- a/collects/scribblings/reference/include.scrbl +++ b/collects/scribblings/reference/include.scrbl @@ -3,7 +3,7 @@ @title[#:tag "include"]{File Inclusion} -@note-lib[scheme/include] +@note-lib[racket/include] @defform/subs[#:literals (file lib) (include path-spec) diff --git a/collects/scribblings/reference/init.scrbl b/collects/scribblings/reference/init.scrbl index 973edaed63..f03e410ef8 100644 --- a/collects/scribblings/reference/init.scrbl +++ b/collects/scribblings/reference/init.scrbl @@ -1,18 +1,18 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/pretty - scheme/gui/base)) + (for-label racket/pretty + racket/gui/base)) @title{Init Libraries} -@defmodule*/no-declare[(scheme/init)]{The @schememodname[scheme/init] +@defmodule*/no-declare[(racket/init)]{The @schememodname[racket/init] library is the default start-up library for MzScheme. It re-exports -the @schememodname[scheme], @schememodname[scheme/enter] and -@schememodname[scheme/help] libraries, and it sets +the @schememodname[scheme], @schememodname[racket/enter] and +@schememodname[racket/help] libraries, and it sets @scheme[current-print] to use @scheme[pretty-print].} -@defmodule*/no-declare[(scheme/gui/init)]{The -@schememodname[scheme/gui/init] library is the default start-up -library for MrEd. It re-exports the @schememodname[scheme/init] and -@schememodname[scheme/gui/base] libraries, and it sets +@defmodule*/no-declare[(racket/gui/init)]{The +@schememodname[racket/gui/init] library is the default start-up +library for MrEd. It re-exports the @schememodname[racket/init] and +@schememodname[racket/gui/base] libraries, and it sets @scheme[current-load] to use @scheme[text-editor-load-handler].} diff --git a/collects/scribblings/reference/load-lang.scrbl b/collects/scribblings/reference/load-lang.scrbl index 6487364666..8dee2957d8 100644 --- a/collects/scribblings/reference/load-lang.scrbl +++ b/collects/scribblings/reference/load-lang.scrbl @@ -1,59 +1,59 @@ #lang scribble/doc @(require "mz.ss") -@title[#:tag "load-lang"]{The @schememodname[scheme/load] Language} +@title[#:tag "load-lang"]{The @schememodname[racket/load] Language} -@defmodulelang[scheme/load] +@defmodulelang[racket/load] -The @schememodname[scheme/load] language supports traditional Scheme +The @schememodname[racket/load] language supports traditional Scheme evaluation, where each top-level form in the module body is separately passed to @scheme[eval] in the same way as for @scheme[load]. The namespace for evaluation shares the @tech{module registry} with -the @schememodname[scheme/load] module instance, but it has a separate +the @schememodname[racket/load] module instance, but it has a separate top-level environment, and it is initialized with the bindings of @schememodname[scheme]. A single namespace is created for each -instance of the @schememodname[scheme/load] module (i.e., multiple -modules using the @schememodname[scheme/load] language share a -namespace). The @scheme[scheme/load] library exports only +instance of the @schememodname[racket/load] module (i.e., multiple +modules using the @schememodname[racket/load] language share a +namespace). The @scheme[racket/load] library exports only @schemeidfont{#%module-begin} and @schemeidfont{#%top-interaction} forms that effectively swap in the evaluation namespace and call @scheme[eval]. -For example, the body of a module using @scheme[scheme/load] can +For example, the body of a module using @scheme[racket/load] can include @scheme[module] forms, so that running the following module prints @schemeresultfont{5}: @schememod[ -scheme/load +racket/load -(module m scheme/base +(module m racket/base (provide x) (define x 5)) -(module n scheme/base +(module n racket/base (require 'm) (display x)) (require 'n) ] -Definitions in a module using @scheme[scheme/load] are evaluated in +Definitions in a module using @scheme[racket/load] are evaluated in the current namespace, which means that @scheme[load] and @scheme[eval] can see the definitions. For example, running the following module prints @schemeresultfont{6}: @schememod[ -scheme/load +racket/load (define x 6) (display (eval 'x)) ] -Since all forms within a @schememodname[scheme/load] module are +Since all forms within a @schememodname[racket/load] module are evaluated in the top level, bindings cannot be exported from the module using @scheme[provide]. Similarly, since evaluation of the module-body forms is inherently dynamic, compilation of the module provides essentially no benefit. For these reasons, use -@schememodname[scheme/load] for interactive exploration of top-level +@schememodname[racket/load] for interactive exploration of top-level forms only, and not for constructing larger programs. diff --git a/collects/scribblings/reference/logging.scrbl b/collects/scribblings/reference/logging.scrbl index cb260c91f5..261a29ded6 100644 --- a/collects/scribblings/reference/logging.scrbl +++ b/collects/scribblings/reference/logging.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/cmdline)) + (for-label racket/cmdline)) @title[#:tag "logging"]{Logging} diff --git a/collects/scribblings/reference/match-parse.ss b/collects/scribblings/reference/match-parse.ss index e482dd48b9..c68f9ca492 100644 --- a/collects/scribblings/reference/match-parse.ss +++ b/collects/scribblings/reference/match-parse.ss @@ -1,9 +1,9 @@ -#lang scheme/base +#lang racket/base (require scribble/scheme scribble/basic scribble/struct scribble/manual - (for-label scheme/base)) + (for-label racket/base)) (provide parse-match-grammar) diff --git a/collects/scribblings/reference/match.scrbl b/collects/scribblings/reference/match.scrbl index 70adf0c679..c07c85cf1c 100644 --- a/collects/scribblings/reference/match.scrbl +++ b/collects/scribblings/reference/match.scrbl @@ -1,10 +1,10 @@ #lang scribble/doc @(require "mz.ss" "match-grammar.ss" - scheme/match) + racket/match) @(define match-eval (make-base-eval)) -@(interaction-eval #:eval match-eval (require scheme/match)) +@(interaction-eval #:eval match-eval (require racket/match)) @title[#:tag "match"]{Pattern Matching} @@ -14,7 +14,7 @@ The @scheme[match] form and related forms support general pattern matching on Scheme values. See also @secref["regexp"] for information on regular-expression matching on strings, bytes, and streams. -@note-lib[scheme/match #:use-sources (scheme/match)] +@note-lib[racket/match #:use-sources (racket/match)] @defform/subs[(match val-expr clause ...) ([clause [pat expr ...+] diff --git a/collects/scribblings/reference/mpairs.scrbl b/collects/scribblings/reference/mpairs.scrbl index 16402c0149..ccd5631f43 100644 --- a/collects/scribblings/reference/mpairs.scrbl +++ b/collects/scribblings/reference/mpairs.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require "mz.ss" scribble/scheme - (for-label scheme/mpair)) + (for-label racket/mpair)) @title[#:tag "mpairs"]{Mutable Pairs and Lists} @@ -52,7 +52,7 @@ Changes the @tech{mutable pair} @scheme[p] so that its second element is @; ---------------------------------------- @section{Mutable List Functions} -@note-lib-only[scheme/mpair] +@note-lib-only[racket/mpair] For functions described in this section, contracts are not directly enforced. In particular, when a @tech{mutable list} is expected, diff --git a/collects/scribblings/reference/mz.ss b/collects/scribblings/reference/mz.ss index d9b3976907..f4055713fb 100644 --- a/collects/scribblings/reference/mz.ss +++ b/collects/scribblings/reference/mz.ss @@ -1,17 +1,17 @@ -(module mz scheme/base +(module mz racket/base (require scribble/struct scribble/manual scribble/eval scribble/decode - scheme/contract + racket/contract "../icons.ss") (provide (all-from-out scribble/manual) (all-from-out scribble/eval) - (all-from-out scheme/contract)) + (all-from-out racket/contract)) - (require (for-label scheme)) - (provide (for-label (all-from-out scheme))) + (require (for-label racket)) + (provide (for-label (all-from-out racket))) (provide mz-examples) (define mz-eval (make-base-eval)) @@ -30,7 +30,7 @@ (syntax-rules () [(_ lib #:use-sources (src ...) . more) (begin - (declare-exporting lib scheme #:use-sources (src ...)) + (declare-exporting lib racket #:use-sources (src ...)) (defmodule*/no-declare (lib) (t (make-collect-element #f null @@ -39,8 +39,8 @@ "The bindings documented in this section are provided by the " (schememodname lib) " and " - (schememodname scheme) - " libraries, but not " (schememodname scheme/base) + (schememodname racket) + " libraries, but not " (schememodname racket/base) "." . more)))] [(_ lib . more) @@ -51,16 +51,16 @@ (syntax-rules () [(_ lib #:use-sources (src ...) . more) (begin - (declare-exporting lib scheme/init #:use-sources (src ...)) + (declare-exporting lib racket/init #:use-sources (src ...)) (defmodule*/no-declare (lib) (t "The bindings documented in this section are provided by the " (schememodname lib) " and " - (schememodname scheme/init) + (schememodname racket/init) " libraries, which means that they are available when " - (exec "mzscheme") " is started with no command-line arguments." - " They are not provided by " (schememodname scheme/base) - " or " (schememodname scheme) "." + (exec "racket") " is started with no command-line arguments." + " They are not provided by " (schememodname racket/base) + " or " (schememodname racket) "." . more)))] [(_ lib . more) (note-init-lib lib #:use-sources () . more)])) @@ -72,8 +72,8 @@ (defmodule lib #:use-sources (src ...) (t "The bindings documented in this section are provided by the " (schememodname lib) - " library, not " (schememodname scheme/base) - " or " (schememodname scheme) + " library, not " (schememodname racket/base) + " or " (schememodname racket) "." . more))] [(_ lib . more) diff --git a/collects/scribblings/reference/namespaces.scrbl b/collects/scribblings/reference/namespaces.scrbl index 313dfcad0b..83ea9d0ad8 100644 --- a/collects/scribblings/reference/namespaces.scrbl +++ b/collects/scribblings/reference/namespaces.scrbl @@ -30,7 +30,7 @@ with @scheme[namespace-attach-module].} @defproc[(make-base-empty-namespace) namespace?]{ -Creates a new empty namespace, but with @schememodname[scheme/base] +Creates a new empty namespace, but with @schememodname[racket/base] attached. The namespace's @tech{base phase} is the same as the @tech{phase} in which the @scheme[make-base-empty-namespace] function was created.} @@ -38,7 +38,7 @@ function was created.} @defproc[(make-base-namespace) namespace?]{ -Creates a new namespace with @schememodname[scheme/base] attached and +Creates a new namespace with @schememodname[racket/base] attached and @scheme[require]d into the top-level environment. The namespace's @tech{base phase} is the same as the @tech{phase} in which the @scheme[make-base-namespace] function was created.} diff --git a/collects/scribblings/reference/networking.scrbl b/collects/scribblings/reference/networking.scrbl index 564bfcd8c3..87cfdcd203 100644 --- a/collects/scribblings/reference/networking.scrbl +++ b/collects/scribblings/reference/networking.scrbl @@ -8,7 +8,7 @@ @;------------------------------------------------------------------------ @section[#:tag "tcp"]{TCP} -@note-lib[scheme/tcp] +@note-lib[racket/tcp] For information about TCP in general, see @italic{TCP/IP Illustrated, Volume 1} by W. Richard Stevens. @@ -257,7 +257,7 @@ port returned by @scheme[tcp-accept], @scheme[tcp-connect], @;------------------------------------------------------------------------ @section[#:tag "udp"]{UDP} -@note-lib[scheme/udp] +@note-lib[racket/udp] For information about UDP in general, see @italic{TCP/IP Illustrated, Volume 1} by W. Richard Stevens. diff --git a/collects/scribblings/reference/numbers.scrbl b/collects/scribblings/reference/numbers.scrbl index 7bb3a20d7a..0498d27caa 100644 --- a/collects/scribblings/reference/numbers.scrbl +++ b/collects/scribblings/reference/numbers.scrbl @@ -1,15 +1,15 @@ #lang scribble/doc @(require "mz.ss" - scheme/math + racket/math scribble/extract - (for-label scheme/math - scheme/flonum - scheme/fixnum - scheme/unsafe/ops - scheme/require)) + (for-label racket/math + racket/flonum + racket/fixnum + racket/unsafe/ops + racket/require)) @(define math-eval (make-base-eval)) -@(interaction-eval #:eval math-eval (require scheme/math)) +@(interaction-eval #:eval math-eval (require racket/math)) @title[#:tag "numbers"]{Numbers} @@ -70,7 +70,7 @@ infinity, or @scheme[+nan.0] if no such limit exists. A @deftech{fixnum} is an exact integer whose two's complement representation fit into 31 bits on a 32-bit platform or 63 bits on a 64-bit platform; furthermore, no allocation is required when computing -with fixnums. See also the @schememodname[scheme/fixnum] module, below. +with fixnums. See also the @schememodname[racket/fixnum] module, below. Two fixnums that are @scheme[=] are also the same according to @scheme[eq?]. Otherwise, the result of @scheme[eq?] @@ -875,9 +875,9 @@ is little-endian.} @; ------------------------------------------------------------------------ @section{Inexact-Real (Flonum) Operations} -@defmodule[scheme/flonum] +@defmodule[racket/flonum] -The @schememodname[scheme/flonum] library provides operations like +The @schememodname[racket/flonum] library provides operations like @scheme[fl+] that consume and produce only real @tech{inexact numbers}, which are also known as @deftech{flonums}. Flonum-specific operations provide can better performance when used consistently, and @@ -953,10 +953,10 @@ so the result is always a @tech{flonum}. A @deftech{flvector} is like a @tech{vector}, but it holds only inexact real numbers. This representation can be more compact, and unsafe operations on @tech{flvector}s (see -@schememodname[scheme/unsafe/ops]) can execute more efficiently than +@schememodname[racket/unsafe/ops]) can execute more efficiently than unsafe operations on @tech{vectors} of inexact reals. -An f64vector as provided by @schememodname[scheme/foreign] stores the +An f64vector as provided by @schememodname[racket/unsafe/ffi] stores the same kinds of values as an @tech{flvector}, but with extra indirections that make f64vectors more convenient for working with foreign libraries. The lack of indirections make unsafe @@ -1005,25 +1005,25 @@ first slot is position @scheme[0], and the last slot is one less than @section{Fixnum Operations} -@defmodule[scheme/fixnum] +@defmodule[racket/fixnum] -The @schememodname[scheme/fixnum] library provides operations like +The @schememodname[racket/fixnum] library provides operations like @scheme[fx+] that consume and produce only fixnums. The operations in this library are meant to be safe versions of unsafe operations like @scheme[unsafe-fx+]. These safe operations are generally no faster than using generic primitives like @scheme[+]. -The expected use of the @schememodname[scheme/fixnum] library is for -code where the @scheme[require] of @schememodname[scheme/fixnum] is +The expected use of the @schememodname[racket/fixnum] library is for +code where the @scheme[require] of @schememodname[racket/fixnum] is replaced with @schemeblock[(require (filtered-in (λ (name) (regexp-replace #rx"unsafe-" name "")) - scheme/unsafe/ops))] + racket/unsafe/ops))] to drop in unsafe versions of the library. Alternately, when encountering crashes with code that uses unsafe fixnum operations, use -the @schememodname[scheme/fixnum] library to help debug the problems. +the @schememodname[racket/fixnum] library to help debug the problems. @deftogether[( @defproc[(fx+ [a fixnum?][b fixnum?]) fixnum?] @@ -1078,7 +1078,7 @@ Safe versions of @scheme[unsafe-fx=], @scheme[unsafe-fx<], @; ------------------------------------------------------------------------ @section{Extra Constants and Functions} -@note-lib[scheme/math] +@note-lib[racket/math] @defthing[pi real]{ diff --git a/collects/scribblings/reference/package.scrbl b/collects/scribblings/reference/package.scrbl index 9b56433a6c..3b8324bd15 100644 --- a/collects/scribblings/reference/package.scrbl +++ b/collects/scribblings/reference/package.scrbl @@ -1,13 +1,13 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/package)) + (for-label racket/package)) @(define pack-eval (make-base-eval)) -@interaction-eval[#:eval pack-eval (require scheme/package)] +@interaction-eval[#:eval pack-eval (require racket/package)] @title[#:tag "package"]{Limiting Scope: @scheme[define-package], @scheme[open-package], ...} -@note-lib-only[scheme/package] +@note-lib-only[racket/package] @deftogether[( @defform[(define-package package-id exports form ...)] @@ -129,7 +129,7 @@ cookies The @scheme[package?], @scheme[package-exported-identifiers], and @scheme[package-original-identifiers] functions are exported -@scheme[for-syntax] by @schememodname[scheme/package]. +@scheme[for-syntax] by @schememodname[racket/package]. The @scheme[package?] predicate returns @scheme[#t] if @scheme[v] is a package value as obtained by @scheme[syntax-local-value] on an diff --git a/collects/scribblings/reference/pairs.scrbl b/collects/scribblings/reference/pairs.scrbl index 8851966cb5..e89b37938d 100644 --- a/collects/scribblings/reference/pairs.scrbl +++ b/collects/scribblings/reference/pairs.scrbl @@ -1,9 +1,9 @@ #lang scribble/doc @(require "mz.ss" scribble/scheme - scheme/generator - scheme/list - (for-syntax scheme/base)) + racket/generator + racket/list + (for-syntax racket/base)) @(define (generate-c_r-example proc) (define (make-it start n) @@ -648,10 +648,10 @@ Like @scheme[assoc], but finds an element using the predicate @; ---------------------------------------- @section{Additional List Functions and Synonyms} -@note-lib[scheme/list] +@note-lib[racket/list] @(define list-eval (make-base-eval)) @(interaction-eval #:eval list-eval - (require scheme/list (only-in scheme/function negate))) + (require racket/list (only-in racket/function negate))) @defthing[empty null?]{The empty list. @mz-examples[#:eval list-eval diff --git a/collects/scribblings/reference/paths.scrbl b/collects/scribblings/reference/paths.scrbl index 3c2f050953..b61a29285b 100644 --- a/collects/scribblings/reference/paths.scrbl +++ b/collects/scribblings/reference/paths.scrbl @@ -256,7 +256,7 @@ Windows examples. (build-path p2 p1) (code:comment @#,t{Unix and Windows: raises @scheme[exn:fail:contract]; @scheme[p1] is absolute}) (build-path p1 p2) - (code:comment @#,t{Unix: is @scheme["/home/joeuser/src/scheme/../../docs/Scheme"]}) + (code:comment @#,t{Unix: is @scheme["/home/joeuser/src/racket/../../docs/Scheme"]}) (code:comment @#,t{Windows: is @scheme["C:\\Joe's Files\\src\\scheme\\..\\..\\docs\\Scheme"]}) ]} @@ -496,7 +496,7 @@ to the end.} @;------------------------------------------------------------------------ @section{More Path Utilities} -@note-lib[scheme/path] +@note-lib[racket/path] @defproc[(explode-path [path (or/c path-string? path-for-some-system?)]) (listof (or/c path-for-some-system? 'up 'same))]{ diff --git a/collects/scribblings/reference/port-lib.scrbl b/collects/scribblings/reference/port-lib.scrbl index 76113cafb2..867cea28d9 100644 --- a/collects/scribblings/reference/port-lib.scrbl +++ b/collects/scribblings/reference/port-lib.scrbl @@ -1,10 +1,10 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/port)) + (for-label racket/port)) @title[#:tag "port-lib"]{More Port Constructors, Procedures, and Events} -@note-lib[scheme/port] +@note-lib[racket/port] @; ---------------------------------------------------------------------- diff --git a/collects/scribblings/reference/pretty-print.scrbl b/collects/scribblings/reference/pretty-print.scrbl index b774eb3ec0..87ccb506e9 100644 --- a/collects/scribblings/reference/pretty-print.scrbl +++ b/collects/scribblings/reference/pretty-print.scrbl @@ -4,7 +4,7 @@ @title[#:tag "pretty-print"]{Pretty Printing} -@note-lib[scheme/pretty] +@note-lib[racket/pretty] @defproc[(pretty-print [v any/c] [port output-port? (current-output-port)]) void?]{ diff --git a/collects/scribblings/reference/procedures.scrbl b/collects/scribblings/reference/procedures.scrbl index ecf93afbf5..45ecd60263 100644 --- a/collects/scribblings/reference/procedures.scrbl +++ b/collects/scribblings/reference/procedures.scrbl @@ -453,7 +453,7 @@ and @scheme[v2], and its result is returned by A @idefterm{primitive procedure} is a built-in procedure that is implemented in low-level language. Not all procedures of -@schememodname[scheme/base] are primitives, but many are. The +@schememodname[racket/base] are primitives, but many are. The distinction is mainly useful to other low-level code. @defproc[(primitive? [v any/c]) boolean?]{ @@ -479,9 +479,9 @@ applied.} @; ---------------------------------------- @section{Additional Procedure Functions} -@note-lib[scheme/function] +@note-lib[racket/function] @(define fun-eval (make-base-eval)) -@(interaction-eval #:eval fun-eval (require scheme/function)) +@(interaction-eval #:eval fun-eval (require racket/function)) @defproc[(const [v any]) procedure?]{ diff --git a/collects/scribblings/reference/promise.scrbl b/collects/scribblings/reference/promise.scrbl index 9864531d29..c71cc43498 100644 --- a/collects/scribblings/reference/promise.scrbl +++ b/collects/scribblings/reference/promise.scrbl @@ -1,10 +1,10 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/promise)) + (for-label racket/promise)) @title{Delayed Evaluation} -@note-lib[scheme/promise] +@note-lib[racket/promise] A @deftech{promise} encapsulates an expression to be evaluated on demand via @scheme[force]. After a promise has been @scheme[force]d, diff --git a/collects/scribblings/reference/reader-example.ss b/collects/scribblings/reference/reader-example.ss index 05be75aa9d..32b96046fe 100644 --- a/collects/scribblings/reference/reader-example.ss +++ b/collects/scribblings/reference/reader-example.ss @@ -1,10 +1,10 @@ -(module reader-example scheme/base +(module reader-example racket/base (require scribble/struct scribble/decode scribble/manual scribble/scheme - scheme/class) + racket/class) (provide reader-examples read-quote-table diff --git a/collects/scribblings/reference/reference.scrbl b/collects/scribblings/reference/reference.scrbl index 8413d4971a..b59d76cb47 100644 --- a/collects/scribblings/reference/reference.scrbl +++ b/collects/scribblings/reference/reference.scrbl @@ -4,7 +4,7 @@ scribble/html-properties scribble/latex-properties scribble/core - scheme/list) + racket/list) @(define (scheme-extra-libs) (make-delayed-element @@ -25,16 +25,16 @@ (make-css-addition "extras.css") (make-tex-addition "extras.tex")))) -@title[#:style (extras)]{@bold{Reference}: PLT Scheme} +@title[#:style (extras)]{@bold{Reference}: Racket} @author["Matthew Flatt" "PLT"] -This manual defines the core PLT Scheme language and describes its +This manual defines the core Racket language and describes its most prominent libraries. The companion manual @|Guide| provides a friendlier (though less precise and less complete) overview of the language. -@defmodulelang*[(scheme/base scheme) +@defmodulelang*[(racket/base racket) ;; Use sources for overlap with `mzscheme': #:use-sources ('#%kernel racket/private/more-scheme @@ -44,14 +44,15 @@ language. racket/private/letstx-scheme racket/private/define racket/private/stx - racket/private/map)]{ + racket/private/map + racket/private/base)]{ Unless otherwise noted, the bindings defined in this manual are -exported by the @schememodname[scheme/base] and @schememodname[scheme] +exported by the @schememodname[racket/base] and @schememodname[racket] languages.} -@margin-note{The @schememodname[scheme] library combines -@schememodname[scheme/base]@scheme-extra-libs[].} +@margin-note{The @schememodname[racket] library combines +@schememodname[racket/base]@scheme-extra-libs[].} @table-of-contents[] diff --git a/collects/scribblings/reference/sandbox.scrbl b/collects/scribblings/reference/sandbox.scrbl index 7148aea2e2..9db038dbdc 100644 --- a/collects/scribblings/reference/sandbox.scrbl +++ b/collects/scribblings/reference/sandbox.scrbl @@ -2,9 +2,9 @@ @(require "mz.ss" scheme/sandbox (for-label scheme/sandbox - scheme/port - (only-in scheme/gui make-gui-namespace) - scheme/gui/dynamic)) + racket/port + (only-in racket/gui make-gui-namespace) + racket/gui/dynamic)) @(define box-eval (make-base-eval)) @(interaction-eval #:eval box-eval (require scheme/sandbox)) @@ -138,9 +138,9 @@ top-level namespace: #:eval box-eval (define base-module-eval (code:comment @#,t{a module cannot have free variables...}) - (make-evaluator 'scheme/base '(define (f) later))) + (make-evaluator 'racket/base '(define (f) later))) (define base-module-eval - (make-evaluator 'scheme/base '(define (f) later) + (make-evaluator 'racket/base '(define (f) later) '(define later 5))) (base-module-eval '(f)) @@ -163,7 +163,7 @@ restriction is enforced). @schemeblock[ (define base-module-eval2 (code:comment @#,t{equivalent to @scheme[base-module-eval]:}) - (make-module-evaluator '(module m scheme/base + (make-module-evaluator '(module m racket/base (define (f) later) (define later 5)))) ] @@ -201,7 +201,7 @@ calls to a single evaluator. Usually this is not a problem, but in some cases you can get the evaluator function available inside the sandboxed code, for example: @schemeblock[ -(let ([e (make-evaluator 'scheme/base)]) +(let ([e (make-evaluator 'racket/base)]) (e (,e 1))) ] An error will be signalled in such cases. @@ -220,7 +220,7 @@ that you can easily start a sandboxed read-eval-print-loop. For example, here is a quick implementation of a networked REPL: @schemeblock[ -(define e (make-evaluator 'scheme/base)) +(define e (make-evaluator 'racket/base)) (let-values ([(i o) (tcp-accept (tcp-listen 9999))]) (parameterize ([current-input-port i] [current-output-port o] @@ -250,7 +250,7 @@ used from a module (by using a new namespace): [sandbox-error-output o] [current-namespace (make-empty-namespace)]) (parameterize ([current-eval - (make-evaluator 'scheme/base)]) + (make-evaluator 'racket/base)]) (read-eval-print-loop)) (fprintf o "\nBye...\n") (close-output-port o))) @@ -571,7 +571,7 @@ with the per-expression limit specified by sandbox, as well as from the interaction will count against the sandbox limit. For example, in the last interaction of this code, @schemeblock[ - (define e (make-evaluator 'scheme/base)) + (define e (make-evaluator 'racket/base)) (e '(define a 1)) (e '(for ([i (in-range 20)]) (set! a (cons (make-bytes 500000) a)))) ] @@ -598,11 +598,11 @@ per-evaluation limits (useful in case more limit kinds are available in future versions). The default is @scheme[(list 30 20)]. Note that these limits apply to the creation of the sandbox -environment too --- even @scheme[(make-evaluator 'scheme/base)] can +environment too --- even @scheme[(make-evaluator 'racket/base)] can fail if the limits are strict enough. For example, @schemeblock[ (parameterize ([sandbox-eval-limits '(0.25 5)]) - (make-evaluator 'scheme/base '(sleep 2))) + (make-evaluator 'racket/base '(sleep 2))) ] will throw an error instead of creating an evaluator. Therefore, to avoid surprises you need to catch errors that happen when the sandbox @@ -878,7 +878,7 @@ your own permissions, for example, @defthing[gui? boolean?]{ -True if the @schememodname[scheme/gui] module can be used, @scheme[#f] +True if the @schememodname[racket/gui] module can be used, @scheme[#f] otherwise; see @scheme[gui-available?]. Various aspects of the @schememodname[scheme/sandbox] library change diff --git a/collects/scribblings/reference/sequences.scrbl b/collects/scribblings/reference/sequences.scrbl index f3bd9ced66..5a97e8fb84 100644 --- a/collects/scribblings/reference/sequences.scrbl +++ b/collects/scribblings/reference/sequences.scrbl @@ -1,13 +1,13 @@ #lang scribble/doc @(require "mz.ss" - (for-syntax scheme/base) + (for-syntax racket/base) scribble/scheme - (for-label scheme/generator)) + (for-label racket/generator)) @(define generator-eval (lambda () (let ([the-eval (make-base-eval)]) - (the-eval '(require scheme/generator)) + (the-eval '(require racket/generator)) the-eval))) @(define (info-on-seq where what) @@ -324,7 +324,7 @@ sequence; if no more elements are available, the @exnraise[exn:fail:contract].} @section{Iterator Generators} -@defmodule[scheme/generator] +@defmodule[racket/generator] @defform[(generator () body ...)]{ Creates a function that returns a value through @scheme[yield], each time it is invoked. When the generator runs out of values to yield, the last value it computed diff --git a/collects/scribblings/reference/serialization.scrbl b/collects/scribblings/reference/serialization.scrbl index 1361df1d72..e1e32b8944 100644 --- a/collects/scribblings/reference/serialization.scrbl +++ b/collects/scribblings/reference/serialization.scrbl @@ -1,14 +1,14 @@ #lang scribble/doc @(require "mz.ss" - scheme/serialize - (for-label scheme/serialize)) + racket/serialize + (for-label racket/serialize)) @(define ser-eval (make-base-eval)) -@(interaction-eval #:eval ser-eval (require scheme/serialize)) +@(interaction-eval #:eval ser-eval (require racket/serialize)) @title[#:tag "serialization"]{Serialization} -@note-lib-only[scheme/serialize #:use-sources (racket/private/serialize)] +@note-lib-only[racket/serialize #:use-sources (racket/private/serialize)] @defproc[(serializable? [v any/c]) boolean?]{ diff --git a/collects/scribblings/reference/sets.scrbl b/collects/scribblings/reference/sets.scrbl index 88e3b1cb99..2069cf3ca7 100644 --- a/collects/scribblings/reference/sets.scrbl +++ b/collects/scribblings/reference/sets.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/set)) + (for-label racket/set)) @title[#:tag "sets"]{Sets} @@ -16,7 +16,7 @@ unpredictable in much the same way that @tech{hash table} operations are unpredictable when keys are mutated. -@note-lib-only[scheme/set] +@note-lib[racket/set] @defproc[(set? [v any/c]) boolean?]{ diff --git a/collects/scribblings/reference/shared.scrbl b/collects/scribblings/reference/shared.scrbl index 32c00b3e05..24c98641dc 100644 --- a/collects/scribblings/reference/shared.scrbl +++ b/collects/scribblings/reference/shared.scrbl @@ -1,12 +1,12 @@ #lang scribble/doc @(require "mz.ss" scribble/struct - scheme/shared - (for-label scheme/shared)) + racket/shared + (for-label racket/shared)) @(define shared-eval (make-base-eval)) -@(interaction-eval #:eval shared-eval (require scheme/shared)) +@(interaction-eval #:eval shared-eval (require racket/shared)) @(define maker (make-element #f (list @@ -20,7 +20,7 @@ @title[#:tag "shared"]{Constructing Graphs: @scheme[shared]} -@note-lib[scheme/shared] +@note-lib[racket/shared] @defform[(shared ([id expr] ...) body ...+)]{ diff --git a/collects/scribblings/reference/splicing.scrbl b/collects/scribblings/reference/splicing.scrbl index 24ada5054b..491619e6dd 100644 --- a/collects/scribblings/reference/splicing.scrbl +++ b/collects/scribblings/reference/splicing.scrbl @@ -1,17 +1,17 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/splicing - scheme/stxparam - scheme/local)) + (for-label racket/splicing + racket/stxparam + racket/local)) @(define splice-eval (make-base-eval)) -@interaction-eval[#:eval splice-eval (require scheme/splicing - scheme/stxparam - (for-syntax scheme/base))] +@interaction-eval[#:eval splice-eval (require racket/splicing + racket/stxparam + (for-syntax racket/base))] @title[#:tag "splicing"]{Local Binding with Splicing Body} -@note-lib-only[scheme/splicing] +@note-lib-only[racket/splicing] @deftogether[( @defidform[splicing-let] diff --git a/collects/scribblings/reference/startup.scrbl b/collects/scribblings/reference/startup.scrbl index 5253636d7b..b4c0091186 100644 --- a/collects/scribblings/reference/startup.scrbl +++ b/collects/scribblings/reference/startup.scrbl @@ -1,8 +1,8 @@ #lang scribble/doc @(require "mz.ss" scribble/bnf - (for-label scheme/pretty - scheme/gui/base)) + (for-label racket/pretty + racket/gui/base)) @(define (FlagFirst n) (as-index (Flag n))) @(define (DFlagFirst n) (as-index (DFlag n))) @@ -21,13 +21,13 @@ The core PLT Scheme run-time system is available in two main variants: @itemize[ @item{MzScheme, which provides the primitives libraries on which - @schememodname[scheme/base] is implemented. Under Unix and Mac + @schememodname[racket/base] is implemented. Under Unix and Mac OS X, the executable is called @as-index{@exec{mzscheme}}. Under Windows, the executable is called @as-index{@exec{MzScheme.exe}}.} @item{MrEd, which extends @exec{mzscheme} with GUI primitives on - which @schememodname[scheme/gui/base] is implemented. Under + which @schememodname[racket/gui/base] is implemented. Under Unix, the executable is called @as-index{@exec{mred}}. Under Windows, the executable is called @as-index{@exec{MrEd.exe}}. Under Mac OS X, the @exec{mred} @@ -44,8 +44,8 @@ On startup, the top-level environment contains no bindings---not even that start with @schemeidfont{#%} are defined, but they are not meant for direct use, and the set of such modules can change. For example, the @indexed-scheme['#%kernel] module is eventually used to bootstrap -the implemetation of @schememodname[scheme/base], and -@scheme['#%mred-kernel] is used for @schememodname[scheme/gui/base]. +the implemetation of @schememodname[racket/base], and +@scheme['#%mred-kernel] is used for @schememodname[racket/gui/base]. The first action of MzScheme or MrEd is to initialize @scheme[current-library-collection-paths] to the result of @@ -55,8 +55,8 @@ are extra directory paths provided in order in the command line with @Flag{S}/@DFlag{search}. An executable created from the MzScheme or MrEd executable can embed paths used as @scheme[_pre-extras]. -MzScheme and MrEd next @scheme[require] @schememodname[scheme/init] -and @schememodname[scheme/gui/init], respectively, but only if the +MzScheme and MrEd next @scheme[require] @schememodname[racket/init] +and @schememodname[racket/gui/init], respectively, but only if the command line does not specify a @scheme[require] flag (@Flag{t}/@DFlag{require}, @Flag{l}/@DFlag{lib}, or @Flag{u}/@DFlag{require-script}) before any @scheme[eval], @@ -199,8 +199,8 @@ flags: instead of @scheme[graphical-read-eval-print-loop].} @item{@FlagFirst{n} or @DFlagFirst{no-lib} : Skips requiring the - initialization library (i.e., @schememodname[scheme/init] or - @schememodname[scheme/gui/init], unless it is changed with the + initialization library (i.e., @schememodname[racket/init] or + @schememodname[racket/gui/init], unless it is changed with the @Flag{I} flag) when not otherwise disabled.} @item{@FlagFirst{v} or @DFlagFirst{version} : Shows @@ -399,7 +399,7 @@ language specifies run-time configuration by ] -The @schememodname[scheme/base] and @schememodname[scheme] languages +The @schememodname[racket/base] and @schememodname[scheme] languages do not currently specify a run-time configuration action. A @scheme['configure-runtime] query returns a list of vectors, instead diff --git a/collects/scribblings/reference/strings.scrbl b/collects/scribblings/reference/strings.scrbl index 020caddb3c..54e082caf8 100644 --- a/collects/scribblings/reference/strings.scrbl +++ b/collects/scribblings/reference/strings.scrbl @@ -364,9 +364,9 @@ allocated string).} @; ---------------------------------------- @section{Additional String Functions} -@note-lib[scheme/string] +@note-lib[racket/string] @(define string-eval (make-base-eval)) -@(interaction-eval #:eval string-eval (require scheme/string scheme/list)) +@(interaction-eval #:eval string-eval (require racket/string racket/list)) @defproc[(string-append* [str string?] ... [strs (listof string?)]) string?]{ @; Note: this is exactly the same description as the one for append* diff --git a/collects/scribblings/reference/struct.scrbl b/collects/scribblings/reference/struct.scrbl index 87dd20b8e6..b5dc9e4a06 100644 --- a/collects/scribblings/reference/struct.scrbl +++ b/collects/scribblings/reference/struct.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/struct-info)) + (for-label racket/struct-info)) @(define struct-eval (make-base-eval)) @@ -628,7 +628,7 @@ imported structure type, in which case the user is expected to know the set of fields that are listed in the signature for the structure type. -@note-lib-only[scheme/struct-info] +@note-lib-only[racket/struct-info] @defproc[(struct-info? [v any/c]) boolean?]{ diff --git a/collects/scribblings/reference/stx-param.scrbl b/collects/scribblings/reference/stx-param.scrbl index 638b3475d7..c0abf2d276 100644 --- a/collects/scribblings/reference/stx-param.scrbl +++ b/collects/scribblings/reference/stx-param.scrbl @@ -1,12 +1,12 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/stxparam - scheme/stxparam-exptime - scheme/splicing)) + (for-label racket/stxparam + racket/stxparam-exptime + racket/splicing)) @title[#:tag "stxparam"]{Syntax Parameters} -@note-lib-only[scheme/stxparam] +@note-lib-only[racket/stxparam] @defform[(define-syntax-parameter id expr)]{ @@ -49,9 +49,9 @@ the target's value.} @section{Syntax Parameter Inspection} -@defmodule*/no-declare[(scheme/stxparam-exptime)] +@defmodule*/no-declare[(racket/stxparam-exptime)] -@declare-exporting[scheme/stxparam-exptime scheme/stxparam] +@declare-exporting[racket/stxparam-exptime racket/stxparam] @defproc[(syntax-parameter-value [id-stx syntax?]) any]{ @@ -62,9 +62,9 @@ value of the @tech{syntax parameter}, as adjusted by @scheme[syntax-parameterize] form. This binding is provided @scheme[for-syntax] by -@schememodname[scheme/stxparam], since it is normally used in a +@schememodname[racket/stxparam], since it is normally used in a transformer. It is provided normally by -@schememodname[scheme/stxparam-exptime].} +@schememodname[racket/stxparam-exptime].} @defproc[(make-parameter-rename-transformer [id-stx syntax?]) any]{ @@ -87,6 +87,6 @@ treated specially by @scheme[syntax-local-value], unlike the result of @scheme[make-rename-transformer]. This binding is provided @scheme[for-syntax] by -@schememodname[scheme/stxparam], since it is normally used in a +@schememodname[racket/stxparam], since it is normally used in a transformer. It is provided normally by -@schememodname[scheme/stxparam-exptime].} +@schememodname[racket/stxparam-exptime].} diff --git a/collects/scribblings/reference/stx-patterns.scrbl b/collects/scribblings/reference/stx-patterns.scrbl index e646968916..47258e99ff 100644 --- a/collects/scribblings/reference/stx-patterns.scrbl +++ b/collects/scribblings/reference/stx-patterns.scrbl @@ -6,7 +6,7 @@ @(define syntax-eval (lambda () (let ([the-eval (make-base-eval)]) - (the-eval '(require (for-syntax scheme/base))) + (the-eval '(require (for-syntax racket/base))) the-eval))) @title[#:tag "stx-patterns"]{Pattern-Based Syntax Matching} @@ -80,9 +80,9 @@ A syntax object matches a @scheme[pattern] as follows: @specsubform[(pattern ...+ . pattern)]{ - The last @scheme[pattern] must not be a @scheme/form[(pattern ...)], - @scheme/form[(pattern ...+ . pattern)], @scheme/form[(pattern ... pattern - ellipses pattern ...)], or @scheme/form[(pattern ... pattern ellipses + The last @scheme[pattern] must not be a @racket/form[(pattern ...)], + @racket/form[(pattern ...+ . pattern)], @racket/form[(pattern ... pattern + ellipses pattern ...)], or @racket/form[(pattern ... pattern ellipses pattern ... . pattern)] form. Like the previous kind of pattern, but matches syntax objects that @@ -155,7 +155,7 @@ A syntax object matches a @scheme[pattern] as follows: @scheme[const].} @mz-examples[ -(require (for-syntax scheme/base)) +(require (for-syntax racket/base)) (define-syntax (swap stx) (syntax-case stx () [(_ a b) #'(let ([t a]) @@ -490,4 +490,4 @@ get the identifier's transformer value, and then test the value with @scheme[syntax-pattern-variable?]. The @scheme[syntax-pattern-variable?] procedure is provided -@scheme[for-syntax] by @schememodname[scheme/base].} +@scheme[for-syntax] by @schememodname[racket/base].} diff --git a/collects/scribblings/reference/stx-trans.scrbl b/collects/scribblings/reference/stx-trans.scrbl index d27fc01054..7cbb15fdd4 100644 --- a/collects/scribblings/reference/stx-trans.scrbl +++ b/collects/scribblings/reference/stx-trans.scrbl @@ -1,13 +1,13 @@ #lang scribble/doc @(require (except-in "mz.ss" import export) - (for-syntax scheme/base) - (for-label scheme/require-transform - scheme/require-syntax - scheme/provide-transform - scheme/provide-syntax)) + (for-syntax racket/base) + (for-label racket/require-transform + racket/require-syntax + racket/provide-transform + racket/provide-syntax)) @(define stx-eval (make-base-eval)) -@(interaction-eval #:eval stx-eval (require (for-syntax scheme/base))) +@(interaction-eval #:eval stx-eval (require (for-syntax racket/base))) @(define (transform-time) @t{This procedure must be called during the dynamic extent of a @tech{syntax transformer} application by the @@ -766,7 +766,7 @@ identifier.} @section[#:tag "require-trans"]{@scheme[require] Transformers} -@note-lib-only[scheme/require-transform] +@note-lib-only[racket/require-transform] A @tech{transformer binding} whose value is a structure with the @scheme[prop:require-transformer] property implements a derived @@ -890,7 +890,7 @@ necessary to expand it.} @section[#:tag "provide-trans"]{@scheme[provide] Transformers} -@note-lib-only[scheme/provide-transform] +@note-lib-only[racket/provide-transform] A @tech{transformer binding} whose value is a structure with the @scheme[prop:provide-transformer] property implements a derived diff --git a/collects/scribblings/reference/subprocess.scrbl b/collects/scribblings/reference/subprocess.scrbl index 8de58c04b5..b8b083ad3e 100644 --- a/collects/scribblings/reference/subprocess.scrbl +++ b/collects/scribblings/reference/subprocess.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/system)) + (for-label racket/system)) @title[#:tag "subprocess"]{Processes} @@ -26,7 +26,7 @@ Creates a new process in the underlying operating system to execute @scheme[command] asynchronously. See also @scheme[system] and -@scheme[process] from @schememodname[scheme/system]. +@scheme[process] from @schememodname[racket/system]. The @scheme[command] argument is a path to a program executable, and the @scheme[arg]s are command-line arguments for the program. Under @@ -226,7 +226,7 @@ real process ID). @section{Simple Subprocesses} -@note-lib-only[scheme/system] +@note-lib-only[racket/system] @defproc[(system [command string?]) boolean?]{ diff --git a/collects/scribblings/reference/surrogate.scrbl b/collects/scribblings/reference/surrogate.scrbl index bc57f9fd16..5c6a664b29 100644 --- a/collects/scribblings/reference/surrogate.scrbl +++ b/collects/scribblings/reference/surrogate.scrbl @@ -1,13 +1,13 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/surrogate - scheme/class)) + (for-label racket/surrogate + racket/class)) @title{Surrogates} -@note-lib-only[scheme/surrogate] +@note-lib-only[racket/surrogate] -The @schememodname[scheme/surrogate] library provides an abstraction +The @schememodname[racket/surrogate] library provides an abstraction for building an instance of the @deftech{proxy design pattern}. The pattern consists of two objects, a @defterm{host} and a @defterm{surrogate} object. The host object delegates method calls to diff --git a/collects/scribblings/reference/syntax-model.scrbl b/collects/scribblings/reference/syntax-model.scrbl index 8db0e3534e..ed9f3a481d 100644 --- a/collects/scribblings/reference/syntax-model.scrbl +++ b/collects/scribblings/reference/syntax-model.scrbl @@ -4,7 +4,7 @@ "mz.ss") @(define scheme-eval (make-base-eval)) -@(interaction-eval #:eval scheme-eval (require (for-syntax scheme/base))) +@(interaction-eval #:eval scheme-eval (require (for-syntax racket/base))) @;------------------------------------------------------------------------ @title[#:tag "syntax-model"]{Syntax Model} @@ -117,7 +117,7 @@ other information. For example, a @schemeidfont{car} @tech{identifier} might have @tech{lexical information} that designates it as the @scheme[car] from -the @schememodname[scheme/base] language (i.e., the built-in +the @schememodname[racket/base] language (i.e., the built-in @scheme[car]). Similarly, a @schemeidfont{lambda} identifier's @tech{lexical information} may indicate that it represents a procedure form. Some other @tech{identifier}'s @tech{lexical information} may @@ -239,7 +239,7 @@ is significant. For example, the second case for @scheme[_expr] is a @tech{syntax-object} list whose first element is an @tech{identifier}, where the @tech{identifier}'s @tech{lexical information} specifies a binding to the @scheme[#%plain-lambda] of the -@schememodname[scheme/base] language (i.e., the @tech{identifier} is +@schememodname[racket/base] language (i.e., the @tech{identifier} is @scheme[free-identifier=?] to one whose binding is @scheme[#%plain-lambda]). In all cases, identifiers above typeset as syntactic-form names refer to the bindings defined in diff --git a/collects/scribblings/reference/syntax.scrbl b/collects/scribblings/reference/syntax.scrbl index 94f3afeb8c..a9b7326484 100644 --- a/collects/scribblings/reference/syntax.scrbl +++ b/collects/scribblings/reference/syntax.scrbl @@ -1,24 +1,24 @@ #lang scribble/doc @(require "mz.ss" scribble/bnf - (for-label (only-in scheme/require-transform + (for-label (only-in racket/require-transform make-require-transformer) - scheme/require-syntax - scheme/require - (only-in scheme/provide-transform + racket/require-syntax + racket/require + (only-in racket/provide-transform make-provide-transformer) - scheme/provide-syntax - scheme/provide - scheme/nest - scheme/package - scheme/splicing - scheme/runtime-path)) + racket/provide-syntax + racket/provide + racket/nest + racket/package + racket/splicing + racket/runtime-path)) @(define require-eval (make-base-eval)) @(define syntax-eval (lambda () (let ([the-eval (make-base-eval)]) - (the-eval '(require (for-syntax scheme/base))) + (the-eval '(require (for-syntax racket/base))) the-eval))) @(define meta-in-eval (syntax-eval)) @@ -208,7 +208,7 @@ be preserved in marshaled bytecode. See also See also @secref["module-eval-model"] and @secref["mod-parse"]. @defexamples[#:eval (syntax-eval) -(module duck scheme/base +(module duck racket/base (provide num-eggs quack) (define num-eggs 2) (define (quack n) @@ -222,7 +222,7 @@ See also @secref["module-eval-model"] and @secref["mod-parse"]. Legal only in a @tech{module begin context}, and handled by the @scheme[module] form. -The @scheme[#%module-begin] form of @schememodname[scheme/base] wraps +The @scheme[#%module-begin] form of @schememodname[racket/base] wraps every top-level expression to print non-@|void-const| results using @scheme[current-print].} @@ -297,7 +297,7 @@ The syntax of @scheme[require-spec] can be extended via @scheme[require-spec]s are specified in a @scheme[require], the bindings of each @scheme[require-spec] are visible for expanding later @scheme[require-spec]s. The pre-defined forms (as exported by -@scheme[scheme/base]) are as follows: +@scheme[racket/base]) are as follows: @specsubform[module-path]{ Imports all exported bindings from the named module, using the export identifiers as the local identifiers. @@ -314,7 +314,7 @@ bindings of each @scheme[require-spec] are visible for expanding later error is reported. @defexamples[#:eval (syntax-eval) - (require (only-in scheme/tcp + (require (only-in racket/tcp tcp-listen (tcp-accept my-accept))) tcp-listen @@ -329,7 +329,7 @@ bindings of each @scheme[require-spec] are visible for expanding later reported. @defexamples[#:eval (syntax-eval) - (require (except-in scheme/tcp + (require (except-in racket/tcp tcp-listen)) tcp-accept tcp-listen @@ -342,7 +342,7 @@ bindings of each @scheme[require-spec] are visible for expanding later identifiers before prefixing. @defexamples[#:eval (syntax-eval) - (require (prefix-in tcp: scheme/tcp)) + (require (prefix-in tcp: racket/tcp)) tcp:tcp-accept tcp:tcp-listen ]} @@ -354,7 +354,7 @@ bindings of each @scheme[require-spec] are visible for expanding later describes, a syntax error is reported. @defexamples[#:eval (syntax-eval) - (require (rename-in scheme/tcp + (require (rename-in racket/tcp (tcp-accept accept) (tcp-listen listen))) accept @@ -365,8 +365,8 @@ bindings of each @scheme[require-spec] are visible for expanding later The union of the @scheme[require-spec]s. @defexamples[#:eval (syntax-eval) - (require (combine-in (only-in scheme/tcp tcp-accept) - (only-in scheme/tcp tcp-listen))) + (require (combine-in (only-in racket/tcp tcp-accept) + (only-in racket/tcp tcp-listen))) tcp-accept tcp-listen ]} @@ -563,7 +563,7 @@ corresponds to the default @tech{module name resolver}. @scheme[_rel-string], @scheme[id] must not contain @litchar{.}. @examples[#:eval require-eval - (eval:alts (require scheme/tcp) (void))]} + (eval:alts (require racket/tcp) (void))]} @defsubform[(file string)]{Similar to the plain @scheme[rel-string] case, but @scheme[string] is a path---possibly absolute---using the @@ -878,7 +878,7 @@ follows. (module nest2 scheme (define-for-syntax eggs 2) (provide (for-syntax eggs))) - (require (for-meta 2 scheme/base) + (require (for-meta 2 racket/base) (for-syntax 'nest2)) (define-syntax (test stx) (define-syntax (show-eggs stx) @@ -1023,7 +1023,7 @@ context of the @scheme[phaseless-spec] form.} @subsection{Additional @scheme[require] Forms} -@note-lib-only[scheme/require] +@note-lib-only[racket/require] The following forms support more complex selection and manipulation of sets of imported identifiers. @@ -1034,7 +1034,7 @@ sets of imported identifiers. expression (see @secref["regexp"]). @defexamples[#:eval (syntax-eval) -(module zoo scheme/base +(module zoo racket/base (provide tunafish swordfish blowfish monkey lizard ant) (define tunafish 1) @@ -1043,7 +1043,7 @@ sets of imported identifiers. (define monkey 4) (define lizard 5) (define ant 6)) -(require scheme/require) +(require racket/require) (require (matching-identifiers-in #rx"\\w*fish" 'zoo)) tunafish swordfish @@ -1071,7 +1071,7 @@ monkey (provide (all-from-out 'earth) (all-from-out 'mars))) -(require scheme/require) +(require racket/require) (require (subtract-in 'solar-system 'earth)) land aliens @@ -1092,8 +1092,8 @@ aliens (and (regexp-match? #rx"^[a-z-]+$" name) (regexp-replace #rx"-" (string-titlecase name) ""))) - scheme/base))] - will get the @scheme[scheme/base] bindings that match the regexp, + racket/base))] + will get the @scheme[racket/base] bindings that match the regexp, and renamed to use ``camel case.''} @defform[(path-up rel-string ...)]{ @@ -1111,16 +1111,16 @@ This form is useful in setting up a ``project environment''. For example, you can write a @filepath{config.ss} file in the root directory of your project with: @schememod[ - scheme/base - (require scheme/require-syntax (for-syntax "utils/in-here.ss")) + racket/base + (require racket/require-syntax (for-syntax "utils/in-here.ss")) ;; require form for my utilities (provide utils-in) (define-require-syntax utils-in in-here-transformer) ] and in @filepath{utils/in-here.ss} in the root: @schememod[ - scheme/base - (require scheme/runtime-path) + racket/base + (require racket/runtime-path) (provide in-here-transformer) (define-runtime-path here ".") (define (in-here-transformer stx) @@ -1132,14 +1132,14 @@ and in @filepath{utils/in-here.ss} in the root: ] Finally, you can use it via @scheme[path-up]: @schemeblock[ - (require scheme/require (path-up "config.ss") (utils-in foo))] + (require racket/require (path-up "config.ss") (utils-in foo))] Note that the order of requires in this form is important, as each of the first two bind the identifier used in the following. An alternative in this scenario is to use @scheme[path-up] directly to get to the utility module: @schemeblock[ - (require scheme/require (path-up "utils/foo.ss"))] + (require racket/require (path-up "utils/foo.ss"))] but then you need to be careful with subdirectories that are called @filepath{utils}, which will override the one in the project's root. In other words, the previous method requires a single unique name.} @@ -1148,7 +1148,7 @@ In other words, the previous method requires a single unique name.} @subsection{Additional @scheme[provide] Forms} -@note-lib-only[scheme/provide] +@note-lib-only[racket/provide] @defform[(matching-identifiers-out regexp provide-spec)]{ Like @scheme[provide-spec], but including only exports of bindings with @@ -1694,7 +1694,7 @@ See also @scheme[local], which supports local bindings with @;------------------------------------------------------------------------ @section[#:tag "local"]{Local Definitions: @scheme[local]} -@note-lib[scheme/local] +@note-lib[racket/local] @defform[(local [definition ...] body ...+)]{ @@ -2073,7 +2073,7 @@ bound (at @tech{phase level} 1).} @subsection[#:tag "require-syntax"]{@scheme[require] Macros} -@note-lib-only[scheme/require-syntax] +@note-lib-only[racket/require-syntax] @defform*[[(define-require-syntax id expr) (define-require-syntax (id args ...) body ...+)]]{ @@ -2095,7 +2095,7 @@ expands to a definition of the first form where the @scheme[expr] is a @subsection[#:tag "provide-syntax"]{@scheme[provide] Macros} -@note-lib-only[scheme/provide-syntax] +@note-lib-only[racket/provide-syntax] @defform*[[(define-provide-syntax id expr) (define-provide-syntax (id args ...) body ...+)]]{ @@ -2420,7 +2420,7 @@ provides a hook to control interactive evaluation through @;------------------------------------------------------------------------ @section[#:tag "nest"]{Flattening Syntactic Sequences: @scheme[nest]} -@note-lib[scheme/nest] +@note-lib[racket/nest] @defform[(nest ([datum ...+] ...) body ...+)]{ diff --git a/collects/scribblings/reference/time.scrbl b/collects/scribblings/reference/time.scrbl index 9e7694df2b..83434579e5 100644 --- a/collects/scribblings/reference/time.scrbl +++ b/collects/scribblings/reference/time.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/date)) + (for-label racket/date)) @title[#:tag "time"]{Time} @@ -54,7 +54,7 @@ sensitive to the value of the @envvar{TZ} environment variable, especially on Unix platforms; consult the system documentation (usually under @tt{tzset}) for details. -See also the @schememodname[scheme/date] library.} +See also the @schememodname[racket/date] library.} @defproc[(current-milliseconds) exact-integer?]{ @@ -123,7 +123,7 @@ result is the result of @scheme[expr].} @section[#:tag "date-string"]{Date Utilities} -@note-lib-only[scheme/date] +@note-lib-only[racket/date] @defproc[(date->string [date date?][time? any/c #f]) string?]{ diff --git a/collects/scribblings/reference/units.scrbl b/collects/scribblings/reference/units.scrbl index 0a893ac303..c20c0ac3c9 100644 --- a/collects/scribblings/reference/units.scrbl +++ b/collects/scribblings/reference/units.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc -@(require (except-in "mz.ss" link) - (for-label scheme/unit-exptime)) +@(require "mz.ss" + (for-label racket/unit-exptime)) @(define-syntax defkeywords (syntax-rules (*) @@ -29,8 +29,8 @@ Units with suitably matching signatures can be @deftech{linked} together to form a larger unit, and a unit with no imports can be @deftech{invoked} to execute its body. -@note-lib[scheme/unit #:use-sources (mzlib/unit)]{ The -@schememodname[scheme/unit] module name can be used as a language name +@note-lib[racket/unit #:use-sources (mzlib/unit)]{ The +@schememodname[racket/unit] module name can be used as a language name with @schemefont{#lang}; see @secref["single-unit"].} @local-table-of-contents[] @@ -167,7 +167,15 @@ the corresponding import. Each @scheme[tagged-sig-id] in an (define-values-for-export (id ...) expr) (contracted [id contract] ...) (open sig-spec) - (sig-form-id . datum)])]{ + (struct id (field ...) struct-option ...) + (sig-form-id . datum)] + + [field id + [id #:mutable]] + [srtuct-option #:mutable + #:omit-constructor + #:omit-define-syntaxes + #:omit-define-values])]{ Binds an identifier to a signature that specifies a group of bindings for import or export: @@ -211,10 +219,15 @@ of bindings for import or export: @item{Each @scheme[(open sig-spec)] adds to the signature everything specified by @scheme[sig-spec].} + @item{Each @scheme[(struct id (field ...) struct-option ...)] adds + all of the identifiers that would be bound by @scheme[(struct id + (field ...) field-option ...)], where the extra option + @scheme[#:omit-constructor] omits the @scheme[id] identifier.} + @item{Each @scheme[(sig-form-id . datum)] extends the signature in a way that is defined by @scheme[sig-form-id], which must be bound by @scheme[define-signature-form]. One such binding is for - @scheme[struct].} + @scheme[struct/ctc].} ] @@ -641,30 +654,14 @@ declarations; @scheme[define-signature] has no splicing @scheme[begin] form.)} @defform/subs[ -(struct id (field ...) option ...) +(struct/ctc id ([field contract-expr] ...) struct-option ...) ([field id [id #:mutable]] - [option #:mutable - #:omit-constructor - #:omit-define-syntaxes - #:omit-define-values])]{ - -For use with @scheme[define-signature]. The expansion of a -@scheme[struct] signature form includes all of the identifiers that -would be bound by @scheme[(define-struct id (field ...) option ...)], -where the extra option @scheme[#:omit-constructor] omits the -@schemeidfont{make-}@scheme[id] identifier.} - -@defform/subs[ -(struct/ctc id ([field contract-expr] ...) option ...) - -([field id - [id #:mutable]] - [option #:mutable - #:omit-constructor - #:omit-define-syntaxes - #:omit-define-values])]{ + [struct-option #:mutable + #:omit-constructor + #:omit-define-syntaxes + #:omit-define-values])]{ For use with @scheme[define-signature]. The @scheme[struct/ctc] form works similarly to @scheme[struct], but the constructor, predicate, field @@ -724,7 +721,7 @@ contract. The unit name is used for the positive blame of the contract.} @section[#:tag "single-unit"]{Single-Unit Modules} -When @schememodname[scheme/unit] is used as a language name with +When @schememodname[racket/unit] is used as a language name with @schemefont{#lang}, the module body is treated as a unit body. The body must match the following @scheme[_module-body] grammar: @@ -756,7 +753,7 @@ suffix). If the module name ends in @schemeidfont{-unit}, then @section{Single-Signature Modules} -@defmodulelang[scheme/signature]{The @schememodname[scheme/signature] +@defmodulelang[racket/signature]{The @schememodname[racket/signature] language treats a module body as a unit signature.} The body must match the following @scheme[_module-body] grammar: @@ -767,8 +764,8 @@ The body must match the following @scheme[_module-body] grammar: ] See @secref["creatingunits"] for the grammar of @scheme[_sig-spec]. -Unlike the body of a @schememodname[scheme/unit] module, a -@scheme[require] in a @schememodname[scheme/signature] module must be +Unlike the body of a @schememodname[racket/unit] module, a +@scheme[require] in a @schememodname[racket/signature] module must be a literal use of @scheme[require]. @@ -784,9 +781,9 @@ name before @schemeidfont{-sig}. Otherwise, the module name serves as @section{Transformer Helpers} -@defmodule[scheme/unit-exptime #:use-sources (mzlib/unit-exptime)] +@defmodule[racket/unit-exptime #:use-sources (mzlib/unit-exptime)] -The @schememodname[scheme/unit-exptime] library provides procedures +The @schememodname[racket/unit-exptime] library provides procedures that are intended for use by macro transformers. In particular, the library is typically imported using @scheme[for-syntax] into a module that defines macro with @scheme[define-syntax]. diff --git a/collects/scribblings/reference/unsafe.scrbl b/collects/scribblings/reference/unsafe.scrbl index a9587c8cdc..564a6d788d 100644 --- a/collects/scribblings/reference/unsafe.scrbl +++ b/collects/scribblings/reference/unsafe.scrbl @@ -1,17 +1,17 @@ #lang scribble/doc @(require "mz.ss" - (for-label scheme/unsafe/ops - scheme/flonum - (only-in scheme/foreign + (for-label racket/unsafe/ops + racket/flonum + (only-in racket/unsafe/ffi f64vector? f64vector-ref f64vector-set!))) @title[#:tag "unsafe"]{Unsafe Operations} -@defmodule[scheme/unsafe/ops] +@defmodule[racket/unsafe/ops] -All fuctions and forms provided by @schememodname[scheme/base] and +All fuctions and forms provided by @schememodname[racket/base] and @schememodname[scheme] check their arguments to ensure that the arguments conform to contracts and other constraints. For example, @scheme[vector-ref] checks its arguments to ensure that the first @@ -19,7 +19,7 @@ argument is a vector, that the second argument is an exact integer, and that the second argument is between @scheme[0] and one less than the vector's length, inclusive. -Functions provided by @schememodname[scheme/unsafe/ops] are +Functions provided by @schememodname[racket/unsafe/ops] are @deftech{unsafe}. They have certain constraints, but the constraints are not checked, which allows the system to generate and execute faster code. If arguments violate an unsafe function's constraints, diff --git a/collects/scribblings/reference/vectors.scrbl b/collects/scribblings/reference/vectors.scrbl index 89ed54b763..b39b281d93 100644 --- a/collects/scribblings/reference/vectors.scrbl +++ b/collects/scribblings/reference/vectors.scrbl @@ -148,10 +148,10 @@ _i)] is the value produced by @scheme[(proc _i)]. @; ---------------------------------------- @section{Additional Vector Functions} -@note-lib[scheme/vector] +@note-lib[racket/vector] @(define vec-eval (make-base-eval)) @(interaction-eval #:eval vec-eval - (require scheme/vector)) + (require racket/vector)) @defproc[(vector-map [proc procedure?] [vec vector?] ...+) vector?]{ diff --git a/collects/scribblings/scheme/info.ss b/collects/scribblings/scheme/info.ss new file mode 100644 index 0000000000..863e92cc67 --- /dev/null +++ b/collects/scribblings/scheme/info.ss @@ -0,0 +1,3 @@ +#lang setup/infotab + +(define scribblings '(("scheme.scrbl" (multi-page) (legacy 60)))) diff --git a/collects/scribblings/scheme/scheme.scrbl b/collects/scribblings/scheme/scheme.scrbl new file mode 100644 index 0000000000..55ddc949b2 --- /dev/null +++ b/collects/scribblings/scheme/scheme.scrbl @@ -0,0 +1,124 @@ +#lang scribble/manual +@(require (for-syntax racket) + (for-label (only-in scheme/foreign unsafe! provide* define-unsafer))) + +@(define-syntax-rule (def-extras unit-struct) + (begin + (require (for-label scheme)) + (define unit-struct (racket struct)))) +@(def-extras unit-struct) + +@(define-syntax-rule (compat-except sid rid . rest) + (begin + @section[@schememodname[sid]] + @defmodule[sid] + "The " @schememodname[sid] " library re-exports " @racketmodname[rid] (begin . rest) ".")) +@(define-syntax-rule (compat sid rid) + (compat-except sid rid)) + +@title{@bold{Scheme}: Compatibility Libraries} + +Racket was once called ``PLT Scheme,'' and a number of libraries with +names starting @schemeidfont{scheme} provide compatibility with the +old name. + +@table-of-contents[] + +@compat-except[scheme racket]{, except that @schememodname[racket]'s +@scheme[struct] is not exported, and a @|unit-struct| from +@schememodname[scheme/unit] is exported, instead} + +@compat-except[scheme/base racket/base]{, except that +@schememodname[racket]'s @scheme[struct] is not exported} + +@compat[scheme/async-channel racket/async-channel] +@compat[scheme/bool racket/bool] +@compat[scheme/class racket/class] +@compat[scheme/cmdline racket/cmdline] +@compat[scheme/contract racket/contract] +@compat[scheme/control racket/control] +@compat[scheme/date racket/date] +@compat[scheme/dict racket/dict] +@; @compat[scheme/fasl racket/fasl] +@compat[scheme/file racket/file] +@compat[scheme/fixnum racket/fixnum] +@compat[scheme/flonum racket/flonum] + +@; ---------------------------------------------------------------------- + +@compat-except[scheme/foreign racket/unsafe/ffi]{, except that @scheme[unsafe!] +must be used to import the unsafe bindings of @scheme[racket/unsafe/ffi]} + +@defform[(unsafe!)]{ + +Makes unsafe bindings available.} + + +@defform/subs[#:literals (unsafe rename-out) + (provide* provide-star-spec ...) + ([provide-star-spec (unsafe id) + (unsafe (rename-out [id external-id])) + provide-spec])]{ + +Like @scheme[provide], but @scheme[id]s under @scheme[unsafe] are not +actually provided. Instead, they are collected for introduction into +an importing module via a macro created by @scheme[define-unsafer].} + +@defform[(define-unsafer id)]{ + +Cooperates with @scheme[provide*] to define @scheme[id] as a +@scheme[unsafe!]-like form that introduces definitions for each +binding provided as @scheme[unsafe]. The @scheme[define-unsafer] form +must occur after all the @scheme[provide*] forms to which it refers.} + +@; ---------------------------------------------------------------------- + +@compat[scheme/function racket/function] +@compat[scheme/future racket/future] +@compat[scheme/generator racket/generator] +@compat-except[scheme/gui racket/gui]{, except that it builds on +@schememodname[scheme] instead of @schememodname[racket]} +@compat[scheme/gui/base racket/gui/base] +@compat[scheme/gui/dynamic racket/gui/dynamic] +@compat[scheme/help racket/help] +@compat[scheme/include racket/include] +@compat[scheme/init racket/init] +@compat[scheme/list racket/list] +@compat[scheme/load racket/load] +@compat[scheme/local racket/local] +@compat[scheme/match racket/match] +@compat[scheme/math racket/math] +@compat[scheme/mpair racket/mpair] +@compat[scheme/nest racket/nest] +@compat[scheme/package racket/package] +@compat[scheme/path racket/path] +@compat[scheme/port racket/port] +@compat[scheme/pretty racket/pretty] +@compat[scheme/promise racket/promise] +@compat[scheme/provide racket/provide] +@compat[scheme/provide-syntax racket/provide-syntax] +@compat[scheme/provide-transform racket/provide-transform] +@compat[scheme/require racket/require] +@compat[scheme/require-syntax racket/require-syntax] +@compat[scheme/require-transform racket/require-transform] +@compat[scheme/runtime-path racket/runtime-path] +@compat[scheme/serialize racket/serialize] +@compat[scheme/set racket/set] +@compat[scheme/signature racket/signature] +@compat[scheme/shared racket/shared] +@compat[scheme/splicing racket/splicing] +@compat[scheme/string racket/string] +@compat[scheme/struct-info racket/struct-info] +@compat[scheme/stxparam racket/stxparam] +@compat[scheme/stxparam-exptime racket/stxparam-exptime] +@compat[scheme/surrogate racket/surrogate] +@compat[scheme/system racket/system] +@compat[scheme/tcp racket/tcp] +@; @compat[scheme/trace racket/trace] +@compat[scheme/trait racket/trait] +@compat[scheme/udp racket/udp] +@compat[scheme/unit racket/unit] +@compat[scheme/unit-exptime racket/unit-exptime] +@compat[scheme/unsafe/ops racket/unsafe/ops] +@compat[scheme/vector racket/vector] + diff --git a/collects/scriblib/gui-eval.ss b/collects/scriblib/gui-eval.ss index a18629f73e..49d988c4b3 100644 --- a/collects/scriblib/gui-eval.ss +++ b/collects/scriblib/gui-eval.ss @@ -1,14 +1,14 @@ -#lang scheme/base +#lang racket/base (require scribble/eval scribble/core scribble/scheme - scheme/class - scheme/file - scheme/runtime-path - scheme/serialize + racket/class + racket/file + racket/runtime-path + racket/serialize "private/gui-eval-exn.ss" - scheme/system) + racket/system) (define-syntax define-mr (syntax-rules () @@ -28,13 +28,16 @@ (define-mr gui-interaction-eval-show interaction-eval-show) (define-mr gui-def+int def+int) (define-mr gui-defs+int defs+int) -(define-mr gui-schememod+eval schememod+eval) -(define-mr gui-schemeblock+eval schemeblock+eval) +(define-mr gui-racketmod+eval racketmod+eval) +(define-mr gui-racketblock+eval racketblock+eval) + +(provide (rename-out [gui-racketmod+eval gui-schememod+eval] + [gui-racketblock+eval gui-schemeblock+eval])) (define mred? (getenv "MREVAL")) (when mred? - (gui-eval '(require scheme/gui/base)) + (gui-eval '(require racket/gui/base)) (gui-eval '(require slideshow))) ;; This one needs to be relative, because it ends up in the diff --git a/collects/slideshow/main.ss b/collects/slideshow/main.ss index 61f2e845ce..923b1368f7 100644 --- a/collects/slideshow/main.ss +++ b/collects/slideshow/main.ss @@ -1,8 +1,8 @@ -(module main scheme +(module main racket (require "base.ss" "pict.ss") - (provide (all-from-out scheme + (provide (all-from-out racket "base.ss" "pict.ss")))