somewhat rackety core docs

This commit is contained in:
Matthew Flatt 2010-04-22 13:58:03 -06:00
parent 82eb64451d
commit c7e723eef7
113 changed files with 909 additions and 761 deletions

View File

@ -19,14 +19,14 @@
[ns (parameterize ([current-namespace this-ns]) ; ensures correct phase [ns (parameterize ([current-namespace this-ns]) ; ensures correct phase
(make-empty-namespace))]) (make-empty-namespace))])
(namespace-attach-module this-ns (namespace-attach-module this-ns
'scheme/base 'racket/base
ns) ns)
ns)) ns))
(define (make-base-namespace) (define (make-base-namespace)
(let ([ns (make-base-empty-namespace)]) (let ([ns (make-base-empty-namespace)])
(parameterize ([current-namespace ns]) (parameterize ([current-namespace ns])
(namespace-require 'scheme/base)) (namespace-require 'racket/base))
ns)) ns))
;; ---------------------------------------- ;; ----------------------------------------

View File

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

View File

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

View File

@ -1,2 +1,2 @@
#lang s-exp syntax/module-reader #lang s-exp syntax/module-reader
scheme/signature/lang racket/signature/lang

View File

@ -1,2 +1,2 @@
#lang s-exp syntax/module-reader #lang s-exp syntax/module-reader
scheme/unit/lang racket/unit/lang

View File

@ -1,20 +1,20 @@
(module eval scheme/base (module eval racket/base
(require "manual.ss" (require "manual.ss"
"struct.ss" "struct.ss"
"scheme.ss" "scheme.ss"
"decode.ss" "decode.ss"
scheme/file racket/file
scheme/sandbox scheme/sandbox
scheme/promise racket/promise
mzlib/string mzlib/string
(for-syntax scheme/base)) (for-syntax racket/base))
(provide interaction (provide interaction
interaction-eval interaction-eval
interaction-eval-show interaction-eval-show
schemeblock+eval racketblock+eval (rename-out [racketblock+eval schemeblock+eval])
schememod+eval racketmod+eval (rename-out [racketmod+eval schememod+eval])
def+int def+int
defs+int defs+int
examples examples
@ -38,8 +38,8 @@
(define maxlen 60) (define maxlen 60)
(namespace-require 'scheme/base) (namespace-require 'racket/base)
(namespace-require '(for-syntax scheme/base)) (namespace-require '(for-syntax racket/base))
(define (literal-string style s) (define (literal-string style s)
(let ([m (regexp-match #rx"^(.*)( +)(.*)$" s)]) (let ([m (regexp-match #rx"^(.*)( +)(.*)$" s)])
@ -325,31 +325,31 @@
[(_ #:eval ev e) (do-interaction-eval-show ev (quote-expr e))] [(_ #:eval ev e) (do-interaction-eval-show ev (quote-expr e))]
[(_ e) (do-interaction-eval-show #f (quote-expr e))])) [(_ e) (do-interaction-eval-show #f (quote-expr e))]))
(define-syntax schemeinput* (define-syntax racketinput*
(syntax-rules (eval:alts code:comment) (syntax-rules (eval:alts code:comment)
[(_ (code:comment . rest)) (schemeblock (code:comment . rest))] [(_ (code:comment . rest)) (racketblock (code:comment . rest))]
[(_ (eval:alts a b)) (schemeinput* a)] [(_ (eval:alts a b)) (racketinput* a)]
[(_ e) (schemeinput e)])) [(_ e) (racketinput e)]))
(define-code schemeblock+line (to-paragraph/prefix (hspace 2) (define-code racketblock+line (to-paragraph/prefix (hspace 2)
(hspace 2) (hspace 2)
(list " "))) (list " ")))
(define-syntax (schemedefinput* stx) (define-syntax (racketdefinput* stx)
(syntax-case stx (define define-values define-struct) (syntax-case stx (define define-values define-struct)
[(_ (define . rest)) [(_ (define . rest))
(syntax-case stx () (syntax-case stx ()
[(_ e) #'(schemeblock+line e)])] [(_ e) #'(racketblock+line e)])]
[(_ (define-values . rest)) [(_ (define-values . rest))
(syntax-case stx () (syntax-case stx ()
[(_ e) #'(schemeblock+line e)])] [(_ e) #'(racketblock+line e)])]
[(_ (define-struct . rest)) [(_ (define-struct . rest))
(syntax-case stx () (syntax-case stx ()
[(_ e) #'(schemeblock+line e)])] [(_ e) #'(racketblock+line e)])]
[(_ (code:line (define . rest) . rest2)) [(_ (code:line (define . rest) . rest2))
(syntax-case stx () (syntax-case stx ()
[(_ e) #'(schemeblock+line e)])] [(_ e) #'(racketblock+line e)])]
[(_ e) #'(schemeinput* e)])) [(_ e) #'(racketinput* e)]))
(define (do-titled-interaction ev t shows evals) (define (do-titled-interaction ev t shows evals)
(interleave t (interleave t
@ -358,41 +358,41 @@
(define-syntax titled-interaction (define-syntax titled-interaction
(syntax-rules () (syntax-rules ()
[(_ #:eval ev t schemeinput* e ...) [(_ #:eval ev t racketinput* e ...)
(do-titled-interaction ev t (list (schemeinput* e) ...) (list (quote-expr e) ...))] (do-titled-interaction ev t (list (racketinput* e) ...) (list (quote-expr e) ...))]
[(_ t schemeinput* e ...) [(_ t racketinput* e ...)
(titled-interaction #:eval (make-base-eval) t schemeinput* e ...)])) (titled-interaction #:eval (make-base-eval) t racketinput* e ...)]))
(define-syntax interaction (define-syntax interaction
(syntax-rules () (syntax-rules ()
[(_ #:eval ev e ...) (titled-interaction #:eval ev #f schemeinput* e ...)] [(_ #:eval ev e ...) (titled-interaction #:eval ev #f racketinput* e ...)]
[(_ e ...) (titled-interaction #f schemeinput* e ...)])) [(_ e ...) (titled-interaction #f racketinput* e ...)]))
(define-syntax schemeblock+eval (define-syntax racketblock+eval
(syntax-rules () (syntax-rules ()
[(_ #:eval ev e ...) [(_ #:eval ev e ...)
(let ([eva ev]) (let ([eva ev])
(#%expression (#%expression
(begin (interaction-eval #:eval eva e) ... (begin (interaction-eval #:eval eva e) ...
(schemeblock e ...))))] (racketblock e ...))))]
[(_ 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 () (syntax-rules ()
[(_ #:eval ev name e ...) [(_ #:eval ev name e ...)
(let ([eva ev]) (let ([eva ev])
(#%expression (#%expression
(begin (interaction-eval #:eval eva e) ... (begin (interaction-eval #:eval eva e) ...
(schememod name e ...))))] (racketmod name e ...))))]
[(_ name e ...) [(_ name e ...)
(schememod+eval #:eval (make-base-eval) name e ...)])) (racketmod+eval #:eval (make-base-eval) name e ...)]))
(define-syntax def+int (define-syntax def+int
(syntax-rules () (syntax-rules ()
[(_ #:eval ev def e ...) [(_ #:eval ev def e ...)
(let ([eva ev]) (let ([eva ev])
(column (list (schemeblock+eval #:eval eva def) (column (list (racketblock+eval #:eval eva def)
blank-line blank-line
(interaction #:eval eva e ...))))] (interaction #:eval eva e ...))))]
[(_ def e ...) [(_ def e ...)
@ -402,7 +402,7 @@
(syntax-rules () (syntax-rules ()
[(_ #:eval ev [def ...] e ...) [(_ #:eval ev [def ...] e ...)
(let ([eva ev]) (let ([eva ev])
(column (list (schemeblock+eval #:eval eva def ...) (column (list (racketblock+eval #:eval eva def ...)
blank-line blank-line
(interaction #:eval eva e ...))))] (interaction #:eval eva e ...))))]
[(_ [def ...] e ...) [(_ [def ...] e ...)
@ -421,27 +421,27 @@
(define-syntax examples (define-syntax examples
(syntax-rules () (syntax-rules ()
[(_ #:eval ev e ...) [(_ #:eval ev e ...)
(titled-interaction #:eval ev (pick-example-title e ...) schemeinput* e ...)] (titled-interaction #:eval ev (pick-example-title e ...) racketinput* e ...)]
[(_ e ...) [(_ e ...)
(titled-interaction (pick-example-title e ...) schemeinput* e ...)])) (titled-interaction (pick-example-title e ...) racketinput* e ...)]))
(define-syntax examples* (define-syntax examples*
(syntax-rules () (syntax-rules ()
[(_ #:eval ev example-title e ...) [(_ #:eval ev example-title e ...)
(titled-interaction #:eval ev example-title schemeinput* e ...)] (titled-interaction #:eval ev example-title racketinput* e ...)]
[(_ example-title e ...) [(_ example-title e ...)
(titled-interaction example-title schemeinput* e ...)])) (titled-interaction example-title racketinput* e ...)]))
(define-syntax defexamples (define-syntax defexamples
(syntax-rules () (syntax-rules ()
[(_ #:eval ev e ...) [(_ #:eval ev e ...)
(titled-interaction #:eval ev (pick-example-title e ...) schemedefinput* e ...)] (titled-interaction #:eval ev (pick-example-title e ...) racketdefinput* e ...)]
[(_ e ...) [(_ e ...)
(titled-interaction (pick-example-title e ...) schemedefinput* e ...)])) (titled-interaction (pick-example-title e ...) racketdefinput* e ...)]))
(define-syntax defexamples* (define-syntax defexamples*
(syntax-rules () (syntax-rules ()
[(_ #:eval ev example-title e ...) [(_ #:eval ev example-title e ...)
(titled-interaction #:eval ev example-title schemedefinput* e ...)] (titled-interaction #:eval ev example-title racketdefinput* e ...)]
[(_ example-title e ...) [(_ example-title e ...)
(titled-interaction example-title schemedefinput* e ...)])) (titled-interaction example-title racketdefinput* e ...)]))
(define blank-line (make-paragraph (list 'nbsp))) (define blank-line (make-paragraph (list 'nbsp)))

View File

@ -1,38 +1,57 @@
#lang scheme/base #lang racket/base
(require "../decode.ss" (require "../decode.ss"
"../struct.ss" "../struct.ss"
"../scheme.ss" "../scheme.ss"
"../search.ss" "../search.ss"
"../basic.ss" "../basic.ss"
scheme/list racket/list
"manual-utils.ss" "manual-utils.ss"
"manual-style.ss" "manual-style.ss"
(for-syntax scheme/base) (for-syntax racket/base)
(for-label scheme/base)) (for-label racket/base))
(provide schemeblock SCHEMEBLOCK schemeblock/form (provide racketblock RACKETBLOCK racketblock/form
schemeblock0 SCHEMEBLOCK0 schemeblock0/form racketblock0 RACKETBLOCK0 racketblock0/form
schemeblockelem racketblockelem
schemeinput racketinput
schememod racketmod
scheme SCHEME scheme/form schemeresult schemeid racket RACKET racket/form racketresult racketid
schememodname racketmodname
schememodlink indexed-scheme racketmodlink indexed-racket
schemelink) 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 racketblock0 to-paragraph)
(define-code schemeblock (to-paragraph/prefix (hspace 2) (hspace 2) "")) (define-code racketblock (to-paragraph/prefix (hspace 2) (hspace 2) ""))
(define-code SCHEMEBLOCK (to-paragraph/prefix (hspace 2) (hspace 2) "") (define-code RACKETBLOCK (to-paragraph/prefix (hspace 2) (hspace 2) "")
UNSYNTAX) UNSYNTAX)
(define-code SCHEMEBLOCK0 to-paragraph UNSYNTAX) (define-code RACKETBLOCK0 to-paragraph UNSYNTAX)
(define interaction-prompt (make-element 'tt (list "> " ))) (define interaction-prompt (make-element 'tt (list "> " )))
(define-code schemeinput (define-code racketinput
(to-paragraph/prefix (to-paragraph/prefix
(make-element #f (list (hspace 2) interaction-prompt)) (make-element #f (list (hspace 2) interaction-prompt))
(hspace 4) (hspace 4)
"")) ""))
(define-syntax (schememod stx) (define-syntax (racketmod stx)
(syntax-case stx () (syntax-case stx ()
[(_ #:file filename lang rest ...) [(_ #:file filename lang rest ...)
(with-syntax ([modtag (datum->syntax (with-syntax ([modtag (datum->syntax
@ -45,7 +64,7 @@
`(as-modname-link `(as-modname-link
',#'lang ',#'lang
(to-element ',#'lang)) (to-element ',#'lang))
#'(scheme lang))))) #'(racket lang)))))
#'lang)] #'lang)]
[(file ...) [(file ...)
(if (syntax-e #'filename) (if (syntax-e #'filename)
@ -55,9 +74,9 @@
`(code:comment (unsyntax (t "In \"" ,(syntax-e #'filename) "\":"))) `(code:comment (unsyntax (t "In \"" ,(syntax-e #'filename) "\":")))
#'filename)) #'filename))
null)]) null)])
(syntax/loc stx (schemeblock file ... modtag rest ...)))] (syntax/loc stx (racketblock file ... modtag rest ...)))]
[(_ lang rest ...) [(_ lang rest ...)
(syntax/loc stx (schememod #:file #f lang rest ...))])) (syntax/loc stx (racketmod #:file #f lang rest ...))]))
(define (to-element/result s) (define (to-element/result s)
(make-element result-color (list (to-element/no-color s)))) (make-element result-color (list (to-element/no-color s))))
@ -91,25 +110,25 @@
(make-shaped-parens s val) (make-shaped-parens s val)
s)) 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 racket to-element unsyntax keep-s-expr add-sq-prop)
(define-code SCHEME to-element UNSYNTAX keep-s-expr add-sq-prop) (define-code RACKET to-element UNSYNTAX keep-s-expr add-sq-prop)
(define-code schemeresult to-element/result unsyntax keep-s-expr add-sq-prop) (define-code racketresult 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 racketid to-element/id unsyntax keep-s-expr add-sq-prop)
(define-code *schememodname to-element 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) (syntax-rules (unsyntax)
[(schememodname #,n) [(racketmodname #,n)
(let ([sym n]) (let ([sym n])
(as-modname-link sym (to-element sym)))] (as-modname-link sym (to-element sym)))]
[(schememodname n) [(racketmodname n)
(as-modname-link 'n (*schememodname n))])) (as-modname-link 'n (*racketmodname n))]))
(define-syntax schememodlink (define-syntax racketmodlink
(syntax-rules (unsyntax) (syntax-rules (unsyntax)
[(schememodlink n content ...) [(racketmodlink n content ...)
(*as-modname-link 'n (elem #:style #f content ...))])) (*as-modname-link 'n (elem #:style #f content ...))]))
(define (as-modname-link s e) (define (as-modname-link s e)
@ -122,10 +141,10 @@
(list e) (list e)
`(mod-path ,(format "~s" s)))) `(mod-path ,(format "~s" s))))
(define-syntax-rule (indexed-scheme x) (define-syntax-rule (indexed-racket x)
(add-scheme-index 'x (scheme 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))] (let ([k (cond [(and (pair? s) (eq? (car s) 'quote)) (format "~s" (cadr s))]
[(string? s) s] [(string? s) s]
[else (format "~s" s)])]) [else (format "~s" s)])])
@ -139,11 +158,11 @@
#'(let ([ellipses #f]) #'(let ([ellipses #f])
(base a)))]))) (base a)))])))
(define-/form schemeblock0/form schemeblock0) (define-/form racketblock0/form racketblock0)
(define-/form schemeblock/form schemeblock) (define-/form racketblock/form racketblock)
(define-/form scheme/form scheme) (define-/form racket/form racket)
(define (*schemelink stx-id id . s) (define (*racketlink stx-id id . s)
(let ([content (decode-content s)]) (let ([content (decode-content s)])
(make-delayed-element (make-delayed-element
(lambda (r p ri) (lambda (r p ri)
@ -151,11 +170,11 @@
(make-link-element (make-link-element
#f #f
content 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))))))) `(undef ,(format "--UNDEFINED:~a--" (syntax-e stx-id)))))))
(lambda () content) (lambda () content)
(lambda () content)))) (lambda () content))))
(define-syntax-rule (schemelink id . content) (define-syntax-rule (racketlink id . content)
(*schemelink (quote-syntax id) 'id . content)) (*racketlink (quote-syntax id) 'id . content))

View File

@ -1,4 +1,4 @@
#lang scheme/base #lang racket/base
(require "../decode.ss" (require "../decode.ss"
"../struct.ss" "../struct.ss"
"../base.ss" "../base.ss"
@ -7,9 +7,9 @@
(only-in "../core.ss" make-style plain) (only-in "../core.ss" make-style plain)
"manual-utils.ss" "manual-utils.ss"
"on-demand.ss" "on-demand.ss"
scheme/list racket/list
scheme/contract racket/contract
scheme/string) racket/string)
(provide (rename-out [hyperlink link]) (provide (rename-out [hyperlink link])
(rename-out [other-doc other-manual]) (rename-out [other-doc other-manual])
@ -23,12 +23,26 @@
(() () #:rest (listof pre-content?) . ->* . element?)) (() () #:rest (listof pre-content?) . ->* . element?))
(define-syntax-rule (provide-styling id ...) (define-syntax-rule (provide-styling id ...)
(provide/contract [id styling-f/c] ...)) (provide/contract [id styling-f/c] ...))
(provide-styling schememodfont schemeoutput (provide-styling racketmodfont racketoutput
schemeerror schemefont schemevalfont schemeresultfont schemeidfont schemevarfont racketerror racketfont racketvalfont racketresultfont racketidfont racketvarfont
schemeparenfont schemekeywordfont schememetafont racketparenfont racketkeywordfont racketmetafont
onscreen defterm filepath exec envvar Flag DFlag PFlag DPFlag math onscreen defterm filepath exec envvar Flag DFlag PFlag DPFlag math
procedure procedure
indexed-file indexed-envvar idefterm pidefterm) 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 (provide void-const
undefined-const) undefined-const)
(provide/contract (provide/contract
@ -68,23 +82,23 @@
(define (idefterm . str) (define (idefterm . str)
(let ([c (decode-content str)]) (let ([c (decode-content str)])
(make-element 'italic c))) (make-element 'italic c)))
(define (schemefont . str) (define (racketfont . str)
(apply tt str)) (apply tt str))
(define (schemevalfont . str) (define (racketvalfont . str)
(make-element value-color (decode-content str))) (make-element value-color (decode-content str)))
(define (schemeresultfont . str) (define (racketresultfont . str)
(make-element result-color (decode-content str))) (make-element result-color (decode-content str)))
(define (schemeidfont . str) (define (racketidfont . str)
(make-element symbol-color (decode-content str))) (make-element symbol-color (decode-content str)))
(define (schemevarfont . str) (define (racketvarfont . str)
(make-element variable-color (decode-content str))) (make-element variable-color (decode-content str)))
(define (schemeparenfont . str) (define (racketparenfont . str)
(make-element paren-color (decode-content str))) (make-element paren-color (decode-content str)))
(define (schememetafont . str) (define (racketmetafont . str)
(make-element meta-color (decode-content str))) (make-element meta-color (decode-content str)))
(define (schememodfont . str) (define (racketmodfont . str)
(make-element module-color (decode-content str))) (make-element module-color (decode-content str)))
(define (schemekeywordfont . str) (define (racketkeywordfont . str)
(make-element keyword-color (decode-content str))) (make-element keyword-color (decode-content str)))
(define (filepath . str) (define (filepath . str)
(make-element 'tt (append (list "\"") (decode-content str) (list "\"")))) (make-element 'tt (append (list "\"") (decode-content str) (list "\""))))
@ -124,9 +138,9 @@
(define (procedure . str) (define (procedure . str)
(make-element result-color `("#<procedure:" ,@(decode-content str) ">"))) (make-element result-color `("#<procedure:" ,@(decode-content str) ">")))
(define (schemeoutput . str) (define (racketoutput . str)
(make-element output-color (decode-content str))) (make-element output-color (decode-content str)))
(define (schemeerror . str) (define (racketerror . str)
(make-element error-color (decode-content str))) (make-element error-color (decode-content str)))
(define (t . str) (define (t . str)
@ -150,13 +164,13 @@
(define (hash-lang) (define (hash-lang)
(make-link-element (make-link-element
module-link-color module-link-color
(list (schememodfont "#lang")) (list (racketmodfont "#lang"))
`(part ,(doc-prefix '(lib "scribblings/guide/guide.scrbl") "hash-lang")))) `(part ,(doc-prefix '(lib "scribblings/guide/guide.scrbl") "hash-lang"))))
(define-on-demand void-const (define-on-demand void-const
(schemeresultfont "#<void>")) (racketresultfont "#<void>"))
(define-on-demand undefined-const (define-on-demand undefined-const
(schemeresultfont "#<undefined>")) (racketresultfont "#<undefined>"))
(define (link url (define (link url
#:underline? [underline? #t] #:underline? [underline? #t]

View File

@ -667,7 +667,8 @@
(null? s) (null? s)
(hash? s) (hash? s)
(graph-defn? s) (graph-defn? s)
(graph-reference? s)) (graph-reference? s)
(struct-proxy? s))
(gen-typeset c multi-line? prefix1 prefix suffix color? qq?) (gen-typeset c multi-line? prefix1 prefix suffix color? qq?)
(typeset-atom c (typeset-atom c
(letrec ([mk (letrec ([mk

View File

@ -1,10 +1,11 @@
(module search scheme/base (module search racket/base
(require "struct.ss" (require "struct.ss"
"basic.ss" "basic.ss"
setup/main-collects setup/main-collects
syntax/modcode) syntax/modcode)
(provide find-scheme-tag) (provide find-racket-tag
(rename-out [find-racket-tag find-scheme-tag]))
(define module-info-cache (make-hasheq)) (define module-info-cache (make-hasheq))
@ -21,7 +22,7 @@
(with-handlers* ([exn:fail? (lambda (exn) (fail-thunk))]) (with-handlers* ([exn:fail? (lambda (exn) (fail-thunk))])
(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' ;; The phase-level argument is used only when `stx/binding'
;; is an identifier. ;; is an identifier.
;; ;;
@ -169,7 +170,7 @@
;; have changed in inconsistent ways. So just say #f ;; have changed in inconsistent ways. So just say #f
;; for now. ;; for now.
#; #;
(error 'find-scheme-tag (error 'find-racket-tag
"dead end when looking for binding source: ~e" "dead end when looking for binding source: ~e"
id) id)
(loop queue rqueue need-result?))))) (loop queue rqueue need-result?)))))

View File

@ -1,8 +1,10 @@
#lang racket/base
(module urls mzscheme (provide (all-defined-out)
(provide (all-defined)) (rename-out [url:drracket url:drscheme]
[url:download-drracket url:download-drscheme]))
(define url:drscheme "http://www.drscheme.org/") (define url:drracket "http://racket-lang.org/")
(define url:download-drscheme "http://download.plt-scheme.org/drscheme/") (define url:download-drracket "http://racket-lang.org/")
(define url:planet "http://planet.plt-scheme.org/")) (define url:planet "http://planet.plt-scheme.org/")

View File

@ -5,10 +5,9 @@
@author["Eli Barzilay"] @author["Eli Barzilay"]
@defmodule[scheme/foreign #:use-sources ('#%foreign @defmodule[racket/unsafe/ffi #:use-sources ('#%foreign)]
racket/unsafe/ffi)]
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 C-based APIs within Scheme programs---without writing any new C
code. From the Scheme perspective, functions and data with a C-based code. From the Scheme perspective, functions and data with a C-based
API are @idefterm{foreign}, hence the term @defterm{foreign 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 the foreign interface is sometimes called a @defterm{foreign function
interface}, abbreviated @deftech{FFI}. 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[] @table-of-contents[]
@include-section["intro.scrbl"] @include-section["intro.scrbl"]

View File

@ -12,23 +12,13 @@ information in @|InsideMzScheme|, which defines how PLT Scheme
interacts with C APIs in general. interacts with C APIs in general.
Since using the FFI entails many safety concerns that Scheme Since using the FFI entails many safety concerns that Scheme
programmers can normally ignore, merely importing programmers can normally ignore, the library name includes
@schememodname[scheme/foreign] with @scheme[(require scheme/foreign)] @schemeidfont{unsafe}. Importing the library macro should be
does not import all of the FFI functionality. Only safe functionality considered as a declaration that your code is itself unsafe, therefore
is immediately imported. For example, @scheme[ptr-equal?] can never can lead to serious problems in case of bugs: it is your
cause memory corruption or an invalid memory access, so it is responsibility to provide a safe interface. If your library provides
immediately available on import. an unsafe interface, then it should have @schemeidfont{unsafe} in its
name, too.
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.''
For examples of common FFI usage patterns, see the defined interfaces For examples of common FFI usage patterns, see the defined interfaces
in the @filepath{ffi} collection. in the @filepath{ffi} collection.

View File

@ -3,28 +3,3 @@
@title{Macros for Unsafety} @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.}

View File

@ -1,20 +1,20 @@
#lang scheme/base #lang racket/base
(require scribble/manual (require scribble/manual
scribble/struct scribble/struct
scribble/decode scribble/decode
(only-in "../inside/utils.ss" cpp) (only-in "../inside/utils.ss" cpp)
(for-syntax scheme/base) (for-syntax racket/base)
(for-label scheme/base (for-label racket/base
scheme/contract racket/contract
(except-in "unsafe-foreign.ss" ->))) (except-in racket/unsafe/ffi ->)))
(provide cpp (provide cpp
InsideMzScheme InsideMzScheme
(all-from-out scribble/manual) (all-from-out scribble/manual)
(for-label (all-from-out scheme/base (for-label (all-from-out racket/base
scheme/contract racket/contract
"unsafe-foreign.ss"))) racket/unsafe/ffi)))
(define InsideMzScheme (define InsideMzScheme

View File

@ -1,21 +1,21 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss" @(require "common.ss"
(for-label scheme/gui/dynamic)) (for-label racket/gui/dynamic))
@title{Dynamic Loading} @title{Dynamic Loading}
@defmodule[scheme/gui/dynamic]{The @schememodname[scheme/gui/dynamic] @defmodule[racket/gui/dynamic]{The @racketmodname[racket/gui/dynamic]
library provides functions for dynamically accessing the PLT Scheme library provides functions for dynamically accessing the PLT Racket
GUI toolbox, instead of directly requiring @scheme[scheme/gui] or GUI toolbox, instead of directly requiring @racket[racket/gui] or
@scheme[scheme/gui/base].} @racket[racket/gui/base].}
@defproc[(gui-available?) boolean?]{ @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 available---that is, that the program is being run as a
@exec{mred}-based application, as opposed to a pure @exec{mred}-based application, as opposed to a pure
@exec{mzscheme}-based application, and that GUI modules are attached @exec{mzracket}-based application, and that GUI modules are attached
to the namespace in which @scheme[scheme/gui/dynamic] was to the namespace in which @racket[racket/gui/dynamic] was
instantiated. instantiated.
This predicate can be used in code that optionally uses GUI elements 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]{ @defproc[(gui-dynamic-require [sym symbol?]) any]{
Like @scheme[dynamic-require], but specifically to access exports of Like @racket[dynamic-require], but specifically to access exports of
@scheme[scheme/gui/base].} @racket[racket/gui/base].}

View File

@ -5,21 +5,21 @@
@author["Matthew Flatt" "Robert Bruce Findler" "John Clements"] @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 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 @defmodule*/no-declare[(racket/gui/base)]{The
@schememodname[scheme/gui/base] library provides all of the class, @racketmodname[racket/gui/base] library provides all of the class,
interface, and procedure bindings defined in this manual. At run time, interface, and procedure bindings defined in this manual. At run time,
this library needs primitive graphics support that the MrEd executable 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 @defmodulelang*/no-declare[(racket/gui)]{The
@schememodname[scheme/gui] language combines all bindings of the @racketmodname[racket/gui] language combines all bindings of the
@schememodname[scheme] language and the @racketmodname[racket] language and the
@schememodname[scheme/gui/base] modules.} @racketmodname[racket/gui/base] modules.}
@table-of-contents[] @table-of-contents[]

View File

@ -3,88 +3,88 @@
((2) 0 () 0 () () (c begin c "art gallery")) ((2) 0 () 0 () () (c begin c "art gallery"))
((2) 0 () 0 () () "art gallery") ((2) 0 () 0 () () "art gallery")
((2) 0 () 0 () () (c circle c 10)) ((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) 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) 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) 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 () () (c define c c c (c circle c 10)))
((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (void))
((2) 0 () 0 () () (c define c r c (c rectangle c 10 c 20))) ((2) 0 () 0 () () (c define c r c (c rectangle c 10 c 20)))
((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (void))
((2) 0 () 0 () () r) ((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) 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) 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 () () (c define c (c square c n) c (c filled-rectangle c n c n)))
((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (void))
((2) 0 () 0 () () (c square c 10)) ((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 () () (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 () () (void))
((2) 0 () 0 () () (c four c (c circle c 10))) ((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 () () (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 () () (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) 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 () () (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 () () (void))
((2) 0 () 0 () () (c checkerboard c (c square c 10))) ((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) 0 () 0 () () circle)
((2) 1 (((lib "scribble/core.ss") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#<procedure:circle>")))) ((2) 1 (((lib "scribble/core.rkt") . deserialize-info:element-v0)) 0 () () (0 #f (c (u . "#<procedure:circle>"))))
((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 () () (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 () () (void))
((2) 0 () 0 () () (c series c circle)) ((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) 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) 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 () () (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 () () (void))
((2) 0 () 0 () () (c rgb-series c circle)) ((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) 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 () () (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 () () (void))
((2) 0 () 0 () () (c series c (c rgb-maker c circle))) ((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) 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 list c "red" c "green" c "blue"))
((2) 0 () 0 () () (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) 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 () () (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 () () (void))
((2) 0 () 0 () () (c rainbow c (c square c 5))) ((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) 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 () () (c require c slideshow/flash))
((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (void))
((2) 0 () 0 () () (c filled-flash c 40 c 30)) ((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) 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.ss" c (c "schematics" c "random.plt" c 1 c 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 () () (void))
((2) 0 () 0 () () (c random-gaussian)) ((2) 0 () 0 () () (c random-gaussian))
((2) 0 () 0 () () 0.7386912134436788) ((2) 0 () 0 () () 0.7386912134436788)
((2) 0 () 0 () () (c require c slideshow/code)) ((2) 0 () 0 () () (c require c slideshow/code))
((2) 0 () 0 () () (void)) ((2) 0 () 0 () () (void))
((2) 0 () 0 () () (c code c (c circle c 10))) ((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 () () (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 () () (void))
((2) 0 () 0 () () (c pict+code c (c circle c 10))) ((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) 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 scheme/class c scheme/gui/base)) ((2) 0 () 0 () () (c require c racket/class c racket/gui/base))
((2) 0 () 0 () () (void)) ((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 () () (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)) ((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 () () (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 () () (void))
((2) 0 () 0 () () (c add-drawing c (c pict+code c (c circle c 10)))) ((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) 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) 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))

View File

@ -42,10 +42,10 @@ endobj
<?adobe-xap-filters esc="CRLF"?> <?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='f22d160f-af3b-11e9-0000-34a7f4bf94ee' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/> <rdf:Description rdf:about='9bd8d72d-8665-11ea-0000-34a7f4bf94ee' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
<rdf:Description rdf:about='f22d160f-af3b-11e9-0000-34a7f4bf94ee' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2009-07-22T18:26:00-06:00' xap:CreateDate='2009-07-22T18:26:00-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description> <rdf:Description rdf:about='9bd8d72d-8665-11ea-0000-34a7f4bf94ee' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:54-06:00' xap:CreateDate='2010-04-22T13:55:54-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
<rdf:Description rdf:about='f22d160f-af3b-11e9-0000-34a7f4bf94ee' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='f22d160f-af3b-11e9-0000-34a7f4bf94ee'/> <rdf:Description rdf:about='9bd8d72d-8665-11ea-0000-34a7f4bf94ee' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9bd8d72d-8665-11ea-0000-34a7f4bf94ee'/>
<rdf:Description rdf:about='f22d160f-af3b-11e9-0000-34a7f4bf94ee' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description> <rdf:Description rdf:about='9bd8d72d-8665-11ea-0000-34a7f4bf94ee' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>
@ -55,8 +55,8 @@ endstream
endobj endobj
2 0 obj 2 0 obj
<</Producer(GPL Ghostscript 8.63) <</Producer(GPL Ghostscript 8.63)
/CreationDate(D:20090722182600-06'00') /CreationDate(D:20100422135554-06'00')
/ModDate(D:20090722182600-06'00') /ModDate(D:20100422135554-06'00')
/Creator(PLT Scheme) /Creator(PLT Scheme)
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj /Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
xref xref
@ -73,7 +73,7 @@ xref
0000000640 00000 n 0000000640 00000 n
trailer trailer
<< /Size 10 /Root 1 0 R /Info 2 0 R << /Size 10 /Root 1 0 R /Info 2 0 R
/ID [<359940CD83EE8F3FC014C34CE1255CDE><359940CD83EE8F3FC014C34CE1255CDE>] /ID [<773F739C40C01D398B1ACA4FA8323A87><773F739C40C01D398B1ACA4FA8323A87>]
>> >>
startxref startxref
2278 2278

View File

@ -42,10 +42,10 @@ endobj
<?adobe-xap-filters esc="CRLF"?> <?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='f2c5ac8f-af3b-11e9-0000-de937bc06cc7' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/> <rdf:Description rdf:about='9c716dad-8665-11ea-0000-de937bc06cc7' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
<rdf:Description rdf:about='f2c5ac8f-af3b-11e9-0000-de937bc06cc7' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2009-07-22T18:26:01-06:00' xap:CreateDate='2009-07-22T18:26:01-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description> <rdf:Description rdf:about='9c716dad-8665-11ea-0000-de937bc06cc7' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:55-06:00' xap:CreateDate='2010-04-22T13:55:55-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
<rdf:Description rdf:about='f2c5ac8f-af3b-11e9-0000-de937bc06cc7' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='f2c5ac8f-af3b-11e9-0000-de937bc06cc7'/> <rdf:Description rdf:about='9c716dad-8665-11ea-0000-de937bc06cc7' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9c716dad-8665-11ea-0000-de937bc06cc7'/>
<rdf:Description rdf:about='f2c5ac8f-af3b-11e9-0000-de937bc06cc7' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description> <rdf:Description rdf:about='9c716dad-8665-11ea-0000-de937bc06cc7' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>
@ -55,8 +55,8 @@ endstream
endobj endobj
2 0 obj 2 0 obj
<</Producer(GPL Ghostscript 8.63) <</Producer(GPL Ghostscript 8.63)
/CreationDate(D:20090722182601-06'00') /CreationDate(D:20100422135555-06'00')
/ModDate(D:20090722182601-06'00') /ModDate(D:20100422135555-06'00')
/Creator(PLT Scheme) /Creator(PLT Scheme)
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj /Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
xref xref
@ -73,7 +73,7 @@ xref
0000000577 00000 n 0000000577 00000 n
trailer trailer
<< /Size 10 /Root 1 0 R /Info 2 0 R << /Size 10 /Root 1 0 R /Info 2 0 R
/ID [<B544940615DB98AEC7D1DC63F54A451E><B544940615DB98AEC7D1DC63F54A451E>] /ID [<CB114AF944A7F85D520FBB25E1E9B5DD><CB114AF944A7F85D520FBB25E1E9B5DD>]
>> >>
startxref startxref
2215 2215

View File

@ -42,10 +42,10 @@ endobj
<?adobe-xap-filters esc="CRLF"?> <?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='f35e430f-af3b-11e9-0000-11040068121c' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/> <rdf:Description rdf:about='9c716dad-8665-11ea-0000-11040068121c' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
<rdf:Description rdf:about='f35e430f-af3b-11e9-0000-11040068121c' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2009-07-22T18:26:02-06:00' xap:CreateDate='2009-07-22T18:26:02-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description> <rdf:Description rdf:about='9c716dad-8665-11ea-0000-11040068121c' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:55-06:00' xap:CreateDate='2010-04-22T13:55:55-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
<rdf:Description rdf:about='f35e430f-af3b-11e9-0000-11040068121c' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='f35e430f-af3b-11e9-0000-11040068121c'/> <rdf:Description rdf:about='9c716dad-8665-11ea-0000-11040068121c' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9c716dad-8665-11ea-0000-11040068121c'/>
<rdf:Description rdf:about='f35e430f-af3b-11e9-0000-11040068121c' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description> <rdf:Description rdf:about='9c716dad-8665-11ea-0000-11040068121c' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>
@ -55,8 +55,8 @@ endstream
endobj endobj
2 0 obj 2 0 obj
<</Producer(GPL Ghostscript 8.63) <</Producer(GPL Ghostscript 8.63)
/CreationDate(D:20090722182602-06'00') /CreationDate(D:20100422135555-06'00')
/ModDate(D:20090722182602-06'00') /ModDate(D:20100422135555-06'00')
/Creator(PLT Scheme) /Creator(PLT Scheme)
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj /Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
xref xref
@ -73,7 +73,7 @@ xref
0000000588 00000 n 0000000588 00000 n
trailer trailer
<< /Size 10 /Root 1 0 R /Info 2 0 R << /Size 10 /Root 1 0 R /Info 2 0 R
/ID [<3F728FBF71FC3EE42151B158C78C6E47><3F728FBF71FC3EE42151B158C78C6E47>] /ID [<2D22C5E6138860AE600CF56ED7C7E964><2D22C5E6138860AE600CF56ED7C7E964>]
>> >>
startxref startxref
2226 2226

View File

@ -44,10 +44,10 @@ endobj
<?adobe-xap-filters esc="CRLF"?> <?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='f0fbe90f-af3b-11e9-0000-2bb4b895d559' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/> <rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
<rdf:Description rdf:about='f0fbe90f-af3b-11e9-0000-2bb4b895d559' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2009-07-22T18:25:58-06:00' xap:CreateDate='2009-07-22T18:25:58-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description> <rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:53-06:00' xap:CreateDate='2010-04-22T13:55:53-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
<rdf:Description rdf:about='f0fbe90f-af3b-11e9-0000-2bb4b895d559' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='f0fbe90f-af3b-11e9-0000-2bb4b895d559'/> <rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9b4040ad-8665-11ea-0000-2bb4b895d559'/>
<rdf:Description rdf:about='f0fbe90f-af3b-11e9-0000-2bb4b895d559' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description> <rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>
@ -57,8 +57,8 @@ endstream
endobj endobj
2 0 obj 2 0 obj
<</Producer(GPL Ghostscript 8.63) <</Producer(GPL Ghostscript 8.63)
/CreationDate(D:20090722182558-06'00') /CreationDate(D:20100422135553-06'00')
/ModDate(D:20090722182558-06'00') /ModDate(D:20100422135553-06'00')
/Creator(PLT Scheme) /Creator(PLT Scheme)
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj /Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
xref xref
@ -75,7 +75,7 @@ xref
0000000546 00000 n 0000000546 00000 n
trailer trailer
<< /Size 10 /Root 1 0 R /Info 2 0 R << /Size 10 /Root 1 0 R /Info 2 0 R
/ID [<BF3BAD7CB407F5E17AE00BD540FA6C1B><BF3BAD7CB407F5E17AE00BD540FA6C1B>] /ID [<0A1E7255A8DE9CB04AA60879F660024B><0A1E7255A8DE9CB04AA60879F660024B>]
>> >>
startxref startxref
2184 2184

View File

@ -43,10 +43,10 @@ endobj
<?adobe-xap-filters esc="CRLF"?> <?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='f48f700f-af3b-11e9-0000-fcfa74cec07e' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/> <rdf:Description rdf:about='9da29aad-8665-11ea-0000-fcfa74cec07e' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
<rdf:Description rdf:about='f48f700f-af3b-11e9-0000-fcfa74cec07e' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2009-07-22T18:26:04-06:00' xap:CreateDate='2009-07-22T18:26:04-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description> <rdf:Description rdf:about='9da29aad-8665-11ea-0000-fcfa74cec07e' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:57-06:00' xap:CreateDate='2010-04-22T13:55:57-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
<rdf:Description rdf:about='f48f700f-af3b-11e9-0000-fcfa74cec07e' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='f48f700f-af3b-11e9-0000-fcfa74cec07e'/> <rdf:Description rdf:about='9da29aad-8665-11ea-0000-fcfa74cec07e' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9da29aad-8665-11ea-0000-fcfa74cec07e'/>
<rdf:Description rdf:about='f48f700f-af3b-11e9-0000-fcfa74cec07e' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description> <rdf:Description rdf:about='9da29aad-8665-11ea-0000-fcfa74cec07e' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>
@ -56,8 +56,8 @@ endstream
endobj endobj
2 0 obj 2 0 obj
<</Producer(GPL Ghostscript 8.63) <</Producer(GPL Ghostscript 8.63)
/CreationDate(D:20090722182604-06'00') /CreationDate(D:20100422135557-06'00')
/ModDate(D:20090722182604-06'00') /ModDate(D:20100422135557-06'00')
/Creator(PLT Scheme) /Creator(PLT Scheme)
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj /Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
xref xref
@ -74,7 +74,7 @@ xref
0000000577 00000 n 0000000577 00000 n
trailer trailer
<< /Size 10 /Root 1 0 R /Info 2 0 R << /Size 10 /Root 1 0 R /Info 2 0 R
/ID [<F1ECA86EA72818308D60B49648AD980D><F1ECA86EA72818308D60B49648AD980D>] /ID [<E91F774EC89995D6400B03C9EA77D9E7><E91F774EC89995D6400B03C9EA77D9E7>]
>> >>
startxref startxref
2215 2215

View File

@ -42,10 +42,10 @@ endobj
<?adobe-xap-filters esc="CRLF"?> <?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='f48f700f-af3b-11e9-0000-2bb5249de6dd' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/> <rdf:Description rdf:about='9da29aad-8665-11ea-0000-2bb5249de6dd' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
<rdf:Description rdf:about='f48f700f-af3b-11e9-0000-2bb5249de6dd' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2009-07-22T18:26:04-06:00' xap:CreateDate='2009-07-22T18:26:04-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description> <rdf:Description rdf:about='9da29aad-8665-11ea-0000-2bb5249de6dd' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:57-06:00' xap:CreateDate='2010-04-22T13:55:57-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
<rdf:Description rdf:about='f48f700f-af3b-11e9-0000-2bb5249de6dd' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='f48f700f-af3b-11e9-0000-2bb5249de6dd'/> <rdf:Description rdf:about='9da29aad-8665-11ea-0000-2bb5249de6dd' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9da29aad-8665-11ea-0000-2bb5249de6dd'/>
<rdf:Description rdf:about='f48f700f-af3b-11e9-0000-2bb5249de6dd' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description> <rdf:Description rdf:about='9da29aad-8665-11ea-0000-2bb5249de6dd' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>
@ -55,8 +55,8 @@ endstream
endobj endobj
2 0 obj 2 0 obj
<</Producer(GPL Ghostscript 8.63) <</Producer(GPL Ghostscript 8.63)
/CreationDate(D:20090722182604-06'00') /CreationDate(D:20100422135557-06'00')
/ModDate(D:20090722182604-06'00') /ModDate(D:20100422135557-06'00')
/Creator(PLT Scheme) /Creator(PLT Scheme)
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj /Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
xref xref
@ -73,7 +73,7 @@ xref
0000000622 00000 n 0000000622 00000 n
trailer trailer
<< /Size 10 /Root 1 0 R /Info 2 0 R << /Size 10 /Root 1 0 R /Info 2 0 R
/ID [<5B1279F9960652F0F9499AE6C2394568><5B1279F9960652F0F9499AE6C2394568>] /ID [<6C51B73DC3A90C9A3E8D707F4552676C><6C51B73DC3A90C9A3E8D707F4552676C>]
>> >>
startxref startxref
2260 2260

View File

@ -44,10 +44,10 @@ endobj
<?adobe-xap-filters esc="CRLF"?> <?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='f1947f8f-af3b-11e9-0000-2bb4b895d559' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/> <rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 8.63'/>
<rdf:Description rdf:about='f1947f8f-af3b-11e9-0000-2bb4b895d559' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2009-07-22T18:25:59-06:00' xap:CreateDate='2009-07-22T18:25:59-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description> <rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:xap='http://ns.adobe.com/xap/1.0/' xap:ModifyDate='2010-04-22T13:55:53-06:00' xap:CreateDate='2010-04-22T13:55:53-06:00'><xap:CreatorTool>PLT Scheme</xap:CreatorTool></rdf:Description>
<rdf:Description rdf:about='f1947f8f-af3b-11e9-0000-2bb4b895d559' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='f1947f8f-af3b-11e9-0000-2bb4b895d559'/> <rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='9b4040ad-8665-11ea-0000-2bb4b895d559'/>
<rdf:Description rdf:about='f1947f8f-af3b-11e9-0000-2bb4b895d559' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description> <rdf:Description rdf:about='9b4040ad-8665-11ea-0000-2bb4b895d559' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>mflatt@Macintosh \(Matthew Flatt\)</rdf:li></rdf:Seq></dc:creator></rdf:Description>
</rdf:RDF> </rdf:RDF>
</x:xmpmeta> </x:xmpmeta>
@ -57,8 +57,8 @@ endstream
endobj endobj
2 0 obj 2 0 obj
<</Producer(GPL Ghostscript 8.63) <</Producer(GPL Ghostscript 8.63)
/CreationDate(D:20090722182559-06'00') /CreationDate(D:20100422135553-06'00')
/ModDate(D:20090722182559-06'00') /ModDate(D:20100422135553-06'00')
/Creator(PLT Scheme) /Creator(PLT Scheme)
/Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj /Author(mflatt@Macintosh \(Matthew Flatt\))>>endobj
xref xref
@ -75,7 +75,7 @@ xref
0000000546 00000 n 0000000546 00000 n
trailer trailer
<< /Size 10 /Root 1 0 R /Info 2 0 R << /Size 10 /Root 1 0 R /Info 2 0 R
/ID [<6E7272D6B2731DC8CB2BE347FB5EA742><6E7272D6B2731DC8CB2BE347FB5EA742>] /ID [<18F7F7D89292F20542678B75862EDC0C><18F7F7D89292F20542678B75862EDC0C>]
>> >>
startxref startxref
2184 2184

View File

@ -1,11 +1,11 @@
#lang scheme/base #lang racket/base
(require scriblib/gui-eval) (require scriblib/gui-eval)
(provide (rename-out [gui-interaction mr-interaction] (provide (rename-out [gui-interaction mr-interaction]
[gui-interaction-eval mr-interaction-eval] [gui-interaction-eval mr-interaction-eval]
[gui-schememod+eval mr-schememod+eval] [gui-racketmod+eval mr-racketmod+eval]
[gui-schemeblock+eval mr-schemeblock+eval] [gui-racketblock+eval mr-racketblock+eval]
[gui-def+int mr-def+int] [gui-def+int mr-def+int]
[gui-defs+int mr-defs+int] [gui-defs+int mr-defs+int]
[gui-interaction-eval-show mr-interaction-eval-show])) [gui-interaction-eval-show mr-interaction-eval-show]))

View File

@ -7,20 +7,20 @@
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@(require scribble/manual @(require scribble/manual
"mreval.ss" "mreval.rkt"
"keep.ss" "keep.rkt"
scribble/urls scribble/urls
scribble/struct scribble/struct
scheme/class racket/class
(for-label scheme/base (for-label racket/base
scheme/gui/base racket/gui/base
scheme/class racket/class
slideshow slideshow
slideshow/code slideshow/code
slideshow/flash) 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. 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 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 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. you eventually use Racket with Emacs, vi, or some other editor.
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@section{Ready...} @section{Ready...}
@link[url:download-drscheme]{Download Racket}, install, and then @link[url:download-drracket]{Download Racket}, install, and then
start DrRacket. 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 following into the @defterm{definitions area}, which is the top text
area that you see in DrRacket: area that you see in DrRacket:
@schememod[slideshow] @racketmod[slideshow]
Then click the @onscreen{Run} button. You'll see the text caret move Then click the @onscreen{Run} button. You'll see the text caret move
to the bottom text area, which is the @defterm{interactions area}. 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 When you type an expression after the @onscreen{>} in the interactions
window and hit Enter, DrRacket evaluates the expression and prints its window and hit Enter, DrRacket evaluates the expression and prints its
result. An expression can be just a value, such as the number 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"] @mr-interaction[5 "art gallery"]
@ -74,15 +74,15 @@ function arguments, and then a close parenthesis, like this:
@mr-interaction[(circle 10)] @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 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 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)] @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: what happens:
@mr-interaction[(circle 10 20)] @mr-interaction[(circle 10 20)]
@ -90,28 +90,28 @@ what happens:
Note that DrRacket highlights in pink the expression that triggered Note that DrRacket highlights in pink the expression that triggered
the error (but pink highlighting is not shown in this documentation). the error (but pink highlighting is not shown in this documentation).
In addition to basic picture constructors like @scheme[circle] and In addition to basic picture constructors like @racket[circle] and
@scheme[rectangle], there's a @scheme[hc-append] function that @racket[rectangle], there's a @racket[hc-append] function that
combines pictures. When you start composing function calls in Racket, combines pictures. When you start composing function calls in Racket,
it looks like this: it looks like this:
@mr-interaction[(hc-append (circle 10) (rectangle 10 20))] @mr-interaction[(hc-append (circle 10) (rectangle 10 20))]
The hyphen in the name @scheme[hc-append] is just a part of the The hyphen in the name @racket[hc-append] is just a part of the
identifier; it's not @schemeidfont{hc} minus identifier; it's not @racketidfont{hc} minus
@schemeidfont{append}. The function name starts with @scheme[h] @racketidfont{append}. The function name starts with @racket[h]
because it combines pictures horizontally, and the next letter is 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 If you wonder what other functions exist---perhaps a way to stack
pictures vertically and left-aligned?---move the text caret to the 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 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. functions.
If you're reading this in HTML form, you can also just click on 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. 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 area) and add two definitions, so that the complete content of the
definitions area looks like this: definitions area looks like this:
@mr-schememod+eval[ @mr-racketmod+eval[
slideshow slideshow
(define c (circle 10)) (define c (circle 10))
(define r (rectangle 10 20)) (define r (rectangle 10 20))
] ]
Then click @onscreen{Run} again. Now, you can just type @scheme[c] or Then click @onscreen{Run} again. Now, you can just type @racket[c] or
@scheme[r]: @racket[r]:
@mr-interaction[r (hc-append c r) (hc-append 20 c r c)] @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 argument before the picture arguments, and it accepts any
number of picture arguments. When a number is provided, it specifies number of picture arguments. When a number is provided, it specifies
the amount of space to add between pictures. the amount of space to add between pictures.
We could have evaluated the @scheme[define] forms for @scheme[c] and We could have evaluated the @racket[define] forms for @racket[c] and
@scheme[r] in the interactions area instead of the definitions @racket[r] in the interactions area instead of the definitions
area. In practice, though, the definitions area is where your program area. In practice, though, the definitions area is where your program
lives---it's the file that you save---while the interaction area is lives---it's the file that you save---while the interaction area is
for transient explorations and debugging tasks. for transient explorations and debugging tasks.
Let's add a function definition to the program. A function definition 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 open parenthesis before the function name, and names for the function
arguments before the matching close parenthesis: arguments before the matching close parenthesis:
@mr-schemeblock+eval[ @mr-racketblock+eval[
(define (square n) (define (square n)
(code:comment @#,t{A semi-colon starts a line comment.}) (code:comment @#,t{A semi-colon starts a line comment.})
(code:comment @#,t{The expression below is the function body.}) (code:comment @#,t{The expression below is the function body.})
@ -173,7 +173,7 @@ definition area.
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@section{Local Binding} @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: bindings. For example, it can be used inside a function body:
@mr-def+int[ @mr-def+int[
@ -183,10 +183,10 @@ bindings. For example, it can be used inside a function body:
(four (circle 10)) (four (circle 10))
] ]
More typically, Racketeers use the @scheme[let] or @scheme[let*] form More typically, Racketeers use the @racket[let] or @racket[let*] form
for local binding. An advantage of @scheme[let] is that it can be used 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, 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[ @mr-def+int[
(define (checker p1 p2) (define (checker p1 p2)
@ -197,8 +197,8 @@ instead of requiring a separate @scheme[define] for each identifier:
(colorize (square 10) "black")) (colorize (square 10) "black"))
] ]
A @scheme[let] form binds many identifiers at the same time, so the A @racket[let] form binds many identifiers at the same time, so the
bindings cannot refer to each other. The @scheme[let*] form, in bindings cannot refer to each other. The @racket[let*] form, in
contrast, allows later bindings to use earlier bindings: contrast, allows later bindings to use earlier bindings:
@mr-def+int[ @mr-def+int[
@ -214,13 +214,13 @@ contrast, allows later bindings to use earlier bindings:
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@section{Functions are Values} @section{Functions are Values}
Instead of calling @scheme[circle] as a function, try evaluating just Instead of calling @racket[circle] as a function, try evaluating just
@scheme[circle] as an expression: @racket[circle] as an expression:
@mr-interaction[circle] @mr-interaction[circle]
That is, the identifier @scheme[circle] is bound to a function That is, the identifier @racket[circle] is bound to a function
(a.k.a. ``procedure''), just like @scheme[c] is bound to a (a.k.a. ``procedure''), just like @racket[c] is bound to a
circle. Unlike a circle picture, there's not a simple way of circle. Unlike a circle picture, there's not a simple way of
completely printing the function, so DrRacket just prints completely printing the function, so DrRacket just prints
@procedure{circle}. @procedure{circle}.
@ -239,30 +239,30 @@ arguments:
When calling a function that accepts a function argument, the When calling a function that accepts a function argument, the
argument function often isn't needed anywhere else. Having to write 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 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: anonymous function:
@mr-interaction[(series (lambda (size) (checkerboard (square size))))] @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 the function, and the expression after the argument names is the
function body. Using the word ``lambda'' instead of ``function'' or function body. Using the word ``lambda'' instead of ``function'' or
``procedure'' is part of Racket's history and culture. ``procedure'' is part of Racket's history and culture.
A @scheme[define] form for a function is really a shorthand for a A @racket[define] form for a function is really a shorthand for a
simple @scheme[define] using @scheme[lambda] as the value. For simple @racket[define] using @racket[lambda] as the value. For
example, the @scheme[series] definition could be written as example, the @racket[series] definition could be written as
@schemeblock[ @racketblock[
(define series (define series
(lambda (mk) (lambda (mk)
(hc-append 4 (mk 5) (mk 10) (mk 20)))) (hc-append 4 (mk 5) (mk 10) (mk 20))))
] ]
Most Racketeers prefer to use the shorthand function form with 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} @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 Racket is a lexically scoped language, which means that whenever an
identifier is used as an expression, something in the textual identifier is used as an expression, something in the textual
environment of the expression determines the identifier's 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. well as anywhere else.
For example, in the following @scheme[rgb-series] function the uses For example, in the following @racket[rgb-series] function the uses
of @scheme[mk] in each @scheme[lambda] form to refer to the argument of of @racket[mk] in each @racket[lambda] form to refer to the argument of
@scheme[rgb-series], since that's the binding that is textually in @racket[rgb-series], since that's the binding that is textually in
scope: scope:
@mr-def+int[ @mr-def+int[
@ -288,7 +288,7 @@ scope:
(rgb-series square) (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. returns a new one that remembers and uses the original function.
@mr-def+int[ @mr-def+int[
@ -301,9 +301,9 @@ returns a new one that remembers and uses the original function.
(series (rgb-maker square)) (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 different alignment of objects within the picture compared to using
@scheme[rgb-series]. @racket[rgb-series].
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@section{Lists} @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 originally stood for ``LISt Processor,'' and lists remain an important
part of Racket. 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: a list containing the given values:
@mr-interaction[(list "red" "green" "blue") @mr-interaction[(list "red" "green" "blue")
(list (circle 10) (square 10))] (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 the printed form of the list elements. There's room for confusion
here, because parentheses are used for both expressions, such as here, because parentheses are used for both expressions, such as
@scheme[(circle 10)], and printed results, such as @racket[(circle 10)], and printed results, such as
@schemeresult[("red" "green" "blue")]. This connection between @racketresult[`("red" "green" "blue")]. The backquote is the key difference,
expressions and printed results is no coincidence, but we save that as @seclink[#:doc '(lib "scribblings/guide/guide.scrbl") "quoting-lists"]{discussed
bit of culture for @seclink[#:doc '(lib elsewhere}. To help emphasize the difference, in the documentation and in DrRacket,
"scribblings/guide/guide.scrbl") "quoting-lists"]{discussion result parentheses are printed in blue, unlike expression parentheses.
elsewhere}. 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 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 function to apply to each element of the list; it returns a new list
to combine the function's results: to combine the function's results:
@ -342,21 +340,21 @@ to combine the function's results:
(rainbow (square 5)) (rainbow (square 5))
] ]
Another function that works with lists is @scheme[apply]. Like Another function that works with lists is @racket[apply]. Like
@scheme[map], it takes a function and a list, but a function given @racket[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 to @racket[apply] should take all of the arguments at once, instead of
each one individually. The @scheme[apply] function is especially each one individually. The @racket[apply] function is especially
useful with functions that take any number of arguments, such as useful with functions that take any number of arguments, such as
@scheme[vc-append]: @racket[vc-append]:
@mr-interaction[ @mr-interaction[
(apply vc-append (rainbow (square 5))) (apply vc-append (rainbow (square 5)))
] ]
Note that @scheme[(vc-append (rainbow (square 5)))] would not work, Note that @racket[(vc-append (rainbow (square 5)))] would not work,
because @scheme[vc-append] does not want a list as an argument; it 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 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 function that wants many arguments and a list of those arguments as a
single value. single value.
@ -365,17 +363,17 @@ single value.
Since your program in the definitions window starts with 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 all of the code that you put in the definitions window is inside a
module. Furthermore, the module initially imports everything from the 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 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 To import additional libraries, use the @racket[require] form. For
example, the library @schememodname[slideshow/flash] provides a example, the library @racketmodname[slideshow/flash] provides a
@scheme[filled-flash] function: @racket[filled-flash] function:
@mr-def+int[ @mr-def+int[
(require slideshow/flash) (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 @item{Some modules are packaged in the Racket distribution or
otherwise installed into a hierarchy of otherwise installed into a hierarchy of
@defterm{collections}. For example, the module name @defterm{collections}. For example, the module name
@schememodname[slideshow/flash] means ``the module implemented @racketmodname[slideshow/flash] means ``the module implemented
in the file @filepath{flash.ss} that is located in the in the file @filepath{flash.rkt} that is located in the
@filepath{slideshow} collection.'' When a module name includes @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 @item{Some modules are distributed through the
@link[url:planet]{@PLaneT} server, and they can be @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: that you evaluate the following fragment:
@mr-def+int[ @mr-def+int[
(require (planet "random.ss" ("schematics" "random.plt" 1 0))) (require (planet "random.rkt" ("schematics" "random.plt" 1 0)))
(random-gaussian) (random-gaussian)
] ]
DrRacket automatically downloads version 1.0 of the DrRacket automatically downloads version 1.0 of the
@filepath{random.plt} library and then imports 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 @item{Some modules live relative to other modules, without
necessarily belonging to any particular collection or package. necessarily belonging to any particular collection or package.
For example, in DrRacket, if you save your definitions so far in a 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 then you can open a new tab or window in DrRacket, type the new
program @filepath{use.ss} in the same directory as program @filepath{use.rkt} in the same directory as
@filepath{quick.ss}: @filepath{quick.rkt}:
@schememod[ @racketmod[
scheme racket
(require "quick.ss") (require "quick.rkt")
(rainbow (square 5)) (rainbow (square 5))
] ]
and when you run @filepath{use.ss}, a rainbow list of squares and when you run @filepath{use.rkt}, a rainbow list of squares
is the output. Note that @filepath{use.ss} is written using is the output. Note that @filepath{use.rkt} is written using
the initial import @schememodname[scheme], which does not the initial import @racketmodname[racket], which does not
supply any picture-making functions itself---but does provide 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 Racketeers typically write new programs and libraries as modules that
import each other through relative paths, and that use existing 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 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 as a @PLaneT package or distributed in the more old-fashioned way as
an installable collection archive (in either case without modifying 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 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, 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 creating pictures; the bit between the opening parenthesis with
@scheme[code] is not an expression, but instead manipulated by the @racket[code] is not an expression, but instead manipulated by the
@scheme[code] syntactic form. @racket[code] syntactic form.
This helps explain what we meant in the previous section when we said 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 function-calling syntax. Libraries are not restricted to exporting
values, such as functions; they can also define new syntactic values, such as functions; they can also define new syntactic
forms. In this sense, Racket isn't exactly a language at all; it's 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. it or create entirely new languages.
One way to introduce a new syntactic form is through 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[ @mr-def+int[
(define-syntax pict+code (define-syntax pict+code
@ -479,27 +477,27 @@ One way to introduce a new syntactic form is through
(pict+code (circle 10)) (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 is a pattern for uses of the macro; instances of the pattern in a
program are replaced by instances of the corresponding template, which program are replaced by instances of the corresponding template, which
is @scheme[(hc-append 10 expr (code expr))]. In particular, is @racket[(hc-append 10 expr (code expr))]. In particular,
@scheme[(pict+code (circle 10))] matches the pattern with @racket[(pict+code (circle 10))] matches the pattern with
@scheme[(circle 10)] as @scheme[expr], so it is replaced with @racket[(circle 10)] as @racket[expr], so it is replaced with
@scheme[(hc-append 10 (circle 10) (code (circle 10)))]. @racket[(hc-append 10 (circle 10) (code (circle 10)))].
Of course, the sword of syntactic extension cuts both ways: inventing 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 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 others to understand. As it happens, the developers of Racket are
constantly giving talks and writing papers that involve Racket code, constantly giving talks and writing papers that involve Racket code,
and it's worthwhile for everyone who works on those products to know 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"] 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 @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 like Racket; nevertheless, we build this document by running its
source as a Racket program. We have to use a lot more than 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. 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 An object system is another example of a sophisticated language
extension that is worth learning and using for Racket users. Objects extension that is worth learning and using for Racket users. Objects
are sometimes better than functions, even when you have 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 interfaces. The API for Racket's GUI and graphics system is expressed
in terms of objects and classes. in terms of objects and classes.
The class system itself is implemented by the The class system itself is implemented by the
@schememodname[scheme/class] library, and the @racketmodname[racket/class] library, and the
@schememodname[scheme/gui/base] library provides the GUI and drawing @racketmodname[racket/gui/base] library provides the GUI and drawing
classes. By convention, the classes are given names that end with classes. By convention, the classes are given names that end with
@scheme[%]: @racket[%]:
@mr-defs+int[ @mr-defs+int[
[(require scheme/class scheme/gui/base) [(require racket/class racket/gui/base)
(define f (new frame% [label "My Art"] (define f (new frame% [label "My Art"]
[width 300] [width 300]
[height 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)) @(mr-interaction-eval (send f show #f))
The @scheme[new] form creates an instance of a class, where The @racket[new] form creates an instance of a class, where
initialization arguments like @scheme[label] and @scheme[width] are initialization arguments like @racket[label] and @racket[width] are
provided by name. The @scheme[send] form calls a method of the object, provided by name. The @racket[send] form calls a method of the object,
such as @scheme[show], with arguments after the method name; the such as @racket[show], with arguments after the method name; the
argument @scheme[#t] in this case is the boolean constant ``true.'' 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 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 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 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: picture into a canvas:
@mr-def+int[ @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 This introduction to Racket purposely avoids many of the
traditional ways of introducing and distinguishing Lisp or Racket: traditional ways of introducing and distinguishing Lisp or Racket:
prefix arithmetic notation, symbols, quoting and quasiquoting lists, prefix arithmetic notation, symbols, quoting and quasiquoting lists,
@scheme[eval], first-class continuations, and the idea that all syntax @racket[eval], first-class continuations, and the idea that all syntax
is really just a @scheme[lambda] in disguise. While those are all part 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 of Racket, they are not the main ingredients of day-to-day programming
in Racket. in Racket.

View File

@ -1,16 +1,16 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/async-channel)) (for-label racket/async-channel))
@(define async-eval @(define async-eval
(lambda () (lambda ()
(let ([the-eval (make-base-eval)]) (let ([the-eval (make-base-eval)])
(the-eval '(require scheme/async-channel)) (the-eval '(require racket/async-channel))
the-eval))) the-eval)))
@title[#:tag "async-channel"]{Buffered Asynchronous Channels} @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"].} @margin-note/ref{See also @secref["threadmbox"].}

View File

@ -218,7 +218,7 @@ values. For opaque structure types, @scheme[equal?] is the same as
@section{Boolean Synonyms} @section{Boolean Synonyms}
@note-lib[scheme/bool] @note-lib[racket/bool]
@defthing[true boolean?]{A synonym for @scheme[#t].} @defthing[true boolean?]{A synonym for @scheme[#t].}

View File

@ -1,8 +1,8 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
scheme/class racket/class
(for-syntax scheme/base) (for-syntax racket/base)
(for-label scheme/trait)) (for-label racket/trait))
@(begin @(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} @title[#:tag "mzlib:class" #:style 'toc]{Classes and Objects}
@guideintro["classes"]{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 A @deftech{class} specifies
@ -1275,7 +1275,7 @@ Evaluation of a @scheme[mixin] form checks that the
@section[#:tag "trait"]{Traits} @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 @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 a @tech{mixin} and then applied to a @tech{class}. Before a trait is

View File

@ -1,10 +1,10 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/cmdline)) (for-label racket/cmdline))
@title{Command-Line Parsing} @title{Command-Line Parsing}
@note-lib[scheme/cmdline] @note-lib[racket/cmdline]
@defform/subs[#:literals (multi once-each once-any final jelp-labels args @defform/subs[#:literals (multi once-each once-any final jelp-labels args
help-labels =>) help-labels =>)

View File

@ -6,7 +6,7 @@
PLT Scheme supports multiple threads of control within a program, PLT Scheme supports multiple threads of control within a program,
thread-local storage, some primitive synchronization mechanisms, and a thread-local storage, some primitive synchronization mechanisms, and a
framework for composing synchronization abstractions. In addition, the 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. to improve performance.
@local-table-of-contents[] @local-table-of-contents[]

View File

@ -5,7 +5,7 @@
@(define contract-eval @(define contract-eval
(lambda () (lambda ()
(let ([the-eval (make-base-eval)]) (let ([the-eval (make-base-eval)])
(the-eval '(require scheme/contract)) (the-eval '(require racket/contract))
the-eval))) the-eval)))
@title[#:tag "contracts" #:style 'toc]{Contracts} @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 @scheme[provide/contract] and the contract system enforces those
constraints. 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/base
racket/contract/private/guts racket/contract/private/guts
racket/contract/private/misc racket/contract/private/misc

View File

@ -1,17 +1,17 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require (except-in "mz.ss" set)
(for-label scheme/control)) (for-label racket/control))
@title{Classical Control Operators} @title{Classical Control Operators}
@note-lib-only[scheme/control] @note-lib-only[racket/control]
@(define control-eval @(define control-eval
(let ([the-eval (make-base-eval)]) (let ([the-eval (make-base-eval)])
(the-eval '(require scheme/control)) (the-eval '(require racket/control))
the-eval)) 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 from the research literature on higher-order control operators, plus a
few extra convenience forms. These control operators are implemented few extra convenience forms. These control operators are implemented
in terms of @scheme[call-with-continuation-prompt], in terms of @scheme[call-with-continuation-prompt],

View File

@ -1,19 +1,19 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-syntax scheme/base) (for-syntax racket/base)
(for-label scheme/serialize)) (for-label racket/serialize))
@(define posn-eval (make-base-eval)) @(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]} @guideintro["define-struct"]{@scheme[define-struct]}
@defform/subs[(define-struct id-maybe-super (field ...) @defform/subs[(struct id maybe-super (field ...)
struct-option ...) struct-option ...)
([id-maybe-super id ([maybe-super code:blank
(id super-id)] super-id]
[field field-id [field field-id
[field-id field-option ...]] [field-id field-option ...]]
[struct-option #:mutable [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 structure type if @scheme[#:prefab] is specified), and binds
transformers and variables related to the @tech{structure type}. 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: to @math{4+2n} names:
@itemize[ @itemize[
@ -42,16 +42,15 @@ to @math{4+2n} names:
@item{@schemeidfont{struct:}@scheme[id], a @deftech{structure type @item{@schemeidfont{struct:}@scheme[id], a @deftech{structure type
descriptor} value that represents the @tech{structure type}.} descriptor} value that represents the @tech{structure type}.}
@item{@scheme[constructor-id] (which defaults to @item{@scheme[constructor-id] (which defaults to @scheme[id]), a
@schemeidfont{make-}@scheme[id]), a @deftech{constructor} @deftech{constructor} procedure that takes @math{m} arguments
procedure that takes @math{m} arguments and returns a new and returns a new instance of the @tech{structure type}, where
instance of the @tech{structure type}, where @math{m} is the @math{m} is the number of @scheme[field]s that do not include
number of @scheme[field]s that do not include an an @scheme[#:auto] option.}
@scheme[#:auto] option.}
@item{@scheme[id]@schemeidfont{?}, a @deftech{predicate} procedure @item{@scheme[id]@schemeidfont{?}, a @deftech{predicate} procedure
that returns @scheme[#t] for instances of the @tech{structure 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 @tech{constructor} for a subtype) and @scheme[#f] for any other
value.} 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[id] is not bound as a transformer. If the
@scheme[#:omit-define-values] option is supplied, then none of the @scheme[#:omit-define-values] option is supplied, then none of the
usual variables are bound, but @scheme[id] is bound. If both are 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)]. @scheme[(begin)].
If @scheme[#:auto] is supplied as a @scheme[field-option], then the If @scheme[#:auto] is supplied as a @scheme[field-option], then the
@ -147,27 +146,28 @@ For serialization, see @scheme[define-serializable-struct].
@defexamples[ @defexamples[
#:eval posn-eval #:eval posn-eval
(define-struct posn (x y [z #:auto]) (struct posn (x y [z #:auto])
#:auto-value 0 #:auto-value 0
#:transparent) #:transparent)
(make-posn 1 2) (posn 1 2)
(posn? (make-posn 1 2)) (posn? (posn 1 2))
(posn-y (make-posn 1 2)) (posn-y (posn 1 2))
] ]
@defs+int[ @defs+int[
#:eval posn-eval #:eval posn-eval
[(define-struct (color-posn posn) (hue) #:mutable) [(struct color-posn posn (hue) #:mutable)
(define cp (make-color-posn 1 2 "blue"))] (define cp (color-posn 1 2 "blue"))]
(color-posn-hue cp) (color-posn-hue cp)
cp cp
(set-posn-z! cp 3) (set-posn-z! cp 3)
]} ]}
@defform[(struct-field-index field-id)]{ @defform[(struct-field-index field-id)]{
This form can only appear as an expression within a 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[#:property], especially for a property like
@scheme[prop:procedure]. The result of a @scheme[struct-field-index] @scheme[prop:procedure]. The result of a @scheme[struct-field-index]
expression is an exact, non-negative integer that corresponds to the 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[ @defexamples[
#:eval posn-eval #:eval posn-eval
(define-struct mood-procedure (base rating) (struct mood-procedure (base rating)
#:property prop:procedure (struct-field-index base)) #:property prop:procedure (struct-field-index base))
(define happy+ (make-mood-procedure add1 10)) (define happy+ (mood-procedure add1 10))
(happy+ 2) (happy+ 2)
(mood-procedure-rating happy+) (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) @defform[(define-struct/derived (id . rest-form)
id-maybe-super (field ...) struct-option ...)]{ id-maybe-super (field ...) struct-option ...)]{

View File

@ -3,7 +3,7 @@
scribble/eval) scribble/eval)
@(define dict-eval (make-base-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} @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?]{ @defproc[(dict? [v any/c]) boolean?]{

View File

@ -1,6 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/port)) (for-label racket/port))
@title[#:tag "encodings"]{Encodings and Locales} @title[#:tag "encodings"]{Encodings and Locales}

View File

@ -1,10 +1,10 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/enter)) (for-label racket/enter))
@title[#:tag "enter"]{Interactive Module Loading} @title[#:tag "enter"]{Interactive Module Loading}
@note-init-lib[scheme/enter] @note-init-lib[racket/enter]
@defform*[[(enter! module-path) @defform*[[(enter! module-path)
(enter! #f)]]{ (enter! #f)]]{
@ -27,7 +27,7 @@ are first loaded (either directly or indirectly through transitive
@scheme[require]s) via @scheme[enter!]. @scheme[require]s) via @scheme[enter!].
After switching namespaces to the designated module, @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. that @scheme[enter!] can be used to switch namespaces again.
When it loads or re-loads a module from a file, @scheme[enter!] prints When it loads or re-loads a module from a file, @scheme[enter!] prints

View File

@ -1,7 +1,7 @@
#lang scribble/doc #lang scribble/doc
@(require scribble/struct @(require scribble/struct
scribble/scheme scribble/scheme
(for-syntax scheme/base) (for-syntax racket/base)
"mz.ss" "mz.ss"
"prog-steps.ss") "prog-steps.ss")

View File

@ -1,7 +1,7 @@
#lang scribble/doc #lang scribble/doc
@(require scribble/bnf @(require scribble/bnf
"mz.ss" "mz.ss"
(for-label scheme/fixnum)) (for-label racket/fixnum))
@title[#:tag "exns"]{Exceptions} @title[#:tag "exns"]{Exceptions}

View File

@ -1,6 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
scheme/file) racket/file)
@(begin @(begin
;; ignore expressions at the top-level so that they don't print #<void> ;; ignore expressions at the top-level so that they don't print #<void>
@ -12,8 +12,8 @@
(define file-eval (define file-eval
(lambda () (lambda ()
(let ([the-eval (make-base-eval)]) (let ([the-eval (make-base-eval)])
(the-eval '(require (for-syntax scheme/base) (the-eval '(require (for-syntax racket/base)
scheme/file)) racket/file))
(the-eval '(define some-file (make-temporary-file))) (the-eval '(define some-file (make-temporary-file)))
(the-eval '(define some-other-file (make-temporary-file))) (the-eval '(define some-other-file (make-temporary-file)))
the-eval))) the-eval)))

View File

@ -1,7 +1,7 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label framework/preferences (for-label framework/preferences
scheme/runtime-path racket/runtime-path
setup/dirs)) setup/dirs))
@title{Filesystem} @title{Filesystem}
@ -398,9 +398,9 @@ can be particularly slow under Windows.}
@;------------------------------------------------------------------------ @;------------------------------------------------------------------------
@section[#:tag "runtime-path"]{Declaring Paths Needed at Run Time} @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 accessing files and directories at run time using a path that are
usually relative to an enclosing source file. Unlike using usually relative to an enclosing source file. Unlike using
@scheme[collection-path], @scheme[define-runtime-path] exposes each @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. a distribution.
In addition to the bindings described below, 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 @tech{phase level} 1, since string constants are often used as
compile-time expressions with @scheme[define-runtime-path]. 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 relative path result from @scheme[expr] and adding it to a path for
the enclosing file (which is computed as described below). However, the enclosing file (which is computed as described below). However,
tools like the executable creator can also arrange (by colluding with 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 substituted in a generated executable. If @scheme[expr] produces an
absolute path, it is normally returned directly, but again may be absolute path, it is normally returned directly, but again may be
replaced by an executable creator. In all cases, the executable 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} @section[#:tag "file-lib"]{More File and Directory Utilities}
@note-lib[scheme/file] @note-lib[racket/file]
@defproc[(file->string [path path-string?] @defproc[(file->string [path path-string?]
[#:mode mode-flag (or/c 'binary 'text) 'binary]) [#:mode mode-flag (or/c 'binary 'text) 'binary])

View File

@ -1,18 +1,15 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme (for-label racket/future))
scheme/base
scheme/contract
scheme/future))
@(define future-eval (make-base-eval)) @(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} @title[#:tag "futures"]{Futures for Parallelism}
@guideintro["effective-futures"]{futures} @guideintro["effective-futures"]{futures}
@note-lib[scheme/future] @note-lib[racket/future]
@margin-note{Currently, parallel support for @scheme[future] is @margin-note{Currently, parallel support for @scheme[future] is
enabled by default for Windows, Linux x86/x86_64, and Mac OS X 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.} Scheme.}
The @scheme[future] and @scheme[touch] functions from 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. supported by the hardware and operation system.
In contrast to @scheme[thread], which provides concurrency for In contrast to @scheme[thread], which provides concurrency for
arbitrary computations without parallelism, @scheme[future] provides arbitrary computations without parallelism, @scheme[future] provides

View File

@ -2,9 +2,9 @@
@(require "mz.ss" @(require "mz.ss"
scribble/core scribble/core
scribble/html-properties scribble/html-properties
(for-label scheme/help (for-label racket/help
net/url net/url
scheme/gui)) racket/gui/base))
@; Beware of this hard-wired link to the main doc page: @; Beware of this hard-wired link to the main doc page:
@(define main-doc-page @(define main-doc-page
@ -18,7 +18,7 @@
@title{Interactive Help} @title{Interactive Help}
@note-init-lib[scheme/help] @note-init-lib[racket/help]
@deftogether[( @deftogether[(
@defidform[help] @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. documentation, but cannot or do not want to run the providing module.
@schemeblock[ @schemeblock[
(require scheme/gui) (code:comment @#,t{does not work in @exec{mzscheme}}) (require racket/gui) (code:comment @#,t{does not work in @exec{mzscheme}})
(require (for-label scheme/gui)) (code:comment @#,t{ok in @exec{mzscheme}}) (require (for-label racket/gui)) (code:comment @#,t{ok in @exec{mzscheme}})
(help frame%) (help frame%)
] ]
@ -82,7 +82,7 @@ The @scheme[(help id #:from module-path)] variant is similar to
@scheme[for-label] in a temporary namespace.) @scheme[for-label] in a temporary namespace.)
@schemeblock[ @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 The @scheme[(help #:search datum ...)] form is similar to

View File

@ -3,7 +3,7 @@
@title[#:tag "include"]{File Inclusion} @title[#:tag "include"]{File Inclusion}
@note-lib[scheme/include] @note-lib[racket/include]
@defform/subs[#:literals (file lib) @defform/subs[#:literals (file lib)
(include path-spec) (include path-spec)

View File

@ -1,18 +1,18 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/pretty (for-label racket/pretty
scheme/gui/base)) racket/gui/base))
@title{Init Libraries} @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 library is the default start-up library for MzScheme. It re-exports
the @schememodname[scheme], @schememodname[scheme/enter] and the @schememodname[scheme], @schememodname[racket/enter] and
@schememodname[scheme/help] libraries, and it sets @schememodname[racket/help] libraries, and it sets
@scheme[current-print] to use @scheme[pretty-print].} @scheme[current-print] to use @scheme[pretty-print].}
@defmodule*/no-declare[(scheme/gui/init)]{The @defmodule*/no-declare[(racket/gui/init)]{The
@schememodname[scheme/gui/init] library is the default start-up @schememodname[racket/gui/init] library is the default start-up
library for MrEd. It re-exports the @schememodname[scheme/init] and library for MrEd. It re-exports the @schememodname[racket/init] and
@schememodname[scheme/gui/base] libraries, and it sets @schememodname[racket/gui/base] libraries, and it sets
@scheme[current-load] to use @scheme[text-editor-load-handler].} @scheme[current-load] to use @scheme[text-editor-load-handler].}

View File

@ -1,59 +1,59 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss") @(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 evaluation, where each top-level form in the module body is separately
passed to @scheme[eval] in the same way as for @scheme[load]. passed to @scheme[eval] in the same way as for @scheme[load].
The namespace for evaluation shares the @tech{module registry} with 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 top-level environment, and it is initialized with the bindings of
@schememodname[scheme]. A single namespace is created for each @schememodname[scheme]. A single namespace is created for each
instance of the @schememodname[scheme/load] module (i.e., multiple instance of the @schememodname[racket/load] module (i.e., multiple
modules using the @schememodname[scheme/load] language share a modules using the @schememodname[racket/load] language share a
namespace). The @scheme[scheme/load] library exports only namespace). The @scheme[racket/load] library exports only
@schemeidfont{#%module-begin} and @schemeidfont{#%top-interaction} @schemeidfont{#%module-begin} and @schemeidfont{#%top-interaction}
forms that effectively swap in the evaluation namespace and call forms that effectively swap in the evaluation namespace and call
@scheme[eval]. @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 include @scheme[module] forms, so that running the following module
prints @schemeresultfont{5}: prints @schemeresultfont{5}:
@schememod[ @schememod[
scheme/load racket/load
(module m scheme/base (module m racket/base
(provide x) (provide x)
(define x 5)) (define x 5))
(module n scheme/base (module n racket/base
(require 'm) (require 'm)
(display x)) (display x))
(require 'n) (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 the current namespace, which means that @scheme[load] and
@scheme[eval] can see the definitions. For example, running the @scheme[eval] can see the definitions. For example, running the
following module prints @schemeresultfont{6}: following module prints @schemeresultfont{6}:
@schememod[ @schememod[
scheme/load racket/load
(define x 6) (define x 6)
(display (eval 'x)) (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 evaluated in the top level, bindings cannot be exported from the
module using @scheme[provide]. Similarly, since evaluation of the module using @scheme[provide]. Similarly, since evaluation of the
module-body forms is inherently dynamic, compilation of the module module-body forms is inherently dynamic, compilation of the module
provides essentially no benefit. For these reasons, use 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. forms only, and not for constructing larger programs.

View File

@ -1,6 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/cmdline)) (for-label racket/cmdline))
@title[#:tag "logging"]{Logging} @title[#:tag "logging"]{Logging}

View File

@ -1,9 +1,9 @@
#lang scheme/base #lang racket/base
(require scribble/scheme (require scribble/scheme
scribble/basic scribble/basic
scribble/struct scribble/struct
scribble/manual scribble/manual
(for-label scheme/base)) (for-label racket/base))
(provide parse-match-grammar) (provide parse-match-grammar)

View File

@ -1,10 +1,10 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
"match-grammar.ss" "match-grammar.ss"
scheme/match) racket/match)
@(define match-eval (make-base-eval)) @(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} @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 matching on Scheme values. See also @secref["regexp"] for information
on regular-expression matching on strings, bytes, and streams. 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 ...) @defform/subs[(match val-expr clause ...)
([clause [pat expr ...+] ([clause [pat expr ...+]

View File

@ -1,7 +1,7 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
scribble/scheme scribble/scheme
(for-label scheme/mpair)) (for-label racket/mpair))
@title[#:tag "mpairs"]{Mutable Pairs and Lists} @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} @section{Mutable List Functions}
@note-lib-only[scheme/mpair] @note-lib-only[racket/mpair]
For functions described in this section, contracts are not directly For functions described in this section, contracts are not directly
enforced. In particular, when a @tech{mutable list} is expected, enforced. In particular, when a @tech{mutable list} is expected,

View File

@ -1,17 +1,17 @@
(module mz scheme/base (module mz racket/base
(require scribble/struct (require scribble/struct
scribble/manual scribble/manual
scribble/eval scribble/eval
scribble/decode scribble/decode
scheme/contract racket/contract
"../icons.ss") "../icons.ss")
(provide (all-from-out scribble/manual) (provide (all-from-out scribble/manual)
(all-from-out scribble/eval) (all-from-out scribble/eval)
(all-from-out scheme/contract)) (all-from-out racket/contract))
(require (for-label scheme)) (require (for-label racket))
(provide (for-label (all-from-out scheme))) (provide (for-label (all-from-out racket)))
(provide mz-examples) (provide mz-examples)
(define mz-eval (make-base-eval)) (define mz-eval (make-base-eval))
@ -30,7 +30,7 @@
(syntax-rules () (syntax-rules ()
[(_ lib #:use-sources (src ...) . more) [(_ lib #:use-sources (src ...) . more)
(begin (begin
(declare-exporting lib scheme #:use-sources (src ...)) (declare-exporting lib racket #:use-sources (src ...))
(defmodule*/no-declare (lib) (defmodule*/no-declare (lib)
(t (make-collect-element (t (make-collect-element
#f null #f null
@ -39,8 +39,8 @@
"The bindings documented in this section are provided by the " "The bindings documented in this section are provided by the "
(schememodname lib) (schememodname lib)
" and " " and "
(schememodname scheme) (schememodname racket)
" libraries, but not " (schememodname scheme/base) " libraries, but not " (schememodname racket/base)
"." "."
. more)))] . more)))]
[(_ lib . more) [(_ lib . more)
@ -51,16 +51,16 @@
(syntax-rules () (syntax-rules ()
[(_ lib #:use-sources (src ...) . more) [(_ lib #:use-sources (src ...) . more)
(begin (begin
(declare-exporting lib scheme/init #:use-sources (src ...)) (declare-exporting lib racket/init #:use-sources (src ...))
(defmodule*/no-declare (lib) (defmodule*/no-declare (lib)
(t "The bindings documented in this section are provided by the " (t "The bindings documented in this section are provided by the "
(schememodname lib) (schememodname lib)
" and " " and "
(schememodname scheme/init) (schememodname racket/init)
" libraries, which means that they are available when " " libraries, which means that they are available when "
(exec "mzscheme") " is started with no command-line arguments." (exec "racket") " is started with no command-line arguments."
" They are not provided by " (schememodname scheme/base) " They are not provided by " (schememodname racket/base)
" or " (schememodname scheme) "." " or " (schememodname racket) "."
. more)))] . more)))]
[(_ lib . more) [(_ lib . more)
(note-init-lib lib #:use-sources () . more)])) (note-init-lib lib #:use-sources () . more)]))
@ -72,8 +72,8 @@
(defmodule lib #:use-sources (src ...) (defmodule lib #:use-sources (src ...)
(t "The bindings documented in this section are provided by the " (t "The bindings documented in this section are provided by the "
(schememodname lib) (schememodname lib)
" library, not " (schememodname scheme/base) " library, not " (schememodname racket/base)
" or " (schememodname scheme) " or " (schememodname racket)
"." "."
. more))] . more))]
[(_ lib . more) [(_ lib . more)

View File

@ -30,7 +30,7 @@ with @scheme[namespace-attach-module].}
@defproc[(make-base-empty-namespace) namespace?]{ @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 attached. The namespace's @tech{base phase} is the same as the
@tech{phase} in which the @scheme[make-base-empty-namespace] @tech{phase} in which the @scheme[make-base-empty-namespace]
function was created.} function was created.}
@ -38,7 +38,7 @@ function was created.}
@defproc[(make-base-namespace) namespace?]{ @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 @scheme[require]d into the top-level environment. The namespace's
@tech{base phase} is the same as the @tech{phase} in which the @tech{base phase} is the same as the @tech{phase} in which the
@scheme[make-base-namespace] function was created.} @scheme[make-base-namespace] function was created.}

View File

@ -8,7 +8,7 @@
@;------------------------------------------------------------------------ @;------------------------------------------------------------------------
@section[#:tag "tcp"]{TCP} @section[#:tag "tcp"]{TCP}
@note-lib[scheme/tcp] @note-lib[racket/tcp]
For information about TCP in general, see @italic{TCP/IP Illustrated, For information about TCP in general, see @italic{TCP/IP Illustrated,
Volume 1} by W. Richard Stevens. Volume 1} by W. Richard Stevens.
@ -257,7 +257,7 @@ port returned by @scheme[tcp-accept], @scheme[tcp-connect],
@;------------------------------------------------------------------------ @;------------------------------------------------------------------------
@section[#:tag "udp"]{UDP} @section[#:tag "udp"]{UDP}
@note-lib[scheme/udp] @note-lib[racket/udp]
For information about UDP in general, see @italic{TCP/IP Illustrated, For information about UDP in general, see @italic{TCP/IP Illustrated,
Volume 1} by W. Richard Stevens. Volume 1} by W. Richard Stevens.

View File

@ -1,15 +1,15 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
scheme/math racket/math
scribble/extract scribble/extract
(for-label scheme/math (for-label racket/math
scheme/flonum racket/flonum
scheme/fixnum racket/fixnum
scheme/unsafe/ops racket/unsafe/ops
scheme/require)) racket/require))
@(define math-eval (make-base-eval)) @(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} @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 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 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 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 Two fixnums that are @scheme[=] are also the same
according to @scheme[eq?]. Otherwise, the result of @scheme[eq?] according to @scheme[eq?]. Otherwise, the result of @scheme[eq?]
@ -875,9 +875,9 @@ is little-endian.}
@; ------------------------------------------------------------------------ @; ------------------------------------------------------------------------
@section{Inexact-Real (Flonum) Operations} @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 @scheme[fl+] that consume and produce only real @tech{inexact
numbers}, which are also known as @deftech{flonums}. Flonum-specific numbers}, which are also known as @deftech{flonums}. Flonum-specific
operations provide can better performance when used consistently, and 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 A @deftech{flvector} is like a @tech{vector}, but it holds only
inexact real numbers. This representation can be more compact, and inexact real numbers. This representation can be more compact, and
unsafe operations on @tech{flvector}s (see 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. 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 same kinds of values as an @tech{flvector}, but with extra
indirections that make f64vectors more convenient for working with indirections that make f64vectors more convenient for working with
foreign libraries. The lack of indirections make unsafe 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} @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 @scheme[fx+] that consume and produce only fixnums. The operations in
this library are meant to be safe versions of unsafe operations like this library are meant to be safe versions of unsafe operations like
@scheme[unsafe-fx+]. These safe operations are generally no faster @scheme[unsafe-fx+]. These safe operations are generally no faster
than using generic primitives like @scheme[+]. than using generic primitives like @scheme[+].
The expected use of the @schememodname[scheme/fixnum] library is for The expected use of the @schememodname[racket/fixnum] library is for
code where the @scheme[require] of @schememodname[scheme/fixnum] is code where the @scheme[require] of @schememodname[racket/fixnum] is
replaced with replaced with
@schemeblock[(require (filtered-in @schemeblock[(require (filtered-in
(λ (name) (regexp-replace #rx"unsafe-" name "")) (λ (name) (regexp-replace #rx"unsafe-" name ""))
scheme/unsafe/ops))] racket/unsafe/ops))]
to drop in unsafe versions of the library. Alternately, when to drop in unsafe versions of the library. Alternately, when
encountering crashes with code that uses unsafe fixnum operations, use 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[( @deftogether[(
@defproc[(fx+ [a fixnum?][b fixnum?]) fixnum?] @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} @section{Extra Constants and Functions}
@note-lib[scheme/math] @note-lib[racket/math]
@defthing[pi real]{ @defthing[pi real]{

View File

@ -1,13 +1,13 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/package)) (for-label racket/package))
@(define pack-eval (make-base-eval)) @(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], ...} @title[#:tag "package"]{Limiting Scope: @scheme[define-package], @scheme[open-package], ...}
@note-lib-only[scheme/package] @note-lib-only[racket/package]
@deftogether[( @deftogether[(
@defform[(define-package package-id exports form ...)] @defform[(define-package package-id exports form ...)]
@ -129,7 +129,7 @@ cookies
The @scheme[package?], @scheme[package-exported-identifiers], and The @scheme[package?], @scheme[package-exported-identifiers], and
@scheme[package-original-identifiers] functions are exported @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 The @scheme[package?] predicate returns @scheme[#t] if @scheme[v] is a
package value as obtained by @scheme[syntax-local-value] on an package value as obtained by @scheme[syntax-local-value] on an

View File

@ -1,9 +1,9 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
scribble/scheme scribble/scheme
scheme/generator racket/generator
scheme/list racket/list
(for-syntax scheme/base)) (for-syntax racket/base))
@(define (generate-c_r-example proc) @(define (generate-c_r-example proc)
(define (make-it start n) (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} @section{Additional List Functions and Synonyms}
@note-lib[scheme/list] @note-lib[racket/list]
@(define list-eval (make-base-eval)) @(define list-eval (make-base-eval))
@(interaction-eval #:eval list-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. @defthing[empty null?]{The empty list.
@mz-examples[#:eval list-eval @mz-examples[#:eval list-eval

View File

@ -256,7 +256,7 @@ Windows examples.
(build-path p2 p1) (build-path p2 p1)
(code:comment @#,t{Unix and Windows: raises @scheme[exn:fail:contract]; @scheme[p1] is absolute}) (code:comment @#,t{Unix and Windows: raises @scheme[exn:fail:contract]; @scheme[p1] is absolute})
(build-path p1 p2) (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"]}) (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} @section{More Path Utilities}
@note-lib[scheme/path] @note-lib[racket/path]
@defproc[(explode-path [path (or/c path-string? path-for-some-system?)]) @defproc[(explode-path [path (or/c path-string? path-for-some-system?)])
(listof (or/c path-for-some-system? 'up 'same))]{ (listof (or/c path-for-some-system? 'up 'same))]{

View File

@ -1,10 +1,10 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/port)) (for-label racket/port))
@title[#:tag "port-lib"]{More Port Constructors, Procedures, and Events} @title[#:tag "port-lib"]{More Port Constructors, Procedures, and Events}
@note-lib[scheme/port] @note-lib[racket/port]
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
@title[#:tag "pretty-print"]{Pretty Printing} @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)]) @defproc[(pretty-print [v any/c] [port output-port? (current-output-port)])
void?]{ void?]{

View File

@ -453,7 +453,7 @@ and @scheme[v2], and its result is returned by
A @idefterm{primitive procedure} is a built-in procedure that is A @idefterm{primitive procedure} is a built-in procedure that is
implemented in low-level language. Not all procedures of 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. distinction is mainly useful to other low-level code.
@defproc[(primitive? [v any/c]) boolean?]{ @defproc[(primitive? [v any/c]) boolean?]{
@ -479,9 +479,9 @@ applied.}
@; ---------------------------------------- @; ----------------------------------------
@section{Additional Procedure Functions} @section{Additional Procedure Functions}
@note-lib[scheme/function] @note-lib[racket/function]
@(define fun-eval (make-base-eval)) @(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?]{ @defproc[(const [v any]) procedure?]{

View File

@ -1,10 +1,10 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/promise)) (for-label racket/promise))
@title{Delayed Evaluation} @title{Delayed Evaluation}
@note-lib[scheme/promise] @note-lib[racket/promise]
A @deftech{promise} encapsulates an expression to be evaluated on A @deftech{promise} encapsulates an expression to be evaluated on
demand via @scheme[force]. After a promise has been @scheme[force]d, demand via @scheme[force]. After a promise has been @scheme[force]d,

View File

@ -1,10 +1,10 @@
(module reader-example scheme/base (module reader-example racket/base
(require scribble/struct (require scribble/struct
scribble/decode scribble/decode
scribble/manual scribble/manual
scribble/scheme scribble/scheme
scheme/class) racket/class)
(provide reader-examples (provide reader-examples
read-quote-table read-quote-table

View File

@ -4,7 +4,7 @@
scribble/html-properties scribble/html-properties
scribble/latex-properties scribble/latex-properties
scribble/core scribble/core
scheme/list) racket/list)
@(define (scheme-extra-libs) @(define (scheme-extra-libs)
(make-delayed-element (make-delayed-element
@ -25,16 +25,16 @@
(make-css-addition "extras.css") (make-css-addition "extras.css")
(make-tex-addition "extras.tex")))) (make-tex-addition "extras.tex"))))
@title[#:style (extras)]{@bold{Reference}: PLT Scheme} @title[#:style (extras)]{@bold{Reference}: Racket}
@author["Matthew Flatt" "PLT"] @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 most prominent libraries. The companion manual @|Guide| provides a
friendlier (though less precise and less complete) overview of the friendlier (though less precise and less complete) overview of the
language. language.
@defmodulelang*[(scheme/base scheme) @defmodulelang*[(racket/base racket)
;; Use sources for overlap with `mzscheme': ;; Use sources for overlap with `mzscheme':
#:use-sources ('#%kernel #:use-sources ('#%kernel
racket/private/more-scheme racket/private/more-scheme
@ -44,14 +44,15 @@ language.
racket/private/letstx-scheme racket/private/letstx-scheme
racket/private/define racket/private/define
racket/private/stx racket/private/stx
racket/private/map)]{ racket/private/map
racket/private/base)]{
Unless otherwise noted, the bindings defined in this manual are 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.} languages.}
@margin-note{The @schememodname[scheme] library combines @margin-note{The @schememodname[racket] library combines
@schememodname[scheme/base]@scheme-extra-libs[].} @schememodname[racket/base]@scheme-extra-libs[].}
@table-of-contents[] @table-of-contents[]

View File

@ -2,9 +2,9 @@
@(require "mz.ss" @(require "mz.ss"
scheme/sandbox scheme/sandbox
(for-label scheme/sandbox (for-label scheme/sandbox
scheme/port racket/port
(only-in scheme/gui make-gui-namespace) (only-in racket/gui make-gui-namespace)
scheme/gui/dynamic)) racket/gui/dynamic))
@(define box-eval (make-base-eval)) @(define box-eval (make-base-eval))
@(interaction-eval #:eval box-eval (require scheme/sandbox)) @(interaction-eval #:eval box-eval (require scheme/sandbox))
@ -138,9 +138,9 @@ top-level namespace:
#:eval box-eval #:eval box-eval
(define base-module-eval (define base-module-eval
(code:comment @#,t{a module cannot have free variables...}) (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 (define base-module-eval
(make-evaluator 'scheme/base '(define (f) later) (make-evaluator 'racket/base '(define (f) later)
'(define later 5))) '(define later 5)))
(base-module-eval '(f)) (base-module-eval '(f))
@ -163,7 +163,7 @@ restriction is enforced).
@schemeblock[ @schemeblock[
(define base-module-eval2 (define base-module-eval2
(code:comment @#,t{equivalent to @scheme[base-module-eval]:}) (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 (f) later)
(define later 5)))) (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 some cases you can get the evaluator function available inside the
sandboxed code, for example: sandboxed code, for example:
@schemeblock[ @schemeblock[
(let ([e (make-evaluator 'scheme/base)]) (let ([e (make-evaluator 'racket/base)])
(e (,e 1))) (e (,e 1)))
] ]
An error will be signalled in such cases. 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: example, here is a quick implementation of a networked REPL:
@schemeblock[ @schemeblock[
(define e (make-evaluator 'scheme/base)) (define e (make-evaluator 'racket/base))
(let-values ([(i o) (tcp-accept (tcp-listen 9999))]) (let-values ([(i o) (tcp-accept (tcp-listen 9999))])
(parameterize ([current-input-port i] (parameterize ([current-input-port i]
[current-output-port o] [current-output-port o]
@ -250,7 +250,7 @@ used from a module (by using a new namespace):
[sandbox-error-output o] [sandbox-error-output o]
[current-namespace (make-empty-namespace)]) [current-namespace (make-empty-namespace)])
(parameterize ([current-eval (parameterize ([current-eval
(make-evaluator 'scheme/base)]) (make-evaluator 'racket/base)])
(read-eval-print-loop)) (read-eval-print-loop))
(fprintf o "\nBye...\n") (fprintf o "\nBye...\n")
(close-output-port o))) (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, as well as from the interaction will count against the
sandbox limit. For example, in the last interaction of this code, sandbox limit. For example, in the last interaction of this code,
@schemeblock[ @schemeblock[
(define e (make-evaluator 'scheme/base)) (define e (make-evaluator 'racket/base))
(e '(define a 1)) (e '(define a 1))
(e '(for ([i (in-range 20)]) (set! a (cons (make-bytes 500000) a)))) (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)]. in future versions). The default is @scheme[(list 30 20)].
Note that these limits apply to the creation of the sandbox 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, fail if the limits are strict enough. For example,
@schemeblock[ @schemeblock[
(parameterize ([sandbox-eval-limits '(0.25 5)]) (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 will throw an error instead of creating an evaluator. Therefore, to
avoid surprises you need to catch errors that happen when the sandbox avoid surprises you need to catch errors that happen when the sandbox
@ -878,7 +878,7 @@ your own permissions, for example,
@defthing[gui? boolean?]{ @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?]. otherwise; see @scheme[gui-available?].
Various aspects of the @schememodname[scheme/sandbox] library change Various aspects of the @schememodname[scheme/sandbox] library change

View File

@ -1,13 +1,13 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-syntax scheme/base) (for-syntax racket/base)
scribble/scheme scribble/scheme
(for-label scheme/generator)) (for-label racket/generator))
@(define generator-eval @(define generator-eval
(lambda () (lambda ()
(let ([the-eval (make-base-eval)]) (let ([the-eval (make-base-eval)])
(the-eval '(require scheme/generator)) (the-eval '(require racket/generator))
the-eval))) the-eval)))
@(define (info-on-seq where what) @(define (info-on-seq where what)
@ -324,7 +324,7 @@ sequence; if no more elements are available, the
@exnraise[exn:fail:contract].} @exnraise[exn:fail:contract].}
@section{Iterator Generators} @section{Iterator Generators}
@defmodule[scheme/generator] @defmodule[racket/generator]
@defform[(generator () body ...)]{ Creates a function that returns a @defform[(generator () body ...)]{ Creates a function that returns a
value through @scheme[yield], each time it is invoked. When value through @scheme[yield], each time it is invoked. When
the generator runs out of values to yield, the last value it computed the generator runs out of values to yield, the last value it computed

View File

@ -1,14 +1,14 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
scheme/serialize racket/serialize
(for-label scheme/serialize)) (for-label racket/serialize))
@(define ser-eval (make-base-eval)) @(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} @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?]{ @defproc[(serializable? [v any/c]) boolean?]{

View File

@ -1,6 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/set)) (for-label racket/set))
@title[#:tag "sets"]{Sets} @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. unpredictable when keys are mutated.
@note-lib-only[scheme/set] @note-lib[racket/set]
@defproc[(set? [v any/c]) boolean?]{ @defproc[(set? [v any/c]) boolean?]{

View File

@ -1,12 +1,12 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
scribble/struct scribble/struct
scheme/shared racket/shared
(for-label scheme/shared)) (for-label racket/shared))
@(define shared-eval (make-base-eval)) @(define shared-eval (make-base-eval))
@(interaction-eval #:eval shared-eval (require scheme/shared)) @(interaction-eval #:eval shared-eval (require racket/shared))
@(define maker @(define maker
(make-element #f (list (make-element #f (list
@ -20,7 +20,7 @@
@title[#:tag "shared"]{Constructing Graphs: @scheme[shared]} @title[#:tag "shared"]{Constructing Graphs: @scheme[shared]}
@note-lib[scheme/shared] @note-lib[racket/shared]
@defform[(shared ([id expr] ...) body ...+)]{ @defform[(shared ([id expr] ...) body ...+)]{

View File

@ -1,17 +1,17 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/splicing (for-label racket/splicing
scheme/stxparam racket/stxparam
scheme/local)) racket/local))
@(define splice-eval (make-base-eval)) @(define splice-eval (make-base-eval))
@interaction-eval[#:eval splice-eval (require scheme/splicing @interaction-eval[#:eval splice-eval (require racket/splicing
scheme/stxparam racket/stxparam
(for-syntax scheme/base))] (for-syntax racket/base))]
@title[#:tag "splicing"]{Local Binding with Splicing Body} @title[#:tag "splicing"]{Local Binding with Splicing Body}
@note-lib-only[scheme/splicing] @note-lib-only[racket/splicing]
@deftogether[( @deftogether[(
@defidform[splicing-let] @defidform[splicing-let]

View File

@ -1,8 +1,8 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
scribble/bnf scribble/bnf
(for-label scheme/pretty (for-label racket/pretty
scheme/gui/base)) racket/gui/base))
@(define (FlagFirst n) (as-index (Flag n))) @(define (FlagFirst n) (as-index (Flag n)))
@(define (DFlagFirst n) (as-index (DFlag 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[ @itemize[
@item{MzScheme, which provides the primitives libraries on which @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 OS X, the executable is called
@as-index{@exec{mzscheme}}. Under Windows, the executable is @as-index{@exec{mzscheme}}. Under Windows, the executable is
called @as-index{@exec{MzScheme.exe}}.} called @as-index{@exec{MzScheme.exe}}.}
@item{MrEd, which extends @exec{mzscheme} with GUI primitives on @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 Unix, the executable is called @as-index{@exec{mred}}. Under
Windows, the executable is called Windows, the executable is called
@as-index{@exec{MrEd.exe}}. Under Mac OS X, the @exec{mred} @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 that start with @schemeidfont{#%} are defined, but they are not meant
for direct use, and the set of such modules can change. For example, for direct use, and the set of such modules can change. For example,
the @indexed-scheme['#%kernel] module is eventually used to bootstrap the @indexed-scheme['#%kernel] module is eventually used to bootstrap
the implemetation of @schememodname[scheme/base], and the implemetation of @schememodname[racket/base], and
@scheme['#%mred-kernel] is used for @schememodname[scheme/gui/base]. @scheme['#%mred-kernel] is used for @schememodname[racket/gui/base].
The first action of MzScheme or MrEd is to initialize The first action of MzScheme or MrEd is to initialize
@scheme[current-library-collection-paths] to the result of @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 @Flag{S}/@DFlag{search}. An executable created from the MzScheme or
MrEd executable can embed paths used as @scheme[_pre-extras]. MrEd executable can embed paths used as @scheme[_pre-extras].
MzScheme and MrEd next @scheme[require] @schememodname[scheme/init] MzScheme and MrEd next @scheme[require] @schememodname[racket/init]
and @schememodname[scheme/gui/init], respectively, but only if the and @schememodname[racket/gui/init], respectively, but only if the
command line does not specify a @scheme[require] flag command line does not specify a @scheme[require] flag
(@Flag{t}/@DFlag{require}, @Flag{l}/@DFlag{lib}, or (@Flag{t}/@DFlag{require}, @Flag{l}/@DFlag{lib}, or
@Flag{u}/@DFlag{require-script}) before any @scheme[eval], @Flag{u}/@DFlag{require-script}) before any @scheme[eval],
@ -199,8 +199,8 @@ flags:
instead of @scheme[graphical-read-eval-print-loop].} instead of @scheme[graphical-read-eval-print-loop].}
@item{@FlagFirst{n} or @DFlagFirst{no-lib} : Skips requiring the @item{@FlagFirst{n} or @DFlagFirst{no-lib} : Skips requiring the
initialization library (i.e., @schememodname[scheme/init] or initialization library (i.e., @schememodname[racket/init] or
@schememodname[scheme/gui/init], unless it is changed with the @schememodname[racket/gui/init], unless it is changed with the
@Flag{I} flag) when not otherwise disabled.} @Flag{I} flag) when not otherwise disabled.}
@item{@FlagFirst{v} or @DFlagFirst{version} : Shows @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. do not currently specify a run-time configuration action.
A @scheme['configure-runtime] query returns a list of vectors, instead A @scheme['configure-runtime] query returns a list of vectors, instead

View File

@ -364,9 +364,9 @@ allocated string).}
@; ---------------------------------------- @; ----------------------------------------
@section{Additional String Functions} @section{Additional String Functions}
@note-lib[scheme/string] @note-lib[racket/string]
@(define string-eval (make-base-eval)) @(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?]{ @defproc[(string-append* [str string?] ... [strs (listof string?)]) string?]{
@; Note: this is exactly the same description as the one for append* @; Note: this is exactly the same description as the one for append*

View File

@ -1,6 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/struct-info)) (for-label racket/struct-info))
@(define struct-eval (make-base-eval)) @(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 the set of fields that are listed in the signature for the structure
type. type.
@note-lib-only[scheme/struct-info] @note-lib-only[racket/struct-info]
@defproc[(struct-info? [v any/c]) boolean?]{ @defproc[(struct-info? [v any/c]) boolean?]{

View File

@ -1,12 +1,12 @@
#lang scribble/doc #lang scribble/doc
@(require "mz.ss" @(require "mz.ss"
(for-label scheme/stxparam (for-label racket/stxparam
scheme/stxparam-exptime racket/stxparam-exptime
scheme/splicing)) racket/splicing))
@title[#:tag "stxparam"]{Syntax Parameters} @title[#:tag "stxparam"]{Syntax Parameters}
@note-lib-only[scheme/stxparam] @note-lib-only[racket/stxparam]
@defform[(define-syntax-parameter id expr)]{ @defform[(define-syntax-parameter id expr)]{
@ -49,9 +49,9 @@ the target's value.}
@section{Syntax Parameter Inspection} @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]{ @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. @scheme[syntax-parameterize] form.
This binding is provided @scheme[for-syntax] by 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 transformer. It is provided normally by
@schememodname[scheme/stxparam-exptime].} @schememodname[racket/stxparam-exptime].}
@defproc[(make-parameter-rename-transformer [id-stx syntax?]) any]{ @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]. of @scheme[make-rename-transformer].
This binding is provided @scheme[for-syntax] by 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 transformer. It is provided normally by
@schememodname[scheme/stxparam-exptime].} @schememodname[racket/stxparam-exptime].}

View File

@ -6,7 +6,7 @@
@(define syntax-eval @(define syntax-eval
(lambda () (lambda ()
(let ([the-eval (make-base-eval)]) (let ([the-eval (make-base-eval)])
(the-eval '(require (for-syntax scheme/base))) (the-eval '(require (for-syntax racket/base)))
the-eval))) the-eval)))
@title[#:tag "stx-patterns"]{Pattern-Based Syntax Matching} @title[#:tag "stx-patterns"]{Pattern-Based Syntax Matching}
@ -80,9 +80,9 @@ A syntax object matches a @scheme[pattern] as follows:
@specsubform[(pattern ...+ . pattern)]{ @specsubform[(pattern ...+ . pattern)]{
The last @scheme[pattern] must not be a @scheme/form[(pattern ...)], The last @scheme[pattern] must not be a @racket/form[(pattern ...)],
@scheme/form[(pattern ...+ . pattern)], @scheme/form[(pattern ... pattern @racket/form[(pattern ...+ . pattern)], @racket/form[(pattern ... pattern
ellipses pattern ...)], or @scheme/form[(pattern ... pattern ellipses ellipses pattern ...)], or @racket/form[(pattern ... pattern ellipses
pattern ... . pattern)] form. pattern ... . pattern)] form.
Like the previous kind of pattern, but matches syntax objects that 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].} @scheme[const].}
@mz-examples[ @mz-examples[
(require (for-syntax scheme/base)) (require (for-syntax racket/base))
(define-syntax (swap stx) (define-syntax (swap stx)
(syntax-case stx () (syntax-case stx ()
[(_ a b) #'(let ([t a]) [(_ 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?]. @scheme[syntax-pattern-variable?].
The @scheme[syntax-pattern-variable?] procedure is provided The @scheme[syntax-pattern-variable?] procedure is provided
@scheme[for-syntax] by @schememodname[scheme/base].} @scheme[for-syntax] by @schememodname[racket/base].}

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