diff --git a/collects/2htdp/universe-syntax-parse.rkt b/collects/2htdp/universe-syntax-parse.rkt index 1d279cf316..f3b8412310 100644 --- a/collects/2htdp/universe-syntax-parse.rkt +++ b/collects/2htdp/universe-syntax-parse.rkt @@ -9,32 +9,42 @@ (printf "a positive number") rate0) - ;; String String Syntax[id] -> Syntax - (define (pre-post-name pre post name) + ;; Syntax String String Syntax[id] -> Syntax + (define (pre-post-name stx pre post name) (datum->syntax name (string->symbol (string-append pre (symbol->string (syntax-e name)) post)))) - (provide (all-defined-out))) - -(module clauses scheme + (provide (all-defined-out)) - (require syntax/parse (for-syntax scheme 'auxs unstable/syntax) + (define-syntax-rule + (define-kwd name) + (begin + (provide name) + (define-syntax (name . x) + (raise-syntax-error 'name "used out of context" x)))) + + (define-kwd on-tick) + + (define-kwd on-mouse)) + +(module clauses scheme + + (require syntax/parse 'auxs + (for-syntax scheme 'auxs unstable/syntax) (for-template scheme/base 'auxs)) + (provide define-clause) (define-syntax (define-clause stx) (syntax-case stx () [(_ name (proc p-ctc) (rate r-ctc) ...) - (with-syntax ([name-clause (pre-post-name "" "-clause" #'name)] + (with-syntax ([name-clause (pre-post-name stx "" "-clause" #'name)] [(rate0 ...) (generate-temporaries #'(rate ...))]) (with-syntax ([((thing ...) ...) #'((#:with rate #'(r-ctc rate0)) ...)]) #` (begin (provide name name-clause) - (define-syntax (name . x) - (raise-syntax-error 'name "used out of context" x)) - (define-syntax-class name-clause #:description (format "~a" 'name) #:literals (name) @@ -43,75 +53,33 @@ #:with (rate0 ...) (map (lambda (x) #'0) '(rate0 ...)) #:with proc #'(world->world proc0) thing ... ...) - (pattern (on-tick proc0:expr (~var rate0 expr) ...) + (pattern (name proc0:expr (~var rate0 expr) ...) #:with proc #'(world->world> proc0) thing ... ...)) )))])) (define-clause on-mouse (proc world-nat-nat-mouse->world)) - (define-clause on-tick (proc world->world) (rate (lambda (x) 1/28))) - - ;; --- on-tick --- - #| - (define-syntax (on-tick . x) - (raise-syntax-error 'on-tick "used out of context" x)) - - (define-syntax-class on-tick-clause - #:description "on tick" - #:literals (on-tick) - #:attributes (proc rate) - (pattern (on-tick proc0:expr) - #:with proc #'(world->world proc0) - #:with rate #'1/28) - (pattern (on-tick proc0:expr rate0:expr) - #:with proc #'(world->world> proc0) - #:with rate #'(positive-number> rate0))) - - (provide on-tick on-tick-clause) - |# - ;; --- on-draw --- - (define-syntax (on-draw . x) - (raise-syntax-error 'on-draw "used out of context" x)) - - (define-syntax-class on-draw-clause - #:description "on draw" - #:literals (on-draw) - #:attributes (proc width height) - (pattern (on-draw proc0:expr) - #:with proc #'(wrap worldxkey->world proc0) - #:with width #'#f - #:with height #'#f) - (pattern (on-draw proc0:expr width0:expr height0:expr) - #:with proc #'(worldxkey->world> proc0) - #:with width #'(natural-number> width0) - #:with height #'(natural-number> height0))) - - (provide on-draw on-draw-clause)) + (define-clause on-tick (proc world->world)) + ) (module utest scheme - (require (for-syntax syntax/parse 'clauses)) + (require 'clauses (for-syntax 'clauses syntax/parse) (for-template 'clauses)) (define-syntax (big-bang stx) (syntax-parse stx [(big-bang world0:expr - (~or (~optional otc:on-tick-clause) - ; (~optional omc:on-mouse-clause) - (~optional odc:on-draw-clause)) + (~or (~optional otk:on-tick-clause) + (~optional omc:on-mouse-clause)) ...) #`(printf "~s\n" '(bb world0 - #,(if (attribute otc) - #'otc.rate - #'1/28) - #,(if (attribute odc) - #'odc.proc - #''not-draw)))])) + #,(if (attribute omc) "mouse" "no mouse") + #,(if (attribute otk) "tick" "no tick")))])) - (big-bang 0) - (big-bang 1 (on-tick add1)) - (big-bang 2 (on-tick add1 1/2)) - (big-bang 3 (on-draw add1 1/2 1/3)) - ; (big-bang 4 (on-mouse add1 1 2)) + (big-bang 0) + (big-bang 1 (on-tick +) (on-mouse -)) + (big-bang 2 (on-tick +)) + (big-bang 3 (on-mouse +)) ) (require 'utest) \ No newline at end of file diff --git a/collects/compiler/commands/make.rkt b/collects/compiler/commands/make.rkt index 20b8ea9c5f..57ae63c1c4 100644 --- a/collects/compiler/commands/make.rkt +++ b/collects/compiler/commands/make.rkt @@ -30,7 +30,7 @@ [("--vv") "Very verbose mode" (verbose #t) (very-verbose #t)] - #:args file file)) + #:args (file . another-file) (cons file another-file))) (if (disable-deps) ;; Just compile one file: diff --git a/collects/compiler/decompile.rkt b/collects/compiler/decompile.rkt index c1d5f9cd77..e6d8e0aa48 100644 --- a/collects/compiler/decompile.rkt +++ b/collects/compiler/decompile.rkt @@ -92,7 +92,7 @@ (define (decompile-module mod-form stack) (match mod-form - [(struct mod (name self-modidx prefix provides requires body syntax-body unexported + [(struct mod (name srcname self-modidx prefix provides requires body syntax-body unexported max-let-depth dummy lang-info internal-context)) (let-values ([(globs defns) (decompile-prefix prefix)] [(stack) (append '(#%modvars) stack)] diff --git a/collects/compiler/zo-marshal.rkt b/collects/compiler/zo-marshal.rkt index a174d35642..0e8276b586 100644 --- a/collects/compiler/zo-marshal.rkt +++ b/collects/compiler/zo-marshal.rkt @@ -90,9 +90,10 @@ (define (traverse-module mod-form visit) (match mod-form - [(struct mod (name self-modidx prefix provides requires body syntax-body unexported + [(struct mod (name srcname self-modidx prefix provides requires body syntax-body unexported max-let-depth dummy lang-info internal-context)) (traverse-data name visit) + (traverse-data srcname visit) (traverse-data self-modidx visit) (traverse-prefix prefix visit) (for-each (lambda (f) (map (lambda (v) (traverse-data v visit)) (cdr f))) requires) @@ -431,7 +432,7 @@ (define (out-module mod-form out) (match mod-form - [(struct mod (name self-modidx prefix provides requires body syntax-body unexported + [(struct mod (name srcname self-modidx prefix provides requires body syntax-body unexported max-let-depth dummy lang-info internal-context)) (out-syntax MODULE_EXPD (let* ([lookup-req (lambda (phase) @@ -504,6 +505,7 @@ [l (list* #f #f l)] ; obsolete `functional?' info [l (cons lang-info l)] ; lang-info [l (cons self-modidx l)] + [l (cons srcname l)] [l (cons name l)]) (make-module-decl l)) out)])) diff --git a/collects/compiler/zo-parse.rkt b/collects/compiler/zo-parse.rkt index 37c3dcd2d6..801430206a 100644 --- a/collects/compiler/zo-parse.rkt +++ b/collects/compiler/zo-parse.rkt @@ -205,7 +205,7 @@ (define (read-module v) (match v - [`(,name ,self-modidx ,lang-info ,functional? ,et-functional? + [`(,name ,srcname ,self-modidx ,lang-info ,functional? ,et-functional? ,rename ,max-let-depth ,dummy ,prefix ,indirect-et-provides ,num-indirect-et-provides @@ -218,7 +218,7 @@ [`(,syntax-body ,body ,requires ,syntax-requires ,template-requires ,label-requires ,more-requires-count . ,more-requires) - (make-mod name self-modidx + (make-mod name srcname self-modidx prefix (let loop ([l phase-data]) (if (null? l) null diff --git a/collects/compiler/zo-structs.rkt b/collects/compiler/zo-structs.rkt index a1f8f982a8..2d2413594d 100644 --- a/collects/compiler/zo-structs.rkt +++ b/collects/compiler/zo-structs.rkt @@ -90,6 +90,7 @@ [max-let-depth exact-nonnegative-integer?])) (define-form-struct (mod form) ([name symbol?] + [srcname symbol?] [self-modidx module-path-index?] [prefix prefix?] [provides (listof (list/c (or/c exact-integer? #f) diff --git a/collects/drscheme/acks.rkt b/collects/drracket/acks.rkt similarity index 100% rename from collects/drscheme/acks.rkt rename to collects/drracket/acks.rkt diff --git a/collects/drscheme/arrow.rkt b/collects/drracket/arrow.rkt similarity index 100% rename from collects/drscheme/arrow.rkt rename to collects/drracket/arrow.rkt diff --git a/collects/drscheme/default-code-style.rkt b/collects/drracket/default-code-style.rkt similarity index 100% rename from collects/drscheme/default-code-style.rkt rename to collects/drracket/default-code-style.rkt diff --git a/collects/drscheme/doc.icns b/collects/drracket/doc.icns similarity index 100% rename from collects/drscheme/doc.icns rename to collects/drracket/doc.icns diff --git a/collects/drracket/drracket.creator b/collects/drracket/drracket.creator new file mode 100644 index 0000000000..8e31ad43ae --- /dev/null +++ b/collects/drracket/drracket.creator @@ -0,0 +1,2 @@ +DrSc +(This code is registered with Apple.) diff --git a/collects/drscheme/drscheme.filetypes b/collects/drracket/drracket.filetypes similarity index 100% rename from collects/drscheme/drscheme.filetypes rename to collects/drracket/drracket.filetypes diff --git a/collects/drracket/drracket.rkt b/collects/drracket/drracket.rkt new file mode 100644 index 0000000000..be94819ab1 --- /dev/null +++ b/collects/drracket/drracket.rkt @@ -0,0 +1,67 @@ +#lang racket/base +(require scheme/gui/base "private/key.rkt") + +(define debugging? (getenv "PLTDRDEBUG")) +(define profiling? (getenv "PLTDRPROFILE")) + +(define install-cm? (and (not debugging?) + (getenv "PLTDRCM"))) + +(define cm-trace? (or (equal? (getenv "PLTDRCM") "trace") + (equal? (getenv "PLTDRDEBUG") "trace"))) + + +;; the flush is only here to ensure that the output is +;; appears when running in cygwin under windows. +(define (flprintf fmt . args) + (apply printf fmt args) + (flush-output)) + +(when debugging? + (flprintf "PLTDRDEBUG: installing CM to load/create errortrace zos\n") + (let-values ([(zo-compile + make-compilation-manager-load/use-compiled-handler + manager-trace-handler) + (parameterize ([current-namespace (make-base-empty-namespace)] + [use-compiled-file-paths '()]) + (values + (dynamic-require 'errortrace/zo-compile 'zo-compile) + (dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler) + (dynamic-require 'compiler/cm 'manager-trace-handler)))]) + (current-compile zo-compile) + (use-compiled-file-paths (list (build-path "compiled" "errortrace"))) + (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) + (error-display-handler (dynamic-require 'errortrace/errortrace-lib + 'errortrace-error-display-handler)) + (when cm-trace? + (flprintf "PLTDRDEBUG: enabling CM tracing\n") + (manager-trace-handler + (λ (x) (display "1: ") (display x) (newline) (flush-output)))))) + +(when install-cm? + (flprintf "PLTDRCM: installing compilation manager\n") + (let-values ([(make-compilation-manager-load/use-compiled-handler + manager-trace-handler) + (parameterize ([current-namespace (make-base-empty-namespace)]) + (values + (dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler) + (dynamic-require 'compiler/cm 'manager-trace-handler)))]) + (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) + (when cm-trace? + (flprintf "PLTDRCM: enabling CM tracing\n") + (manager-trace-handler + (λ (x) (display "1: ") (display x) (newline) (flush-output)))))) + +(when profiling? + (flprintf "PLTDRPROFILE: installing profiler\n") + ;; NOTE that this might not always work. + ;; it creates a new custodian and installs it, but the + ;; original eventspace was created on the original custodian + ;; and this code does not create a new eventspace. + (let ([orig-cust (current-custodian)] + [orig-eventspace (current-eventspace)] + [new-cust (make-custodian)]) + (current-custodian new-cust) + ((dynamic-require 'drracket/private/profile-drs 'start-profile) orig-cust))) + +(dynamic-require 'drracket/private/drracket-normal #f) diff --git a/collects/drscheme/drscheme.utiexports b/collects/drracket/drracket.utiexports similarity index 100% rename from collects/drscheme/drscheme.utiexports rename to collects/drracket/drracket.utiexports diff --git a/collects/drracket/info.rkt b/collects/drracket/info.rkt new file mode 100644 index 0000000000..5d60e1b27a --- /dev/null +++ b/collects/drracket/info.rkt @@ -0,0 +1,10 @@ +#lang setup/infotab + +;(define tools '("sprof.rkt")) +;(define tool-names '("Sampling Profiler")) + +(define drracket-tools '("syncheck.rkt")) +(define drracket-tool-names '("Check Syntax")) + +(define gracket-launcher-names '("DrRacket")) +(define gracket-launcher-libraries '("drracket.rkt")) diff --git a/collects/drscheme/installer.rkt b/collects/drracket/installer.rkt similarity index 73% rename from collects/drscheme/installer.rkt rename to collects/drracket/installer.rkt index 2b6f6dd15e..1ffaaf40da 100644 --- a/collects/drscheme/installer.rkt +++ b/collects/drracket/installer.rkt @@ -14,8 +14,8 @@ (define (install-variation variant) (parameterize ([current-launcher-variant variant]) (make-mred-launcher - (list "-ZmvqL" "drscheme.rkt" "drscheme") + (list "-ZmvqL" "drracket.rkt" "drracket") (mred-program-launcher-path "DrScheme") (cons - `(exe-name . "DrScheme") - (build-aux-from-path (build-path (collection-path "drscheme") "drscheme")))))) + `(exe-name . "DrRacket") + (build-aux-from-path (build-path (collection-path "drracket") "drracket")))))) diff --git a/collects/drracket/main.rkt b/collects/drracket/main.rkt new file mode 100644 index 0000000000..1092b93c17 --- /dev/null +++ b/collects/drracket/main.rkt @@ -0,0 +1,2 @@ +#lang racket/base +(require "drracket.rkt") diff --git a/collects/drscheme/pltdoc.icns b/collects/drracket/pltdoc.icns similarity index 100% rename from collects/drscheme/pltdoc.icns rename to collects/drracket/pltdoc.icns diff --git a/collects/drscheme/private/app.rkt b/collects/drracket/private/app.rkt similarity index 100% rename from collects/drscheme/private/app.rkt rename to collects/drracket/private/app.rkt diff --git a/collects/drscheme/private/auto-language.rkt b/collects/drracket/private/auto-language.rkt similarity index 100% rename from collects/drscheme/private/auto-language.rkt rename to collects/drracket/private/auto-language.rkt diff --git a/collects/drscheme/private/bindings-browser.rkt b/collects/drracket/private/bindings-browser.rkt similarity index 100% rename from collects/drscheme/private/bindings-browser.rkt rename to collects/drracket/private/bindings-browser.rkt diff --git a/collects/drscheme/private/bitmap-message.rkt b/collects/drracket/private/bitmap-message.rkt similarity index 100% rename from collects/drscheme/private/bitmap-message.rkt rename to collects/drracket/private/bitmap-message.rkt diff --git a/collects/drscheme/private/debug.rkt b/collects/drracket/private/debug.rkt similarity index 100% rename from collects/drscheme/private/debug.rkt rename to collects/drracket/private/debug.rkt diff --git a/collects/drscheme/private/drscheme-normal.rkt b/collects/drracket/private/drracket-normal.rkt similarity index 95% rename from collects/drscheme/private/drscheme-normal.rkt rename to collects/drracket/private/drracket-normal.rkt index d3e3c3c7dd..e55b3f2d18 100644 --- a/collects/drscheme/private/drscheme-normal.rkt +++ b/collects/drracket/private/drracket-normal.rkt @@ -100,8 +100,8 @@ (cond [(or prince-kuhio-day? kamehameha-day?) (set-splash-progress-bar? #f) - (let ([size ((dynamic-require 'drscheme/private/palaka 'palaka-pattern-size) 4)]) - (vector (dynamic-require 'drscheme/private/honu-logo 'draw-honu) + (let ([size ((dynamic-require 'drracket/private/palaka 'palaka-pattern-size) 4)]) + (vector (dynamic-require 'drracket/private/honu-logo 'draw-honu) size size))] [texas-independence-day? @@ -134,10 +134,10 @@ (label "Break All Threads") (callback (λ (x y) - ((dynamic-require 'drscheme/private/key 'break-threads)))) + ((dynamic-require 'drracket/private/key 'break-threads)))) (parent f))]) (send f show #t))))) -(dynamic-require 'drscheme/tool-lib #f) +(dynamic-require 'drracket/tool-lib #f) (shutdown-splash) (close-splash) diff --git a/collects/drscheme/private/drsig.rkt b/collects/drracket/private/drsig.rkt similarity index 100% rename from collects/drscheme/private/drsig.rkt rename to collects/drracket/private/drsig.rkt diff --git a/collects/drscheme/private/eb.rkt b/collects/drracket/private/eb.rkt similarity index 100% rename from collects/drscheme/private/eb.rkt rename to collects/drracket/private/eb.rkt diff --git a/collects/drscheme/private/embedded-snip-utils.rkt b/collects/drracket/private/embedded-snip-utils.rkt similarity index 100% rename from collects/drscheme/private/embedded-snip-utils.rkt rename to collects/drracket/private/embedded-snip-utils.rkt diff --git a/collects/drscheme/private/eval.rkt b/collects/drracket/private/eval.rkt similarity index 100% rename from collects/drscheme/private/eval.rkt rename to collects/drracket/private/eval.rkt diff --git a/collects/drscheme/private/font.rkt b/collects/drracket/private/font.rkt similarity index 100% rename from collects/drscheme/private/font.rkt rename to collects/drracket/private/font.rkt diff --git a/collects/drscheme/private/frame.rkt b/collects/drracket/private/frame.rkt similarity index 100% rename from collects/drscheme/private/frame.rkt rename to collects/drracket/private/frame.rkt diff --git a/collects/drscheme/private/get-extend.rkt b/collects/drracket/private/get-extend.rkt similarity index 100% rename from collects/drscheme/private/get-extend.rkt rename to collects/drracket/private/get-extend.rkt diff --git a/collects/drscheme/private/help-desk.rkt b/collects/drracket/private/help-desk.rkt similarity index 100% rename from collects/drscheme/private/help-desk.rkt rename to collects/drracket/private/help-desk.rkt diff --git a/collects/drscheme/private/honu-logo.rkt b/collects/drracket/private/honu-logo.rkt similarity index 100% rename from collects/drscheme/private/honu-logo.rkt rename to collects/drracket/private/honu-logo.rkt diff --git a/collects/drscheme/private/init.rkt b/collects/drracket/private/init.rkt similarity index 100% rename from collects/drscheme/private/init.rkt rename to collects/drracket/private/init.rkt diff --git a/collects/drscheme/private/insert-large-letters.rkt b/collects/drracket/private/insert-large-letters.rkt similarity index 100% rename from collects/drscheme/private/insert-large-letters.rkt rename to collects/drracket/private/insert-large-letters.rkt diff --git a/collects/drscheme/private/key.rkt b/collects/drracket/private/key.rkt similarity index 100% rename from collects/drscheme/private/key.rkt rename to collects/drracket/private/key.rkt diff --git a/collects/drscheme/private/label-frame-mred.rkt b/collects/drracket/private/label-frame-mred.rkt similarity index 100% rename from collects/drscheme/private/label-frame-mred.rkt rename to collects/drracket/private/label-frame-mred.rkt diff --git a/collects/drscheme/private/language-configuration.rkt b/collects/drracket/private/language-configuration.rkt similarity index 98% rename from collects/drscheme/private/language-configuration.rkt rename to collects/drracket/private/language-configuration.rkt index 675e260200..df1f1dce5a 100644 --- a/collects/drscheme/private/language-configuration.rkt +++ b/collects/drracket/private/language-configuration.rkt @@ -1437,9 +1437,22 @@ (define/override (get-transformer-module) #f) (define/override (default-settings) - (make-simple-settings+assume #f 'write 'mixed-fraction-e #f #t 'debug #t)) + (make-simple-settings+assume #f 'trad-write 'mixed-fraction-e #f #t 'debug #t)) (super-new))) + + (define (pretty-big-mixin %) + (class % + (define/override (default-settings) + (let ([s (super default-settings)]) + (make-simple-settings+assume (drracket:language:simple-settings-case-sensitive s) + 'trad-write + (drracket:language:simple-settings-fraction-style s) + (drracket:language:simple-settings-show-sharing s) + (drracket:language:simple-settings-insert-newlines s) + (drracket:language:simple-settings-annotations s) + (simple-settings+assume-no-redef? s)))) + (super-new))) (define get-all-scheme-manual-keywords (let ([words #f]) @@ -1514,7 +1527,7 @@ (list -200 3) #t (string-constant pretty-big-scheme-one-line-summary) - (λ (%) (macro-stepper-mixin (assume-mixin (add-errortrace-key-mixin %)))))) + (λ (%) (pretty-big-mixin (macro-stepper-mixin (assume-mixin (add-errortrace-key-mixin %))))))) (add-language (make-simple '(lib "r5rs/lang.rkt") "plt:r5rs" diff --git a/collects/drscheme/private/language-object-contract.rkt b/collects/drracket/private/language-object-contract.rkt similarity index 98% rename from collects/drscheme/private/language-object-contract.rkt rename to collects/drracket/private/language-object-contract.rkt index 54d9a12677..61d6209fcd 100644 --- a/collects/drscheme/private/language-object-contract.rkt +++ b/collects/drracket/private/language-object-contract.rkt @@ -85,7 +85,7 @@ (define id (reconstitute #,ctc provide?)) #,@(if (syntax-e #'provide?) (list - #`(require/doc drscheme/private/recon) + #`(require/doc drracket/private/recon) #`(provide/doc (thing-doc id contract? diff --git a/collects/drscheme/private/language.rkt b/collects/drracket/private/language.rkt similarity index 94% rename from collects/drscheme/private/language.rkt rename to collects/drracket/private/language.rkt index 147ced6521..db3f1b4e0b 100644 --- a/collects/drscheme/private/language.rkt +++ b/collects/drracket/private/language.rkt @@ -161,7 +161,7 @@ (= (vector-length printable) (procedure-arity make-simple-settings)) (boolean? (vector-ref printable 0)) - (memq (vector-ref printable 1) '(constructor quasiquote write)) + (memq (vector-ref printable 1) '(constructor quasiquote write trad-write print)) (memq (vector-ref printable 2) '(mixed-fraction mixed-fraction-e @@ -172,7 +172,7 @@ (memq (vector-ref printable 5) '(none debug debug/profile test-coverage)) (apply make-simple-settings (vector->list printable)))) (define/public (default-settings) - (make-simple-settings #t 'write 'mixed-fraction-e #f #t 'debug)) + (make-simple-settings #t 'print 'mixed-fraction-e #f #t 'debug)) (define/public (default-settings? x) (equal? (simple-settings->vector x) (simple-settings->vector (default-settings)))) @@ -198,7 +198,7 @@ insert-newlines annotations)) ;; case-sensitive : boolean - ;; printing-style : (union 'write 'constructor 'quasiquote) + ;; printing-style : (union 'print 'write 'trad-write 'constructor 'quasiquote) ;; fraction-style : (union 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e) ;; show-sharing : boolean ;; insert-newlines : boolean @@ -267,18 +267,19 @@ (string-constant output-style-label) (list (string-constant constructor-printing-style) (string-constant quasiquote-printing-style) + (string-constant write-printing-style) (string-constant print-printing-style)) output-panel - (λ (rb evt) - (let ([on? (not (= (send rb get-selection) 3))]) - (send fraction-style enable on?) - (send show-sharing enable on?) - (send insert-newlines enable on?))) + (λ (rb evt) (enable-fraction-style)) '(horizontal vertical-label))] [fraction-style (make-object check-box% (string-constant decimal-notation-for-rationals) output-panel void)] + [enable-fraction-style + (lambda () + (let ([on? (member (send output-style get-selection) '(0 1))]) + (send fraction-style enable on?)))] [show-sharing (make-object check-box% (string-constant sharing-printing-label) output-panel @@ -299,7 +300,8 @@ (case (send output-style get-selection) [(0) 'constructor] [(1) 'quasiquote] - [(2) 'write]) + [(2) 'trad-write] + [(3) 'print]) (if (send fraction-style get-value) 'repeating-decimal-e 'mixed-fraction-e) @@ -320,7 +322,9 @@ (case (simple-settings-printing-style settings) [(constructor) 0] [(quasiquote) 1] - [(write) 2])) + [(write trad-write) 2] + [(print) 3])) + (enable-fraction-style) (send fraction-style set-value (eq? (simple-settings-fraction-style settings) 'repeating-decimal-e)) (send show-sharing set-value (simple-settings-show-sharing settings)) @@ -333,21 +337,28 @@ ;; simple-module-based-language-render-value/format : TST settings port (union #f (snip% -> void)) (union 'infinity number) -> void (define (simple-module-based-language-render-value/format value settings port width) - (let ([converted-value (simple-module-based-language-convert-value value settings)]) - (setup-printing-parameters - (λ () - (cond - [(simple-settings-insert-newlines settings) - (if (number? width) - (parameterize ([pretty-print-columns width]) - (pretty-print converted-value port)) - (pretty-print converted-value port))] - [else - (parameterize ([pretty-print-columns 'infinity]) - (pretty-print converted-value port)) - (newline port)])) - settings - width))) + (let-values ([(converted-value write?) + (call-with-values + (lambda () + (simple-module-based-language-convert-value value settings)) + (case-lambda + [(converted-value) (values converted-value #t)] + [(converted-value write?) (values converted-value write?)]))]) + (let ([pretty-out (if write? pretty-write pretty-print)]) + (setup-printing-parameters + (λ () + (cond + [(simple-settings-insert-newlines settings) + (if (number? width) + (parameterize ([pretty-print-columns width]) + (pretty-out converted-value port)) + (pretty-out converted-value port))] + [else + (parameterize ([pretty-print-columns 'infinity]) + (pretty-out converted-value port)) + (newline port)])) + settings + width)))) (define default-pretty-print-current-style-table (pretty-print-current-style-table)) @@ -415,11 +426,11 @@ (write-special (render-syntax/snip value) port)] [else (write-special (value->snip value) port)]))] [print-graph - ;; only turn on print-graph when using `write' printing - ;; style because the sharing is being taken care of + ;; only turn on print-graph when using `write' or `print' printing + ;; style, because the sharing is being taken care of ;; by the print-convert sexp construction when using ;; other printing styles. - (and (eq? (simple-settings-printing-style settings) 'write) + (and (memq (simple-settings-printing-style settings) '(write print)) (simple-settings-show-sharing settings))]) (thunk)))) @@ -429,7 +440,8 @@ ;; simple-module-based-language-convert-value : TST settings -> TST (define (simple-module-based-language-convert-value value settings) (case (simple-settings-printing-style settings) - [(write) value] + [(print) (values value #f)] + [(write trad-write) value] [(constructor) (parameterize ([constructor-style-printing #t] [show-sharing (simple-settings-show-sharing settings)] @@ -477,11 +489,16 @@ (global-port-print-handler (λ (value port) - (let ([converted-value (simple-module-based-language-convert-value value setting)]) + (let-values ([(converted-value write?) + (call-with-values + (lambda () (simple-module-based-language-convert-value value setting)) + (case-lambda + [(converted-value) (values converted-value #t)] + [(converted-value write?) (values converted-value write?)]))]) (setup-printing-parameters (λ () (parameterize ([pretty-print-columns 'infinity]) - (pretty-print converted-value port))) + ((if write? pretty-write pretty-print) converted-value port))) setting 'infinity)))) (current-inspector (make-inspector)) @@ -507,20 +524,18 @@ (define (render-value value port) (parameterize ([pretty-print-columns 'infinity]) - (pretty-print (convert-value value) port))) - - (define (convert-value value) - ,(case (simple-settings-printing-style setting) - [(write) `value] - [(constructor) - `(parameterize ([constructor-style-printing #t] - [show-sharing ,(simple-settings-show-sharing setting)]) - (print-convert value))] - [(quasiquote) - `(parameterize ([constructor-style-printing #f] - [show-sharing ,(simple-settings-show-sharing setting)]) - (print-convert value))])) - + ,(case (simple-settings-printing-style setting) + [(print) `(pretty-print value port)] + [(write trad-write) `(pretty-write value port)] + [(constructor) + `(parameterize ([constructor-style-printing #t] + [show-sharing ,(simple-settings-show-sharing setting)]) + (pretty-write (print-convert value) port))] + [(quasiquote) + `(parameterize ([constructor-style-printing #f] + [show-sharing ,(simple-settings-show-sharing setting)]) + (pretty-write (print-convert value) port))]))) + ,(if (memq (simple-settings-annotations setting) '(debug debug/profile test-coverage)) `(require errortrace) `(void)) @@ -1121,7 +1136,7 @@ ((if gui? make-mred-launcher make-mzscheme-launcher) (list (path->string - (build-path (collection-path "drscheme" "private") + (build-path (collection-path "drracket" "private") (if gui? "launcher-mred-bootstrap.rkt" "launcher-mz-bootstrap.rkt"))) diff --git a/collects/drscheme/private/launcher-bootstrap.rkt b/collects/drracket/private/launcher-bootstrap.rkt similarity index 100% rename from collects/drscheme/private/launcher-bootstrap.rkt rename to collects/drracket/private/launcher-bootstrap.rkt diff --git a/collects/drscheme/private/launcher-mred-bootstrap.rkt b/collects/drracket/private/launcher-mred-bootstrap.rkt similarity index 100% rename from collects/drscheme/private/launcher-mred-bootstrap.rkt rename to collects/drracket/private/launcher-mred-bootstrap.rkt diff --git a/collects/drscheme/private/launcher-mz-bootstrap.rkt b/collects/drracket/private/launcher-mz-bootstrap.rkt similarity index 100% rename from collects/drscheme/private/launcher-mz-bootstrap.rkt rename to collects/drracket/private/launcher-mz-bootstrap.rkt diff --git a/collects/drscheme/private/link.rkt b/collects/drracket/private/link.rkt similarity index 100% rename from collects/drscheme/private/link.rkt rename to collects/drracket/private/link.rkt diff --git a/collects/drscheme/private/main.rkt b/collects/drracket/private/main.rkt similarity index 100% rename from collects/drscheme/private/main.rkt rename to collects/drracket/private/main.rkt diff --git a/collects/drscheme/private/modes.rkt b/collects/drracket/private/modes.rkt similarity index 100% rename from collects/drscheme/private/modes.rkt rename to collects/drracket/private/modes.rkt diff --git a/collects/drscheme/private/module-browser.rkt b/collects/drracket/private/module-browser.rkt similarity index 100% rename from collects/drscheme/private/module-browser.rkt rename to collects/drracket/private/module-browser.rkt diff --git a/collects/drscheme/private/module-language-tools.rkt b/collects/drracket/private/module-language-tools.rkt similarity index 99% rename from collects/drscheme/private/module-language-tools.rkt rename to collects/drracket/private/module-language-tools.rkt index e4df4d84db..ffb035b188 100644 --- a/collects/drscheme/private/module-language-tools.rkt +++ b/collects/drracket/private/module-language-tools.rkt @@ -141,7 +141,7 @@ (if (vector? info-result) 'hash-lang-racket (get-lang-name pos)) - 'drscheme/private/module-language-tools) + 'drracket/private/module-language-tools) ((if (vector? info-result) (vector-ref info-result 0) info-result) diff --git a/collects/drscheme/private/module-language.rkt b/collects/drracket/private/module-language.rkt similarity index 97% rename from collects/drscheme/private/module-language.rkt rename to collects/drracket/private/module-language.rkt index 97fdf4a723..45be88b9af 100644 --- a/collects/drscheme/private/module-language.rkt +++ b/collects/drracket/private/module-language.rkt @@ -106,7 +106,7 @@ (define/override (default-settings) (let ([super-defaults (super default-settings)]) (make-module-language-settings - #t 'write 'mixed-fraction-e #f #t 'debug;; simple settings defaults + #t 'print 'mixed-fraction-e #f #t 'debug;; simple settings defaults '(default) #() @@ -163,7 +163,15 @@ (andmap string? (vector->list command-line-args)) (string? auto-text) (boolean? compilation-on?) - (let ([super (super unmarshall-settings (car marshalled))]) + (let ([super (super unmarshall-settings + (let ([p (car marshalled)]) + ;; Convert 'write to 'print: + (if (eq? (vector-ref p 1) 'write) + (list->vector + (list* (vector-ref p 0) + 'print + (cddr (vector->list p)))) + p)))]) (and super (apply make-module-language-settings (append @@ -204,11 +212,11 @@ (case annotations [(none) (use-compiled-file-paths - (cons (build-path "compiled" "drscheme") + (cons (build-path "compiled" "drracket") (use-compiled-file-paths)))] [(debug) (use-compiled-file-paths - (cons (build-path "compiled" "drscheme" "errortrace") + (cons (build-path "compiled" "drracket" "errortrace") (use-compiled-file-paths)))])) (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) diff --git a/collects/drscheme/private/multi-file-search.rkt b/collects/drracket/private/multi-file-search.rkt similarity index 100% rename from collects/drscheme/private/multi-file-search.rkt rename to collects/drracket/private/multi-file-search.rkt diff --git a/collects/drscheme/private/number-snip.rkt b/collects/drracket/private/number-snip.rkt similarity index 90% rename from collects/drscheme/private/number-snip.rkt rename to collects/drracket/private/number-snip.rkt index c224e5ab3a..22803031e2 100644 --- a/collects/drscheme/private/number-snip.rkt +++ b/collects/drracket/private/number-snip.rkt @@ -5,5 +5,5 @@ (provide snip-class) (define snip-class (make-object number-snip:snip-class%)) - (send snip-class set-classname (format "~s" `(lib "number-snip.ss" "drscheme" "private"))) + (send snip-class set-classname (format "~s" `(lib "number-snip.ss" "drracket" "private"))) (send (get-the-snip-class-list) add snip-class) diff --git a/collects/drscheme/private/palaka.rkt b/collects/drracket/private/palaka.rkt similarity index 100% rename from collects/drscheme/private/palaka.rkt rename to collects/drracket/private/palaka.rkt diff --git a/collects/drscheme/private/profile-drs.rkt b/collects/drracket/private/profile-drs.rkt similarity index 100% rename from collects/drscheme/private/profile-drs.rkt rename to collects/drracket/private/profile-drs.rkt diff --git a/collects/drscheme/private/recon.rkt b/collects/drracket/private/recon.rkt similarity index 100% rename from collects/drscheme/private/recon.rkt rename to collects/drracket/private/recon.rkt diff --git a/collects/drscheme/private/rep.rkt b/collects/drracket/private/rep.rkt similarity index 100% rename from collects/drscheme/private/rep.rkt rename to collects/drracket/private/rep.rkt diff --git a/collects/drscheme/private/stick-figures.rkt b/collects/drracket/private/stick-figures.rkt similarity index 100% rename from collects/drscheme/private/stick-figures.rkt rename to collects/drracket/private/stick-figures.rkt diff --git a/collects/drscheme/private/syncheck-debug.rkt b/collects/drracket/private/syncheck-debug.rkt similarity index 100% rename from collects/drscheme/private/syncheck-debug.rkt rename to collects/drracket/private/syncheck-debug.rkt diff --git a/collects/drscheme/private/text.rkt b/collects/drracket/private/text.rkt similarity index 100% rename from collects/drscheme/private/text.rkt rename to collects/drracket/private/text.rkt diff --git a/collects/drscheme/private/tool-contract-language.rkt b/collects/drracket/private/tool-contract-language.rkt similarity index 100% rename from collects/drscheme/private/tool-contract-language.rkt rename to collects/drracket/private/tool-contract-language.rkt diff --git a/collects/drscheme/private/tools-drs.rkt b/collects/drracket/private/tools-drs.rkt similarity index 93% rename from collects/drscheme/private/tools-drs.rkt rename to collects/drracket/private/tools-drs.rkt index e31551b0a4..c8cd193d95 100644 --- a/collects/drscheme/private/tools-drs.rkt +++ b/collects/drracket/private/tools-drs.rkt @@ -19,7 +19,8 @@ This file sets up the right lexical environment to invoke the tools that want to mrlib/switchable-button string-constants) -(require (for-syntax racket/base racket/match)) +(require (for-syntax racket/base racket/match + compiler/cm-accomplice)) (import [prefix drscheme:frame: drracket:frame^] [prefix drscheme:unit: drracket:unit^] @@ -41,12 +42,15 @@ This file sets up the right lexical environment to invoke the tools that want to (syntax-case stx () [(_ body tool-name) (let () + (define tool-lib-src (build-path (collection-path "drracket") "tool-lib.rkt")) (define full-sexp - (call-with-input-file (build-path (collection-path "drscheme") "tool-lib.rkt") + (call-with-input-file tool-lib-src (λ (port) (parameterize ([read-accept-reader #t]) (read port))))) + (register-external-file tool-lib-src) + (let loop ([sexp full-sexp]) (match sexp [`((#%module-begin ,body ...)) diff --git a/collects/drscheme/private/tools.rkt b/collects/drracket/private/tools.rkt similarity index 98% rename from collects/drscheme/private/tools.rkt rename to collects/drracket/private/tools.rkt index 340441e47f..7c725c66e5 100644 --- a/collects/drscheme/private/tools.rkt +++ b/collects/drracket/private/tools.rkt @@ -13,7 +13,8 @@ mrlib/switchable-button string-constants) -(require (for-syntax racket/base racket/match)) +(require (for-syntax racket/base racket/match + compiler/cm-accomplice)) (import [prefix drracket:frame: drracket:frame^] [prefix drracket:unit: drracket:unit^] @@ -322,11 +323,15 @@ string-constants) (syntax-case stx () [(_ body tool-name) (let () + (define tool-lib-src (build-path (collection-path "drracket") "tool-lib.rkt")) + (define full-sexp - (call-with-input-file (build-path (collection-path "drscheme") "tool-lib.rkt") + (call-with-input-file tool-lib-src (λ (port) (parameterize ([read-accept-reader #t]) (read port))))) + + (register-external-file tool-lib-src) (let loop ([sexp full-sexp]) (match sexp diff --git a/collects/drscheme/private/tracing.rkt b/collects/drracket/private/tracing.rkt similarity index 100% rename from collects/drscheme/private/tracing.rkt rename to collects/drracket/private/tracing.rkt diff --git a/collects/drscheme/private/ts.rkt b/collects/drracket/private/ts.rkt similarity index 100% rename from collects/drscheme/private/ts.rkt rename to collects/drracket/private/ts.rkt diff --git a/collects/drscheme/private/unit.rkt b/collects/drracket/private/unit.rkt similarity index 100% rename from collects/drscheme/private/unit.rkt rename to collects/drracket/private/unit.rkt diff --git a/collects/drscheme/sprof.rkt b/collects/drracket/sprof.rkt similarity index 100% rename from collects/drscheme/sprof.rkt rename to collects/drracket/sprof.rkt diff --git a/collects/drscheme/syncheck-drracket-button.rkt b/collects/drracket/syncheck-drracket-button.rkt similarity index 100% rename from collects/drscheme/syncheck-drracket-button.rkt rename to collects/drracket/syncheck-drracket-button.rkt diff --git a/collects/drscheme/syncheck.rkt b/collects/drracket/syncheck.rkt similarity index 99% rename from collects/drscheme/syncheck.rkt rename to collects/drracket/syncheck.rkt index c440d0868a..10ee172ad6 100644 --- a/collects/drscheme/syncheck.rkt +++ b/collects/drracket/syncheck.rkt @@ -23,11 +23,11 @@ If the namespace does not, they are colored the unbound color. scheme/class scheme/list scheme/promise - drscheme/tool + drracket/tool syntax/toplevel syntax/boundmap mrlib/switchable-button - (prefix-in drracket:arrow: drscheme/arrow) + (prefix-in drracket:arrow: drracket/arrow) (prefix-in fw: framework/framework) mred framework diff --git a/collects/drracket/tool-lib.rkt b/collects/drracket/tool-lib.rkt new file mode 100644 index 0000000000..1a9003d50f --- /dev/null +++ b/collects/drracket/tool-lib.rkt @@ -0,0 +1,1585 @@ +#lang at-exp racket/base + +#| + +This first time this is loaded, it loads all of DrRacket and invokes +the main unit, starting up DrRacket. After that, it just provides +all of the names in the tools library, for use defining keybindings + +|# +(require racket/class + racket/gui/base + (except-in scheme/unit struct) + racket/contract + racket/class + + ;; these have to be absolute requires for `include-extracted' to work with this file. + drracket/private/link + drracket/private/drsig + drracket/private/language-object-contract + + framework + framework/splash + + mrlib/switchable-button + scribble/srcdoc) + +(require (for-syntax scheme/base)) + +(require/doc drracket/private/ts ;; probably this also has to be an absolute require + scheme/base scribble/manual) + +(require/doc (for-label errortrace/errortrace-key + scheme/pretty + mzlib/pconvert)) + +(define-values/invoke-unit/infer drracket@) +(provide-signature-elements drracket:tool-cm^) ;; provide all of the classes & interfaces + +(provide drracket:unit:program-editor-mixin) +(define-syntax (drracket:unit:program-editor-mixin stx) + (syntax-case stx () + [(_ a ...) + #'((drracket:unit:get-program-editor-mixin) a ...)] + [_ #'(drracket:unit:get-program-editor-mixin)])) + +(language-object-abstraction drracket:language:object/c #t) + +(provide/doc + + (proc-doc/names + drracket:module-language-tools:add-opt-out-toolbar-button + (-> (-> (is-a?/c top-level-window<%>) + (is-a?/c area-container<%>) + (is-a?/c switchable-button%)) + symbol? + void?) + (make-button id) + @{Call this function to add another button to DrRacket's toolbar. When buttons are added this way, + DrRacket monitors the @tt{#lang} line at the top of the file; when it changes DrRacket queries + the language to see if this button should be included. + These buttons are ``opt out'', meaning that if the language doesn't explicitly ask to not + have this button (or all such buttons), the button will appear. + + See @racket[read-language] for more details on how language's specify how to opt out. + DrRacket will invoke the @tt{get-info} proc from @racket[read-language] with + @indexed-scheme['drscheme:opt-out-toolbar-buttons]. If the result is a list of symbols, the + listed symbols are opted out. If the result is @racket[#f], all buttons are opted + out. The default is the empty list, meaning that all opt-out buttons appear. + }) + + (proc-doc/names + drracket:module-language:add-module-language + (-> any) + () + @{Adds the module language to DrRacket. This is called during DrRacket's startup.}) + + (proc-doc/names + drracket:module-language:module-language-put-file-mixin + (-> (implementation?/c text:basic<%>) (implementation?/c text:basic<%>)) + (super%) + @{Extends @racket[super%] by overriding the @method[editor<%> put-file] method + to use a default name from the buffer, if the buffer contains something like + @tt{(module name ...)}.}) + + + ; + ; + ; + ; ; + ; ; + ; ; + ; ;;; ; ; ;;; ; + ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ;;;;;; ; ; ;;;; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; + ; ;;;; ; ;;;;; ; + ; + ; + ; + + + (proc-doc/names + drracket:eval:set-basic-parameters + (-> (listof (is-a?/c snip-class%)) void?) + (snipclasses) + @{sets the parameters that are shared between the repl's + initialization and @racket[drracket:eval:build-user-eventspace/custodian] + + Specifically, it sets these parameters: + @itemize[ + @item{@racket[current-namespace] has been set to a newly + created empty namespace. This namespace has the following modules + copied (with @racket[namespace-attach-module]) + from DrRacket's original namespace: + @itemize[@item{@racket['mzscheme]}@item{@racket['mred]}] + } + @item{@racket[read-curly-brace-as-paren] + is @racket[#t]; } + @item{@racket[read-square-bracket-as-paren] + is @racket[#t];} + @item{@racket[error-print-width] is set to 250;} + @item{@racket[current-ps-setup] + is set to a newly created + @racket[ps-setup%] + object;} + @item{the @racket[exit-handler] is set to + a parameter that kills the user's custodian; and} + @item{the snip-class-list, returned by + @racket[get-the-snip-class-list] + is initialized with all of the snipclasses in DrRacket's eventspace's snip-class-list.}]}) + + (proc-doc/names + drracket:eval:get-snip-classes + (-> (listof (is-a?/c snip-class%))) + () + @{Returns a list of all of the snipclasses in the current eventspace.}) + + (proc-doc/names + drracket:eval:expand-program + (-> (or/c port? drracket:language:text/pos?) + drracket:language-configuration:language-settings? + boolean? + (-> void?) + (-> void?) + (-> (or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + any) + void?) + (input language-settings eval-compile-time-part? init kill-termination iter) + + @{Use this function to expand the contents of the definitions + window for use with external program processing tools. + + This function uses + @racket[drracket:eval:build-user-eventspace/custodian] + to build the user's environment. + The arguments @racket[language-settings], @racket[init], and + @racket[kill-termination] are passed to + @racket[drracket:eval:build-user-eventspace/custodian]. + + The @racket[input] argument specifies the source of the program. + + The @racket[eval-compile-time-part?] argument indicates if + @racket[expand] + is called or if + @racket[expand-top-level-with-compile-time-evals] + is called when the program is expanded. + Roughly speaking, if your tool will evaluate each expression + itself by calling + @racket[eval] + then pass @racket[#f]. Otherwise, if your tool + just processes the expanded program, be sure to pass + @racket[#t]. + + This function calls + @method[drracket:language:language<%> front-end/complete-program] + to expand the program. Unlike when the @onscreen{Run} is clicked, + however, it does not call + @method[drracket:language:language<%> front-end/finished-complete-program]. + + + The first argument to @racket[iter] is the expanded program + (represented as syntax) or eof. + The @racket[iter] argument is called for each expression in the + expanded program and once more with eof, unless an error is + raised during expansion. + It is called from the user's thread. + If an exception is raised during expansion of the + user's program, @racket[iter] is not called. + Consider setting the exception-handler during @racket[init] to + handle this situation. + + The second argument to @racket[iter] is a thunk that + continues expanding the rest of the contents of the + definitions window. If the first argument to @racket[iter] was + eof, this argument is just the primitive + @racket[void]. + + See also + @racket[drracket:eval:expand-program/multiple].}) + + (proc-doc/names + drracket:eval:traverse-program/multiple + (drracket:language-configuration:language-settings? + (-> void?) + (-> void?) + . -> . + ((or/c port? drracket:language:text/pos?) + ((or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + . -> . + any) + boolean? + . -> . + void?)) + (language-settings init kill-termination) + + @{This function is similar to + @racket[drracket:eval:expand-program/multiple] + The only difference is that it does not + expand the program in the editor; instead + the processing function can decide how to + expand the program.}) + + (proc-doc/names + drracket:eval:expand-program/multiple + (-> drracket:language-configuration:language-settings? + boolean? + (-> void?) + (-> void?) + (-> (or/c port? drracket:language:text/pos?) + (-> (or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + any) + boolean? + void?)) + (language-settings eval-compile-time-part? init kill-termination) + + @{This function is just like + @racket[drracket:eval:expand-program] + except that it is curried and the second application + can be used multiple times. + Use this function if you want to initialize the user's + thread (and namespace, etc) once but have program text + that comes from multiple sources. + + The extra boolean argument to the result function + determines if + @racket[drracket:language:language front-end/complete-program<%>] + or + @racket[drracket:language:language front-end/interaction<%>] + is called.}) + + (proc-doc/names + drracket:eval:build-user-eventspace/custodian + (->* (drracket:language-configuration:language-settings? + (-> void?) + (-> void?)) + () + (values eventspace? custodian?)) + ((language-settings init kill-termination) ()) + + @{This function creates a custodian and an eventspace (on the + new custodian) to expand the user's program. It does not + kill this custodian, but it can safely be shutdown (with + @racket[custodian-shutdown-all]) after the + expansion is finished. + + It initializes the + user's eventspace's main thread with several parameters: + @itemize[ + @item{ @racket[current-custodian] is set to a new custodian. + }@item{ + In addition, it calls + @racket[drracket:eval:set-basic-parameters]. + }] + + The @racket[language-settings] argument is the current + language and its settings. See + @racket[drracket:language-configuration:make-language-settings] + for details on that structure. + + If the program is associated with a DrRacket + frame, get the frame's language settings from the + @method[drracket:unit:definitions-text<%> get-next-settings] + method of + @racket[drracket:unit:definitions-text<%>]. Also, the most recently chosen language in + the language dialog is saved via the framework's + preferences. Apply + @racket[preferences:get] + to + @racket[drracket:language-configuration:get-settings-preferences-symbol] + for that @racket[language-settings]. + + The @racket[init] argument is called after the user's parameters + are all set, but before the program is run. It is called on + the user's thread. The + @racket[current-directory] and + @racket[current-load-relative-directory] + parameters are not set, so if there are appropriate directories, + the @racket[init] argument is a good place to set them. + + The @racket[kill-termination] argument is called when the main thread of + the eventspace terminates, no matter if the custodian was + shutdown, or the thread was killed. This procedure is also + called when the thread terminates normally. This procedure is + called from a new, dedicated thread (@italic{i. e.}, not the thread + created to do the expansion, nor the thread that + @racket[drracket:eval:build-user-eventspace/custodian] was called from.)}) + + + + ; + ; + ; + ; ; ; + ; ; ; + ; ; ; + ; ;; ; ;;; ; ;; ; ; ;; ; + ; ; ;; ; ; ;; ; ; ; ; ;; + ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ;;;;;; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; + ; ; ;; ; ;; ; ; ;; ; ;; + ; ;; ; ;;;; ; ;; ;; ; ;; ; + ; ; + ; ; ; + ; ;;;; + + (proc-doc/names + drracket:debug:error-display-handler/stacktrace + (->* (string? any/c) + ((or/c false/c (listof srcloc?)) + #:definitions-text (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) + #:interactions-text (or/c #f (is-a?/c drracket:rep:text<%>)) + ) + any/c) + ((msg exn) ((stack #f) + (defs #f) + (ints #f))) + @{Displays the error message represented by the string, adding + embellishments like those that appears in the DrRacket REPL, + specifically a clickable icon for the stack trace (if the srcloc location is not empty), + and a clickable icon for the source of the error (read & syntax errors show their source + locations and otherwise the first place in the stack trace is shown). + + If @racket[stack] is false, then the stack traces embedded in the @racket[exn] argument (if any) are used. + Specifically, this function looks for a stacktrace via + @racket[errortrace-key] in the continuation marks of @racket[exn] and @racket[continuation-mark-set->context]. + + If @racket[stack] is not false, that stack is added to the stacks already in the exception. + + This should be called in the same eventspace and on the same thread as the error.}) + + (proc-doc/names + drracket:debug:make-debug-error-display-handler + (-> (-> string? (or/c any/c exn?) any) + (-> string? (or/c any/c exn?) any)) + + (oedh) + + @{This function implements an error-display-handler in terms + of another error-display-handler. + + See also Racket's + @racket[error-display-handler] + parameter. + + If the current-error-port is the definitions window in + DrRacket, this error handler inserts some debugging + annotations, calls @racket[oedh], and then highlights the + source location of the runtime error. + + It looks for both stack trace information in the continuation + marks both via the + @schememodname[errortrace/errortrace-key] + module and via + @racket[continuation-mark-set->context]. + + }) + + (proc-doc/names + drracket:debug:hide-backtrace-window + (-> void?) + () + @{Hides the backtrace window.}) + + (proc-doc/names + drracket:debug:add-prefs-panel + (-> void?) + () + @{Adds the profiling preferences panel.}) + + (proc-doc/names + drracket:debug:open-and-highlight-in-file + (->* ((or/c srcloc? (listof srcloc?))) + ((or/c #f (cons/c (λ (x) (and (weak-box? x) + (let ([v (weak-box-value x)]) + (or (not v) + (is-a?/c v editor<%>))))) + number?))) + void?) + ((debug-info) + ((edition-pair #f))) + @{This function opens a DrRacket to display + @racket[debug-info]. Only the src the position + and the span fields of the srcloc are considered. + + The @racket[edition-pair] is used to determine if a + warning message is shown when before opening the file. + If the @racket[edition-pair] is not @racket[#f], it is compared + with the result of @method[text:basic<%> get-edition-number] + of the editor that is loaded to determine if the file has been + edited since the source location was recorded. If so, it + puts up a warning dialog message to that effect.}) + + (proc-doc/names + drracket:debug:show-backtrace-window/edition-pairs + (-> string? + (listof srcloc?) + (listof (or/c #f (cons/c (λ (x) (and (weak-box? x) + (let ([v (weak-box-value x)]) + (or (not v) + (is-a?/c v editor<%>))))) + number?))) + (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) + (or/c #f (is-a?/c drracket:rep:text<%>)) + void?) + (error-message dis editions-pairs defs ints) + @{Shows the backtrace window you get when clicking on the bug in + DrRacket's REPL. + + The @racket[error-message] argument is the text of the error, + @racket[dis] is the debug information, extracted from the + continuation mark in the exception record, using + @racket[errortrace-key]. + + The @racket[editions] argument indicates the editions of any editors + that are open editing the files corresponding to the source locations + + The @racket[defs] argument should be non-@racket[#f] if there are + possibly stacktrace frames that contain unsaved versions of the + definitions window from DrRacket. Similarly, the @racket[ints] argument + should be non-@racket[#f] if there are possibly stacktrace frames that contain + unsaved versions of the interactions window. + + Use + @racket[drracket:rep:current-rep] to get the rep during evaluation of a program. + + }) + + (proc-doc/names + drracket:debug:show-backtrace-window + (->* (string? + (or/c exn? + (listof srcloc?) + (non-empty-listof (cons/c string? (listof srcloc?))))) + ((or/c #f (is-a?/c drracket:rep:text<%>)) + (or/c #f (is-a?/c drracket:unit:definitions-text<%>))) + void?) + ((error-message dis) + ((rep #f) + (defs #f))) + @{Shows the backtrace window you get when clicking on the bug in + DrRacket's REPL. + + This function simply calls @racket[drracket:debug:show-backtrace-window/edition-pairs], + using @racket[drracket:debug:srcloc->edition/pair]. + }) + + (proc-doc/names + drracket:debug:srcloc->edition/pair + (-> srcloc? + (or/c #f (is-a?/c drracket:rep:text<%>)) + (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) + (or/c #f (cons/c (let ([weak-box-containing-an-editor? + (λ (x) (and (weak-box? x) + (let ([v (weak-box-value x)]) + (or (not v) + (is-a?/c v editor<%>)))))]) + weak-box-containing-an-editor?) + number?))) + (srcloc ints defs) + @{Constructs a edition pair from a source location, + returning the current edition of the editor editing + the source location (if any). + + The @racket[ints] and @racket[defs] arguments are used to map source locations, + in the case that the source location corresponds to the definitions + window (when it has not been saved) or the interactions window. + }) + + + + ; + ; + ; + ; ;; ;; ;;; ;; + ; ;; ;; ;; ;; + ; ;; ;; ;; ;; + ; ;;;;;; ;;;; ;; ;;;;; ;;;;; ;;;; ;;;; ;; ;; + ; ;; ;; ;;; ;; ;; ;; ;; ;; ;;; ;;; ;; ;; ; ;; ; + ; ;; ;; ;;;;;; ;; ;; ;; ;;;;;;; ;; ;;;;;; ;;;; ;;;; + ; ;; ;; ;; ;; ;; ;; ;;;;;;; ;; ;; ;;;; ;;;;; + ; ;; ;; ;;; ; ;; ;; ;; ;; ;; ;;; ; ; ;; ;; ;; + ; ;; ;;; ;;;; ;; ;;;;; ;;;;;; ;;;; ;;;; ;; ;;; + ; ;; + ; ;; + ; ;; + + (proc-doc/names + drracket:help-desk:help-desk + (->* () + ((or/c #f string?) + (or/c #f string? (list/c string? string?))) + any) + (() + ((search-key #f) + (search-context #f))) + @{if @racket[search-key] is a string, calls @racket[perform-search] with + @racket[search-key] and @racket[search-context]. + + Otherwise, calls @racket[send-main-page] with no arguments.}) + + + ; + ; + ; + ; ; + ; + ; ; + ; ; ; ; ;; ; ;;;; + ; ; ; ;; ; ; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ; ;; ; ; ; ; + ; ;; ; ; ; ; ;; + ; + ; + ; + + + (proc-doc/names + drracket:unit:get-program-editor-mixin + (-> ((subclass?/c text%) . -> . (subclass?/c text%))) + () + @{Returns a mixin that must be mixed in to any + @racket[text%] object that might contain + program text (and thus can be in the source + field of some syntax object). + + See also + @racket[drracket:unit:add-to-program-editor-mixin].}) + + (proc-doc/names + drracket:unit:add-to-program-editor-mixin + (((subclass?/c text%) . -> . (subclass?/c text%)) . -> . void?) + (mixin) + @{@phase[1] + + Adds @racket[mixin] to the result of + @racket[drracket:unit:get-program-editor-mixin].}) + + (proc-doc/names + drracket:unit:open-drscheme-window + (case-> + (-> (is-a?/c drracket:unit:frame%)) + ((or/c string? false/c) . -> . (is-a?/c drracket:unit:frame%))) + (() (filename)) + + @{Opens a DrRacket frame that displays + @racket[filename], + or nothing if @racket[filename] is @racket[#f] or not supplied.}) + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;; ;; ;;; ;; ; ;;; ;;; + ; ;; ;; ; ; ; ; ;; ; ; ; + ; ; ; ; ; ; ; ; ; ; ;; + ; ; ; ; ; ; ; ; ;;;;;; ;; + ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ; + ; ; ; ; ;;; ;; ; ;;;; ;;; + ; + ; + ; + + + (proc-doc/names + drracket:modes:add-mode + (string? + (or/c false/c (is-a?/c mode:surrogate-text<%>)) + ((is-a?/c drracket:rep:text%) number? . -> . boolean?) + ((or/c false/c (listof string?)) . -> . boolean?) + . -> . + drracket:modes:mode?) + (name surrogate repl-submit matches-language) + @{Adds a mode to DrRacket. Returns a mode value + that identifies the mode. + + The first argument, @racket[name], is the name + of the mode, used in DrRacket's GUI to allow + the user to select this mode. + + The @racket[surrogate] argument is set to the + definitions text and the interactions text + (via the + @racket[mode:host-text set-surrogate<%>] + method) whenever this mode is enabled. + + The @racket[repl-submit] procedure is called + whenever the user types a return in the interactions + window. It is passed the interactions editor + and the position where the last prompt occurs. + If it + returns @racket[#t], the text after the last + prompt is treated as a program fragment and + evaluated, according to the language settings. + If it returns @racket[#f], the text is + assumed to be an incomplete program fragment, and + the keystroke is not treated specially. + + The @racket[matches-language] predicate is called whenever + the language changes. If it returns @racket[#t] + this mode is installed. It is passed the list of strings + that correspond to the names of the language in the + language dialog. + + Modes are tested in the opposite order that they are + added. That is, the last mode to be added gets tested + first when the filename changes or when the language + changes. + + See also + @racket[drracket:modes:get-modes].}) + + (proc-doc/names + drracket:modes:mode? + (any/c . -> . boolean?) + (val) + @{Determines if @racket[val] is a mode.}) + + (proc-doc/names + drracket:modes:get-modes + (-> (listof drracket:modes:mode?)) + () + @{Returns all of the modes currently added to DrRacket. + + See also + @racket[drracket:modes:add-mode].}) + + (proc-doc/names + drracket:modes:mode-name + (drracket:modes:mode? . -> . string?) + (mode) + @{Extracts the name of the mode. + + See also + @racket[drracket:modes:add-mode].}) + + (proc-doc/names + drracket:modes:mode-surrogate + (drracket:modes:mode? . -> . (or/c false/c (is-a?/c mode:surrogate-text<%>))) + (mode) + @{Extracts the surrogate of the mode. + + See also + @racket[drracket:modes:add-mode].}) + + (proc-doc/names + drracket:modes:mode-repl-submit + (drracket:modes:mode? . -> . any) + (mode) + @{Extracts the repl submission predicate of the mode. + + See also + @racket[drracket:modes:add-mode].}) + + (proc-doc/names + drracket:modes:mode-matches-language + (drracket:modes:mode? . -> . ((or/c false/c (listof string?)) . -> . boolean?)) + (mode) + @{Extracts the language matching predicate of the mode. + + See also + @racket[drracket:modes:add-mode].}) + + + ; + ; + ; + ; + ; + ; + ; ; ; ;;; ; ;; + ; ;; ; ; ;; ; + ; ; ; ; ; ; + ; ; ;;;;;; ; ; + ; ; ; ; ; + ; ; ; ;; ; + ; ; ;;;; ; ;; + ; ; + ; ; + ; ; + + + (proc-doc/names + drracket:rep:get-welcome-delta + (-> (is-a?/c style-delta%)) + () + @{Returns a style delta that matches the style and color of the + phrase ``Welcome to'' in the beginning of the interactions window.}) + + (proc-doc/names + drracket:rep:get-dark-green-delta + (-> (is-a?/c style-delta%)) + () + @{Returns a style delta that matches the style and color of the + name of a language in the interactions window.}) + + (proc-doc/names + drracket:rep:get-drs-bindings-keymap + (-> (is-a?/c keymap%)) + () + @{Returns a keymap that binds various DrRacket-specific + keybindings. This keymap is used in the definitions + and interactions window. + + Defaultly binds C-x;o to a function that switches + the focus between the definitions and interactions + windows. Also binds f5 to Execute and f1 to Help Desk.}) + + (proc-doc/names + drracket:rep:current-rep + (-> (or/c false/c (is-a?/c drracket:rep:text%))) + () + + @{This is a parameter whose value should not be set by tools. + It is initialized to the repl that controls this evaluation + in the user's thread. + + It only returns @racket[#f] if the program not running + in the context of a repl (eg, the test suite window).}) + + (proc-doc/names + drracket:rep:current-value-port + (-> (or/c false/c port?)) + () + @{This is a parameter whose value is a port that + prints in the REPL in blue. It is used to print + the values of toplevel expressions in the REPL. + + It is only initialized on the user's thread.}) + + + ; + ; + ; + ; ; ; + ; ; ; + ; ; ; ; ; + ; ;; ; ;;; ;;;; ; ;;; ; ; ;;;; ;;; ; ;; ;; ; + ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; ; ; ;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ;;;;;; ; ; ;;;;;; ; ; ;;;;;; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; + ; ;; ; ;;;; ;; ; ;;;; ; ; ;; ;;;; ; ; ;; ; + ; ; ; + ; ; ; ; + ; ;;;; + + + (proc-doc/names + drracket:get/extend:extend-tab + (case-> + ((make-mixin-contract drracket:unit:tab<%>) . -> . void?) + ((make-mixin-contract drracket:unit:tab<%>) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This class implements the tabs in DrRacket. One is created for each tab + in a frame (each frame always has at least one tab, even if the tab bar is not shown) + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#t].}) + + (proc-doc/names + drracket:get/extend:extend-interactions-text + (case-> + ((make-mixin-contract drracket:rep:text<%>) . -> . void?) + ((make-mixin-contract drracket:rep:text<%>) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This text is used in the bottom window of DrRacket frames. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#t].}) + + (proc-doc/names + drracket:get/extend:get-interactions-text + (-> (implementation?/c drracket:rep:text<%>)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-interactions-text] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drracket:get/extend:extend-definitions-text + (case-> + ((make-mixin-contract drracket:unit:definitions-text<%>) . -> . void?) + ((make-mixin-contract drracket:unit:definitions-text<%>) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This text is used in the top window of DrRacket frames. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#f].}) + + (proc-doc/names + drracket:get/extend:get-definitions-text + (-> (implementation?/c drracket:unit:definitions-text<%>)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-definitions-text] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drracket:get/extend:extend-interactions-canvas + (case-> + ((make-mixin-contract drracket:unit:interactions-canvas%) . -> . void?) + ((make-mixin-contract drracket:unit:interactions-canvas%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This canvas is used in the bottom window of DrRacket frames. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#f].}) + + (proc-doc/names + drracket:get/extend:get-interactions-canvas + (-> (subclass?/c drracket:unit:interactions-canvas%)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-interactions-canvas] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drracket:get/extend:extend-definitions-canvas + (case-> + ((make-mixin-contract drracket:unit:definitions-canvas%) . -> . void?) + ((make-mixin-contract drracket:unit:definitions-canvas%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This canvas is used in the top window of DrRacket frames. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#f].}) + + (proc-doc/names + drracket:get/extend:get-definitions-canvas + (-> (subclass?/c drracket:unit:definitions-canvas%)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-definitions-canvas] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drracket:get/extend:extend-unit-frame + (case-> + ((make-mixin-contract drracket:unit:frame%) . -> . void?) + ((make-mixin-contract drracket:unit:frame%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This is the frame that implements the main DrRacket window. + + The argument, @racket[before], controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying @racket[#f].}) + + (proc-doc/names + drracket:get/extend:get-unit-frame + (-> (subclass?/c drracket:unit:frame%)) + () + + @{Once this function is called, + @racket[drracket:get/extend:extend-unit-frame] + raises an error, disallowing any more extensions.}) + + + + ; + ; + ; + ; + ; ; ;;; + ; ;;; + ; ;;;; ;;; ;;;;;;; ;;; ;;; ;;; ;; ;; ;;; + ; ;;;; ;;;;;;;;;;;; ;;;;; ;;; ;;;;;;; ;;;;;;; + ; ;;; ;;; ;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;; + ; ;;; ;;; ;;;;; ;;; ;;; ;;; ;;; ;;; ;;; + ; ;;; ;;; ;;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;; + ; ;;;; ;;; ;;; ;;; ;;;;; ;;; ;;; ;;; ;;;;;;; + ; ;;; ;;; ;;;;;; ;;; ;;; ;;; ;;; ;; ;;; + ; ;;; + ; ;;;;;; + ; + ; + + (proc-doc/names + drracket:tracing:annotate + (-> syntax? syntax?) + (stx) + @{Call this function to add tracing annotations to the a fully-expanded + expression. When the program runs, DrRacket will pop open the tracing + window to display the trace.}) + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; + ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; + ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; + ; ; ; + ; ; ; ; ; + ; ;;;; ;;;; + ; + ; + ; + ; ;;; ; ; + ; ; + ; ; ; + ; ;;; ;;; ; ;; ;;;; ; ;; ; ; ; ; ; ;;; ;;;; ; ;;; ; ;; + ; ; ; ; ; ;; ; ; ; ; ;; ; ; ;; ; ; ; ; ; ; ;; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ;;;; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ;; ; ;; ; ; ; ; ; ; ; ; ; + ; ;;; ;;; ; ; ; ; ;; ; ;; ; ; ;;;;; ;; ; ;;; ; ; + ; ; + ; ; ; + ; ;;;; + + (proc-doc/names + drracket:language-configuration:get-languages + (-> (listof (is-a?/c drracket:language:language<%>))) + () + @{This can only be called after all of the tools initialization phases have completed. + + Returns the list of all of the languages installed in DrRacket.}) + + (proc-doc/names + drracket:language-configuration:add-language + ((and/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) + . -> . void?) + (language) + + @{@phase[2] + + Adds @racket[language] to the languages offerend by DrRacket.}) + + (proc-doc/names + drracket:language-configuration:get-settings-preferences-symbol + (-> symbol?) + () + @{Returns the symbol that is used to store the user's language + settings. Use as an argument to either + @racket[preferences:get] + or + @racket[preferences:set].}) + + (proc-doc/names + drracket:language-configuration:make-language-settings + ((or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) + any/c + . -> . + drracket:language-configuration:language-settings?) + (language settings) + + @{This is the constructor for a record consisting of two + elements, a language and its settings. + + The settings is a language-specific record that holds a + value describing a parameterization of the language. + + It has two selectors, + @racket[drracket:language-configuration:language-settings-language] + and + @racket[drracket:language-configuration:language-settings-settings], and a predicate, + @racket[drracket:language-configuration:language-settings?]}) + + (proc-doc/names + drracket:language-configuration:language-settings-settings + (-> drracket:language-configuration:language-settings? + any/c) + (ls) + @{Extracts the settings field of a language-settings.}) + + (proc-doc/names + drracket:language-configuration:language-settings-language + (drracket:language-configuration:language-settings? + . -> . + (or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c)) + (ls) + + @{Extracts the language field of a language-settings.}) + + (proc-doc/names + drracket:language-configuration:language-settings? + (any/c . -> . boolean?) + (val) + + @{Determines if the argument is a language-settings or not.}) + + (proc-doc/names + drracket:language-configuration:language-dialog + (->* (boolean? drracket:language-configuration:language-settings?) + ((or/c false/c (is-a?/c top-level-window<%>))) + (or/c false/c drracket:language-configuration:language-settings?)) + ((show-welcome? language-settings-to-show) + ((parent #t))) + @{Opens the language configuration dialog. + See also + @racket[drracket:language-configuration:fill-language-dialog]. + + The @racket[show-welcome?] argument determines if + if a ``Welcome to DrRacket'' message and some + natural language buttons are shown. + + The @racket[language-settings-to-show] argument + must be some default language settings that the dialog + is initialized to. + If unsure of a default, the currently set language + in the user's preferences can be obtained via: + @schemeblock[ + (preferences:get (drracket:language-configuration:get-settings-preferences-symbol)) + ] + + The @racket[parent] argument is used as the parent + to the dialog. + + The result if @racket[#f] when the user cancells the dialog, and + the selected language if they hit ok.}) + + (proc-doc/names + drracket:language-configuration:fill-language-dialog + (->* + ((is-a?/c vertical-panel%) + (is-a?/c area-container<%>) + drracket:language-configuration:language-settings?) + ((or/c false/c (is-a?/c top-level-window<%>)) + (-> symbol? void?)) + drracket:language-configuration:language-settings?) + ((panel button-panel language-setting) + ((re-center #f) + (ok-handler void))) + @{This procedure accepts two parent panels and + fills them with the contents of the language dialog. + It is used to include language configuration controls + in some larger context in another dialog. + + The @racket[panel] argument is the main panel where the + language controls will be placed. + The function adds buttons to the @racket[button-panel] + to revert a language to its default settings and to + show the details of a language. + + The @racket[language-setting] is the default + language to show in the dialog. + + The @racket[re-center] argument is used when the @onscreen{Show Details} + button is clicked. If that argument is a @racket[top-level-window<%>], + the @onscreen{Show Details} callback will recenter the window each time + it is clicked. Otherwise, the argument is not used. + + @racket[ok-handler] is a function that is in charge of interfacing the OK + button. It should accept a symbol message: @racket['enable] and + @racket['disable] to toggle the button, and @racket['execute] to run + the desired operation. (The language selection dialog also uses an + internal @racket['enable-sync] message.)}) + + (proc-doc + drracket:language:register-capability + (->d ([s symbol?] + [the-contract contract?] + [default the-contract]) + () + [res void?]) + @{Registers a new capability with a default value for each language + and a contract on the values the capability might have. + + By default, these capabilities are registered as DrRacket starts up: + @(let-syntax ([cap (syntax-rules () + [(cap key contract default desc ...) + (item @racket['key : contract = default] + "--- " desc ...)])]) + (itemize + @cap[drracket:check-syntax-button boolean? #t]{controls the visiblity of the check syntax button} + @cap[drracket:language-menu-title + string? + (string-constant scheme-menu-name)]{ + controls the name of the menu just to the right of the language + menu (defaultly named ``Racket'')} + @cap[drscheme:define-popup + (or/c #f + (list/c string? string? string?) + (cons/c string? string?)) + (list "(define" "(define ...)" "δ")]{ + specifies the prefix that the define popup should look for and what + label it should have, or @racket[#f] if it should not appear at all. + + If the list of three strings alternative is used, the first string is + the prefix that is looked for when finding definitions. The second + and third strings are used as the label of the control, in horizontal + and vertical mode, respectively. + + The pair of strings alternative is deprecated. If it is used, + the pair @racket[(cons a-str b-str)] is the same as @racket[(list a-str b-str "δ")].} + @cap[drscheme:help-context-term (or/c false/c string?) #f]{ + specifies a context query for documentation searches that are + initiated in this language, can be @racket[#f] (no change to the + user's setting) or a string to be used as a context query (note: the + context is later maintained as a cookie, @racket[""] is different + from @racket[#f] in that it clears the stored context)} + @cap[drscheme:special:insert-fraction boolean? #t]{ + determines if the insert fraction menu item in the special menu is + visible} + @cap[drscheme:special:insert-lambda boolean? #t]{ + determines if the insert lambda menu item in the special menu is + visible} + @cap[drscheme:special:insert-large-letters boolean? #t]{ + determines if the insert large letters menu item in the special menu + is visible} + @cap[drscheme:special:insert-image boolean? #t]{ + determines if the insert image menu item in the special menu is + visible} + @cap[drscheme:special:insert-comment-box boolean? #t]{ + determines if the insert comment box menu item in the special menu + is visible} + @cap[drscheme:special:insert-gui-tool boolean? #t]{ + determines if the insert gui menu item in the special menu is + visible} + @cap[drscheme:special:slideshow-menu-item boolean? #t]{ + determines if the insert pict box menu item in the special menu is + visible} + @cap[drscheme:special:insert-text-box boolean? #t]{ + determines if the insert text box menu item in the special menu is + visible} + @cap[drscheme:special:xml-menus boolean? #t]{ + determines if the insert scheme box, insert scheme splice box, and + the insert xml box menu item in the special menu are visible} + @cap[drscheme:autocomplete-words (listof string?) '()]{ + determines the list of words that are used when completing words in + this language} + @cap[drscheme:tabify-menu-callback + (or/c false/c (-> (is-a?/c text%) number? number? void?)) + (λ (t a b) (send t tabify-selection a b))]{ + is used as the callback when the ``Reindent'' or ``Reindent All'' + menu is selected. The first argument is the editor, and the second + and third are a range in the editor.} + ))}) + + (proc-doc/names + drracket:language:capability-registered? + (-> symbol? boolean?) + (s) + @{Indicates if + @racket[drracket:language:register-capability] + has been called with @racket[s].}) + (proc-doc + drracket:language:get-capability-default + (->d ([s (and/c symbol? drracket:language:capability-registered?)]) + () + [res (drracket:language:get-capability-contract s)]) + @{Returns the default for a particular capability.}) + (proc-doc/names + drracket:language:get-capability-contract + (-> (and/c symbol? drracket:language:capability-registered?) + contract?) + (s) + @{Returns the contract for a given capability, which was specified + when @racket[drracket:language:register-capability] was called.}) + + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; + ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; + ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; + ; ; ; + ; ; ; ; ; + ; ;;;; ;;;; + + + (proc-doc/names + drracket:language:add-snip-value + (->* ((-> any/c boolean?) + (-> any/c (is-a?/c snip%))) + ((-> any/c)) + void?) + ((test-value convert-value) + ((setup-thunk void))) + @{Registers a handler to convert values into snips as they are printed in the REPL. + + The @racket[test-snip] argument is called to determine if this handler can convert the value + and the @racket[convert-value] argument is called to build a snip. + The (optional) @racket[setup-thunk] is called just after the user's namespace and other + setings are built, but before any of the user's code is evaluated. + + All three functions are called on the user's thread and with the user's settings.}) + + (proc-doc/names + drracket:language:extend-language-interface + (-> interface? + (make-mixin-contract drracket:language:language<%>) + void?) + (interface default-implementation) + + @{@phase[1] + + Each language added passed to + @racket[drracket:language-configuration:add-language] + must implement @racket[interface]. + + The @racket[default-implementation] is a mixin + that provides a default implementation of + @racket[interface]. Languages that are unaware of + the specifics of @racket[extension] use + @racket[default-implementation] via + @racket[drracket:language:get-default-mixin].}) + + (proc-doc + drracket:language:get-default-mixin + (-> (make-mixin-contract drracket:language:language<%>)) + + @{@phase[2] + + The result of this function is the composite of all of the + @racket[default-implementation] arguments passed + to + @racket[drracket:language:extend-language-interface].}) + + (proc-doc/names + drracket:language:get-language-extensions + (-> (listof interface?)) + () + @{@phase[2] + + Returns a list of the interfaces passed to + @racket[drracket:language:extend-language-interface].}) + + (proc-doc/names + drracket:language:put-executable + ((is-a?/c top-level-window<%>) + path? + (or/c boolean? (symbols 'launcher 'standalone 'distribution)) + boolean? + string? + . -> . (or/c false/c path?)) + (parent program-filename mode mred? title) + @{Calls the MrEd primitive + @racket[put-file] + with arguments appropriate for creating an executable + from the file @racket[program-filename]. + + The arguments @racket[mred?] and @racket[mode] indicates + what type of executable this should be (and the dialog + may be slightly different on some platforms, depending + on these arguments). For historical reasons, @racket[#f] + is allowed for @racket[mode] as an alias for @racket['launcher], and + @racket[#t] is allowed for @racket[mode] as an alias for @racket['stand-alone]. + + The @racket[title] argument is used as the title to the primitive + @racket[put-file] + or + @racket[get-directory] + primitive.}) + + (proc-doc/names + drracket:language:create-executable-gui + ((or/c false/c (is-a?/c top-level-window<%>)) + (or/c false/c string?) + (or/c (λ (x) (eq? x #t)) (symbols 'launcher 'standalone 'distribution)) + (or/c (λ (x) (eq? x #t)) (symbols 'mzscheme 'mred)) + . -> . + (or/c false/c + (list/c (symbols 'no-show 'launcher 'stand-alone 'distribution) + (symbols 'no-show 'mred 'mzscheme) + string?))) + (parent program-name show-type show-base) + @{Opens a dialog to prompt the user about their choice of executable. + If @racket[show-type] is @racket[#t], the user is prompted about + a choice of executable: stand-alone, + launcher, or distribution; otherwise, the symbol determines the type. + If @racket[show-base] + is @racket[#t], the user is prompted about a choice of base + binary: mzscheme or mred; otherwise the symbol determines the base. + + The @racket[program-name] argument is used to construct the default + executable name in a platform-specific manner. + + The @racket[parent] argument is used for the parent of the dialog. + + The result of this function is @racket[#f] if the user cancel's + the dialog and a list of three items indicating what options + they chose. If either @racket[show-type] or @racket[show-base] + was not @racket[#t], the corresponding result will be @racket['no-show], + otherwise it will indicate the user's choice.}) + + (proc-doc/names + drracket:language:create-module-based-stand-alone-executable + ((or/c path? string?) + (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + executable-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{This procedure creates a stand-alone executable in the file + @racket[executable-filename] that runs the program + @racket[program-filename]. + + The arguments + @racket[module-language-spec] and + @racket[transformer-module-language-spec] specify the + settings of the initial namespace, both the transformer + portion and the regular portion. Both may be @racket[#f] + to indicate there are no initial bindings. + + The @racket[init-code] argument is an s-expression representing + the code for a module. This module is expected to provide + the identifer @racket[init-code], bound to a procedure of no + arguments. That module is required and the @racket[init-code] + procedure is executed to initialize language-specific + settings before the code in @racket[program-filename] runs. + + The @racket[gui?] argument indicates if a GRacket or Racket + stand-alone executable is created. + + The @racket[use-copy?] argument indicates if the initial + namespace should be populated with + @racket[namespace-require/copy] or + @racket[namespace-require]. }) + + (proc-doc/names + drracket:language:create-module-based-distribution + ((or/c path? string?) + (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + distribution-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{Like + @racket[drracket:language:create-module-based-stand-alone-executable], but packages the stand-alone executable into a distribution.}) + + (proc-doc/names + drracket:language:create-distribution-for-executable + ((or/c path? string?) + boolean? + (-> path? void?) + . -> . + void?) + (distribution-filename + gui? + make-executable) + + @{Creates a distribution where the given @racket[make-executable] procedure + creates the stand-alone executable to be distributed. + The @racket[make-executable] procedure is given the name of the + executable to create. The @racket[gui?] argument is needed in case the + executable's name (which @racket[drracket:language:create-distribution-for-executable] + must generate) depends on the type of executable. During the distribution-making + process, a progress dialog is shown to the user, and the user can click an + @onscreen{Abort} button that sends a break to the current thread.}) + + (proc-doc/names + drracket:language:create-module-based-launcher + ((or/c path? string?) (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + executable-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{This procedure is identical to + @racket[drracket:language:create-module-based-stand-alone-executable], except that it creates a launcher instead of a + stand-alone executable.}) + + (proc-doc/names + drracket:language:simple-module-based-language-convert-value + (-> any/c drracket:language:simple-settings? any) + (value settings) + @{The result can be either one or two values. The first result is + the converted value. The second result is @racket[#t] if the converted + value should be printed with @racket[write] (or @racket[pretty-write]), + @racket[#f] if the converted result should be printed with + @racket[print] (or @racket[pretty-print]); the default second + result is @racket[#t]. + + The default implementation of this method depends on the + @racket[simple-settings-printing-style] field of @racket[settings]. + If it is @racket['print], the + result is @racket[(values value #f)]. If it is @racket['write] or @racket['trad-write], + the result is just @racket[value]. Otherwise, the result is produce by + adjusting the @racket[constructor-style-printing] and @racket[show-sharing] + parameters based on @racket[settings], setting @racket[current-print-convert-hook] + to ignore snips, and then applying @racket[print-convert] to @racket[value].}) + + (proc-doc/names + drracket:language:setup-printing-parameters + (-> (-> any) drracket:language:simple-settings? (or/c number? 'infinity) any) + (thunk settings width) + @{Sets all of the @racket[pretty-print] and @racket[print-convert] parameters + either to the defaults to values based on @racket[settings] + and then invokes @racket[thunk], returning what it returns.}) + + (proc-doc/names + drracket:language:text/pos-text + (drracket:language:text/pos? . -> . (is-a?/c text%)) + (text/pos) + + @{Selects the @racket[text%] from a text/pos.}) + + (proc-doc/names + drracket:language:text/pos-start + (drracket:language:text/pos? . -> . number?) + (text/pos) + + @{Selects the starting position from a text/pos.}) + + (proc-doc/names + drracket:language:text/pos-end + (drracket:language:text/pos? . -> . number?) + (text/pos) + + @{Selects the ending position from a text/pos.}) + + (proc-doc/names + drracket:language:text/pos? + (any/c . -> . boolean?) + (val) + + @{Returns @racket[#t] if @racket[val] is a text/pos, and @racket[#f] + otherwise.}) + + (proc-doc/names + drracket:language:make-text/pos + ((is-a?/c text%) number? number? + . -> . + drracket:language:text/pos?) + (text start end) + + @{Constructs a text/pos.}) + + (proc-doc/names + drracket:language:simple-settings-case-sensitive + (drracket:language:simple-settings? . -> . boolean?) + (simple-settings) + + @{Extracts the case-sensitive setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-printing-style + (drracket:language:simple-settings? + . -> . + (symbols 'constructor 'quasiquote 'write 'print)) + (simple-settings) + + @{Extracts the printing-style setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-fraction-style + (drracket:language:simple-settings? + . -> . + (symbols 'mixed-fraction + 'mixed-fraction-e + 'repeating-decimal + 'repeating-decimal-e)) + (simple-settings) + + @{Extracts the fraction-style setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-show-sharing + (drracket:language:simple-settings? + . -> . + boolean?) + (simple-settings) + + @{Extracts the show-sharing setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-insert-newlines + (drracket:language:simple-settings? + . -> . + boolean?) + (simple-settings) + + @{Extracts the insert-newline setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings-annotations + (drracket:language:simple-settings? + . -> . + (symbols 'none 'debug 'debug/profile 'test-coverage)) + (simple-settings) + + @{Extracts the debugging setting from a simple-settings.}) + + (proc-doc/names + drracket:language:simple-settings? + (any/c . -> . boolean?) + (val) + + @{Determines if @racket[val] is a simple-settings.}) + + (proc-doc/names + drracket:language:make-simple-settings + (-> boolean? + (symbols 'constructor 'quasiquote 'write 'trad-write 'print) + (symbols 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e) + boolean? + boolean? + (symbols 'none 'debug 'debug/profile 'test-coverage) + drracket:language:simple-settings?) + (case-sensitive + printing-style + fraction-style + show-sharing + insert-newlines + annotations) + + @{Constructs a simple settings.}) + + (proc-doc/names + drracket:language:simple-settings->vector + (drracket:language:simple-settings? . -> . vector?) + (simple-settings) + + @{Constructs a vector whose elements are the fields of @racket[simple-settings].})) diff --git a/collects/drracket/tool.rkt b/collects/drracket/tool.rkt new file mode 100644 index 0000000000..9d0842fc64 --- /dev/null +++ b/collects/drracket/tool.rkt @@ -0,0 +1,6 @@ +#lang racket/base +(require "private/drsig.ss") +(provide drracket:tool^ + drracket:tool-exports^ + drscheme:tool^ + (rename-out [drracket:tool-exports^ drscheme:tool-exports^])) diff --git a/collects/drscheme/drscheme.rkt b/collects/drscheme/drscheme.rkt index b5c00befe4..ed77a6e4e7 100644 --- a/collects/drscheme/drscheme.rkt +++ b/collects/drscheme/drscheme.rkt @@ -1,67 +1,2 @@ #lang racket/base -(require scheme/gui/base "private/key.rkt") - -(define debugging? (getenv "PLTDRDEBUG")) -(define profiling? (getenv "PLTDRPROFILE")) - -(define install-cm? (and (not debugging?) - (getenv "PLTDRCM"))) - -(define cm-trace? (or (equal? (getenv "PLTDRCM") "trace") - (equal? (getenv "PLTDRDEBUG") "trace"))) - - -;; the flush is only here to ensure that the output is -;; appears when running in cygwin under windows. -(define (flprintf fmt . args) - (apply printf fmt args) - (flush-output)) - -(when debugging? - (flprintf "PLTDRDEBUG: installing CM to load/create errortrace zos\n") - (let-values ([(zo-compile - make-compilation-manager-load/use-compiled-handler - manager-trace-handler) - (parameterize ([current-namespace (make-base-empty-namespace)] - [use-compiled-file-paths '()]) - (values - (dynamic-require 'errortrace/zo-compile 'zo-compile) - (dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler) - (dynamic-require 'compiler/cm 'manager-trace-handler)))]) - (current-compile zo-compile) - (use-compiled-file-paths (list (build-path "compiled" "errortrace"))) - (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) - (error-display-handler (dynamic-require 'errortrace/errortrace-lib - 'errortrace-error-display-handler)) - (when cm-trace? - (flprintf "PLTDRDEBUG: enabling CM tracing\n") - (manager-trace-handler - (λ (x) (display "1: ") (display x) (newline) (flush-output)))))) - -(when install-cm? - (flprintf "PLTDRCM: installing compilation manager\n") - (let-values ([(make-compilation-manager-load/use-compiled-handler - manager-trace-handler) - (parameterize ([current-namespace (make-base-empty-namespace)]) - (values - (dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler) - (dynamic-require 'compiler/cm 'manager-trace-handler)))]) - (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) - (when cm-trace? - (flprintf "PLTDRCM: enabling CM tracing\n") - (manager-trace-handler - (λ (x) (display "1: ") (display x) (newline) (flush-output)))))) - -(when profiling? - (flprintf "PLTDRPROFILE: installing profiler\n") - ;; NOTE that this might not always work. - ;; it creates a new custodian and installs it, but the - ;; original eventspace was created on the original custodian - ;; and this code does not create a new eventspace. - (let ([orig-cust (current-custodian)] - [orig-eventspace (current-eventspace)] - [new-cust (make-custodian)]) - (current-custodian new-cust) - ((dynamic-require 'drscheme/private/profile-drs 'start-profile) orig-cust))) - -(dynamic-require 'drscheme/private/drscheme-normal #f) +(require drracket/drracket) diff --git a/collects/drscheme/info.rkt b/collects/drscheme/info.rkt index 4a7185bb45..2442c15e2c 100644 --- a/collects/drscheme/info.rkt +++ b/collects/drscheme/info.rkt @@ -1,13 +1,4 @@ #lang setup/infotab -;(define tools '("sprof.rkt")) -;(define tool-names '("Sampling Profiler")) - -(define drracket-tools '("syncheck.rkt")) -(define drracket-tool-names '("Check Syntax")) - -(define gracket-launcher-names '("DrRacket")) -(define gracket-launcher-libraries '("drscheme.rkt")) - (define mred-launcher-names '("DrScheme")) (define mred-launcher-libraries '("drscheme.rkt")) diff --git a/collects/drscheme/tool-lib.rkt b/collects/drscheme/tool-lib.rkt index 177a04b420..4b4a1c3cfe 100644 --- a/collects/drscheme/tool-lib.rkt +++ b/collects/drscheme/tool-lib.rkt @@ -1,1578 +1,3 @@ -#lang at-exp racket/base - -#| - -This first time this is loaded, it loads all of DrRacket and invokes -the main unit, starting up DrRacket. After that, it just provides -all of the names in the tools library, for use defining keybindings - -|# -(require racket/class - racket/gui/base - (except-in scheme/unit struct) - racket/contract - racket/class - - ;; these have to be absolute requires for `include-extracted' to work with this file. - drscheme/private/link - drscheme/private/drsig - drscheme/private/language-object-contract - - framework - framework/splash - - mrlib/switchable-button - scribble/srcdoc) - -(require (for-syntax scheme/base)) - -(require/doc drscheme/private/ts ;; probably this also has to be an absolute require - scheme/base scribble/manual) - -(require/doc (for-label errortrace/errortrace-key - scheme/pretty - mzlib/pconvert)) - -(define-values/invoke-unit/infer drracket@) -(provide-signature-elements drracket:tool-cm^) ;; provide all of the classes & interfaces - -(provide drracket:unit:program-editor-mixin) -(define-syntax (drracket:unit:program-editor-mixin stx) - (syntax-case stx () - [(_ a ...) - #'((drracket:unit:get-program-editor-mixin) a ...)] - [_ #'(drracket:unit:get-program-editor-mixin)])) - -(language-object-abstraction drracket:language:object/c #t) - -(provide/doc - - (proc-doc/names - drracket:module-language-tools:add-opt-out-toolbar-button - (-> (-> (is-a?/c top-level-window<%>) - (is-a?/c area-container<%>) - (is-a?/c switchable-button%)) - symbol? - void?) - (make-button id) - @{Call this function to add another button to DrRacket's toolbar. When buttons are added this way, - DrRacket monitors the @tt{#lang} line at the top of the file; when it changes DrRacket queries - the language to see if this button should be included. - These buttons are ``opt out'', meaning that if the language doesn't explicitly ask to not - have this button (or all such buttons), the button will appear. - - @section-index["drscheme:opt-out-toolbar-buttons"] - See @racket[read-language] for more details on how language's specify how to opt out. - DrRacket will invoke the @tt{get-info} proc from @racket[read-language] with - @tt{'drscheme:opt-out-toolbar-buttons}. If the result is a list of symbols, the - listed symbols are opted out. If the result is @racket[#f], all buttons are opted - out. The default is the empty list, meaning that all opt-out buttons appear.. - }) - - (proc-doc/names - drracket:module-language:add-module-language - (-> any) - () - @{Adds the module language to DrRacket. This is called during DrRacket's startup.}) - - (proc-doc/names - drracket:module-language:module-language-put-file-mixin - (-> (implementation?/c text:basic<%>) (implementation?/c text:basic<%>)) - (super%) - @{Extends @racket[super%] by overriding the @method[editor<%> put-file] method - to use a default name from the buffer, if the buffer contains something like - @tt{(module name ...)}.}) - - - ; - ; - ; - ; ; - ; ; - ; ; - ; ;;; ; ; ;;; ; - ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; - ; ;;;;;; ; ; ;;;; ; - ; ; ; ; ; ; ; - ; ; ; ; ; ; - ; ;;;; ; ;;;;; ; - ; - ; - ; - - - (proc-doc/names - drracket:eval:set-basic-parameters - (-> (listof (is-a?/c snip-class%)) void?) - (snipclasses) - @{sets the parameters that are shared between the repl's - initialization and @racket[drracket:eval:build-user-eventspace/custodian] - - Specifically, it sets these parameters: - @itemize[ - @item{@racket[current-namespace] has been set to a newly - created empty namespace. This namespace has the following modules - copied (with @racket[namespace-attach-module]) - from DrRacket's original namespace: - @itemize[@item{@racket['mzscheme]}@item{@racket['mred]}] - } - @item{@racket[read-curly-brace-as-paren] - is @racket[#t]; } - @item{@racket[read-square-bracket-as-paren] - is @racket[#t];} - @item{@racket[error-print-width] is set to 250;} - @item{@racket[current-ps-setup] - is set to a newly created - @racket[ps-setup%] - object;} - @item{the @racket[exit-handler] is set to - a parameter that kills the user's custodian; and} - @item{the snip-class-list, returned by - @racket[get-the-snip-class-list] - is initialized with all of the snipclasses in DrRacket's eventspace's snip-class-list.}]}) - - (proc-doc/names - drracket:eval:get-snip-classes - (-> (listof (is-a?/c snip-class%))) - () - @{Returns a list of all of the snipclasses in the current eventspace.}) - - (proc-doc/names - drracket:eval:expand-program - (-> (or/c port? drracket:language:text/pos?) - drracket:language-configuration:language-settings? - boolean? - (-> void?) - (-> void?) - (-> (or/c eof-object? syntax? (cons/c string? any/c)) - (-> any) - any) - void?) - (input language-settings eval-compile-time-part? init kill-termination iter) - - @{Use this function to expand the contents of the definitions - window for use with external program processing tools. - - This function uses - @racket[drracket:eval:build-user-eventspace/custodian] - to build the user's environment. - The arguments @racket[language-settings], @racket[init], and - @racket[kill-termination] are passed to - @racket[drracket:eval:build-user-eventspace/custodian]. - - The @racket[input] argument specifies the source of the program. - - The @racket[eval-compile-time-part?] argument indicates if - @racket[expand] - is called or if - @racket[expand-top-level-with-compile-time-evals] - is called when the program is expanded. - Roughly speaking, if your tool will evaluate each expression - itself by calling - @racket[eval] - then pass @racket[#f]. Otherwise, if your tool - just processes the expanded program, be sure to pass - @racket[#t]. - - This function calls - @method[drracket:language:language<%> front-end/complete-program] - to expand the program. Unlike when the @onscreen{Run} is clicked, - however, it does not call - @method[drracket:language:language<%> front-end/finished-complete-program]. - - - The first argument to @racket[iter] is the expanded program - (represented as syntax) or eof. - The @racket[iter] argument is called for each expression in the - expanded program and once more with eof, unless an error is - raised during expansion. - It is called from the user's thread. - If an exception is raised during expansion of the - user's program, @racket[iter] is not called. - Consider setting the exception-handler during @racket[init] to - handle this situation. - - The second argument to @racket[iter] is a thunk that - continues expanding the rest of the contents of the - definitions window. If the first argument to @racket[iter] was - eof, this argument is just the primitive - @racket[void]. - - See also - @racket[drracket:eval:expand-program/multiple].}) - - (proc-doc/names - drracket:eval:traverse-program/multiple - (drracket:language-configuration:language-settings? - (-> void?) - (-> void?) - . -> . - ((or/c port? drracket:language:text/pos?) - ((or/c eof-object? syntax? (cons/c string? any/c)) - (-> any) - . -> . - any) - boolean? - . -> . - void?)) - (language-settings init kill-termination) - - @{This function is similar to - @racket[drracket:eval:expand-program/multiple] - The only difference is that it does not - expand the program in the editor; instead - the processing function can decide how to - expand the program.}) - - (proc-doc/names - drracket:eval:expand-program/multiple - (-> drracket:language-configuration:language-settings? - boolean? - (-> void?) - (-> void?) - (-> (or/c port? drracket:language:text/pos?) - (-> (or/c eof-object? syntax? (cons/c string? any/c)) - (-> any) - any) - boolean? - void?)) - (language-settings eval-compile-time-part? init kill-termination) - - @{This function is just like - @racket[drracket:eval:expand-program] - except that it is curried and the second application - can be used multiple times. - Use this function if you want to initialize the user's - thread (and namespace, etc) once but have program text - that comes from multiple sources. - - The extra boolean argument to the result function - determines if - @racket[drracket:language:language front-end/complete-program<%>] - or - @racket[drracket:language:language front-end/interaction<%>] - is called.}) - - (proc-doc/names - drracket:eval:build-user-eventspace/custodian - (->* (drracket:language-configuration:language-settings? - (-> void?) - (-> void?)) - () - (values eventspace? custodian?)) - ((language-settings init kill-termination) ()) - - @{This function creates a custodian and an eventspace (on the - new custodian) to expand the user's program. It does not - kill this custodian, but it can safely be shutdown (with - @racket[custodian-shutdown-all]) after the - expansion is finished. - - It initializes the - user's eventspace's main thread with several parameters: - @itemize[ - @item{ @racket[current-custodian] is set to a new custodian. - }@item{ - In addition, it calls - @racket[drracket:eval:set-basic-parameters]. - }] - - The @racket[language-settings] argument is the current - language and its settings. See - @racket[drracket:language-configuration:make-language-settings] - for details on that structure. - - If the program is associated with a DrRacket - frame, get the frame's language settings from the - @method[drracket:unit:definitions-text<%> get-next-settings] - method of - @racket[drracket:unit:definitions-text<%>]. Also, the most recently chosen language in - the language dialog is saved via the framework's - preferences. Apply - @racket[preferences:get] - to - @racket[drracket:language-configuration:get-settings-preferences-symbol] - for that @racket[language-settings]. - - The @racket[init] argument is called after the user's parameters - are all set, but before the program is run. It is called on - the user's thread. The - @racket[current-directory] and - @racket[current-load-relative-directory] - parameters are not set, so if there are appropriate directories, - the @racket[init] argument is a good place to set them. - - The @racket[kill-termination] argument is called when the main thread of - the eventspace terminates, no matter if the custodian was - shutdown, or the thread was killed. This procedure is also - called when the thread terminates normally. This procedure is - called from a new, dedicated thread (@italic{i. e.}, not the thread - created to do the expansion, nor the thread that - @racket[drracket:eval:build-user-eventspace/custodian] was called from.)}) - - - - ; - ; - ; - ; ; ; - ; ; ; - ; ; ; - ; ;; ; ;;; ; ;; ; ; ;; ; - ; ; ;; ; ; ;; ; ; ; ; ;; - ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ;;;;;; ; ; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; - ; ; ;; ; ;; ; ; ;; ; ;; - ; ;; ; ;;;; ; ;; ;; ; ;; ; - ; ; - ; ; ; - ; ;;;; - - (proc-doc/names - drracket:debug:error-display-handler/stacktrace - (->* (string? any/c) - ((or/c false/c (listof srcloc?)) - #:definitions-text (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) - #:interactions-text (or/c #f (is-a?/c drracket:rep:text<%>)) - ) - any/c) - ((msg exn) ((stack #f) - (defs #f) - (ints #f))) - @{Displays the error message represented by the string, adding - embellishments like those that appears in the DrRacket REPL, - specifically a clickable icon for the stack trace (if the srcloc location is not empty), - and a clickable icon for the source of the error (read & syntax errors show their source - locations and otherwise the first place in the stack trace is shown). - - If @racket[stack] is false, then the stack traces embedded in the @racket[exn] argument (if any) are used. - Specifically, this function looks for a stacktrace via - @racket[errortrace-key] in the continuation marks of @racket[exn] and @racket[continuation-mark-set->context]. - - If @racket[stack] is not false, that stack is added to the stacks already in the exception. - - This should be called in the same eventspace and on the same thread as the error.}) - - (proc-doc/names - drracket:debug:make-debug-error-display-handler - (-> (-> string? (or/c any/c exn?) any) - (-> string? (or/c any/c exn?) any)) - - (oedh) - - @{This function implements an error-display-handler in terms - of another error-display-handler. - - See also Racket's - @racket[error-display-handler] - parameter. - - If the current-error-port is the definitions window in - DrRacket, this error handler inserts some debugging - annotations, calls @racket[oedh], and then highlights the - source location of the runtime error. - - It looks for both stack trace information in the continuation - marks both via the - @schememodname[errortrace/errortrace-key] - module and via - @racket[continuation-mark-set->context]. - - }) - - (proc-doc/names - drracket:debug:hide-backtrace-window - (-> void?) - () - @{Hides the backtrace window.}) - - (proc-doc/names - drracket:debug:add-prefs-panel - (-> void?) - () - @{Adds the profiling preferences panel.}) - - (proc-doc/names - drracket:debug:open-and-highlight-in-file - (->* ((or/c srcloc? (listof srcloc?))) - ((or/c #f (cons/c (λ (x) (and (weak-box? x) - (let ([v (weak-box-value x)]) - (or (not v) - (is-a?/c v editor<%>))))) - number?))) - void?) - ((debug-info) - ((edition-pair #f))) - @{This function opens a DrRacket to display - @racket[debug-info]. Only the src the position - and the span fields of the srcloc are considered. - - The @racket[edition-pair] is used to determine if a - warning message is shown when before opening the file. - If the @racket[edition-pair] is not @racket[#f], it is compared - with the result of @method[text:basic<%> get-edition-number] - of the editor that is loaded to determine if the file has been - edited since the source location was recorded. If so, it - puts up a warning dialog message to that effect.}) - - (proc-doc/names - drracket:debug:show-backtrace-window/edition-pairs - (-> string? - (listof srcloc?) - (listof (or/c #f (cons/c (λ (x) (and (weak-box? x) - (let ([v (weak-box-value x)]) - (or (not v) - (is-a?/c v editor<%>))))) - number?))) - (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) - (or/c #f (is-a?/c drracket:rep:text<%>)) - void?) - (error-message dis editions-pairs defs ints) - @{Shows the backtrace window you get when clicking on the bug in - DrRacket's REPL. - - The @racket[error-message] argument is the text of the error, - @racket[dis] is the debug information, extracted from the - continuation mark in the exception record, using - @racket[errortrace-key]. - - The @racket[editions] argument indicates the editions of any editors - that are open editing the files corresponding to the source locations - - The @racket[defs] argument should be non-@racket[#f] if there are - possibly stacktrace frames that contain unsaved versions of the - definitions window from DrRacket. Similarly, the @racket[ints] argument - should be non-@racket[#f] if there are possibly stacktrace frames that contain - unsaved versions of the interactions window. - - Use - @racket[drracket:rep:current-rep] to get the rep during evaluation of a program. - - }) - - (proc-doc/names - drracket:debug:show-backtrace-window - (->* (string? - (or/c exn? - (listof srcloc?) - (non-empty-listof (cons/c string? (listof srcloc?))))) - ((or/c #f (is-a?/c drracket:rep:text<%>)) - (or/c #f (is-a?/c drracket:unit:definitions-text<%>))) - void?) - ((error-message dis) - ((rep #f) - (defs #f))) - @{Shows the backtrace window you get when clicking on the bug in - DrRacket's REPL. - - This function simply calls @racket[drracket:debug:show-backtrace-window/edition-pairs], - using @racket[drracket:debug:srcloc->edition/pair]. - }) - - (proc-doc/names - drracket:debug:srcloc->edition/pair - (-> srcloc? - (or/c #f (is-a?/c drracket:rep:text<%>)) - (or/c #f (is-a?/c drracket:unit:definitions-text<%>)) - (or/c #f (cons/c (let ([weak-box-containing-an-editor? - (λ (x) (and (weak-box? x) - (let ([v (weak-box-value x)]) - (or (not v) - (is-a?/c v editor<%>)))))]) - weak-box-containing-an-editor?) - number?))) - (srcloc ints defs) - @{Constructs a edition pair from a source location, - returning the current edition of the editor editing - the source location (if any). - - The @racket[ints] and @racket[defs] arguments are used to map source locations, - in the case that the source location corresponds to the definitions - window (when it has not been saved) or the interactions window. - }) - - - - ; - ; - ; - ; ;; ;; ;;; ;; - ; ;; ;; ;; ;; - ; ;; ;; ;; ;; - ; ;;;;;; ;;;; ;; ;;;;; ;;;;; ;;;; ;;;; ;; ;; - ; ;; ;; ;;; ;; ;; ;; ;; ;; ;;; ;;; ;; ;; ; ;; ; - ; ;; ;; ;;;;;; ;; ;; ;; ;;;;;;; ;; ;;;;;; ;;;; ;;;; - ; ;; ;; ;; ;; ;; ;; ;;;;;;; ;; ;; ;;;; ;;;;; - ; ;; ;; ;;; ; ;; ;; ;; ;; ;; ;;; ; ; ;; ;; ;; - ; ;; ;;; ;;;; ;; ;;;;; ;;;;;; ;;;; ;;;; ;; ;;; - ; ;; - ; ;; - ; ;; - - (proc-doc/names - drracket:help-desk:help-desk - (->* () - ((or/c #f string?) - (or/c #f string? (list/c string? string?))) - any) - (() - ((search-key #f) - (search-context #f))) - @{if @racket[search-key] is a string, calls @racket[perform-search] with - @racket[search-key] and @racket[search-context]. - - Otherwise, calls @racket[send-main-page] with no arguments.}) - - - ; - ; - ; - ; ; - ; - ; ; - ; ; ; ; ;; ; ;;;; - ; ; ; ;; ; ; ; - ; ; ; ; ; ; ; - ; ; ; ; ; ; ; - ; ; ; ; ; ; ; - ; ; ;; ; ; ; ; - ; ;; ; ; ; ; ;; - ; - ; - ; - - - (proc-doc/names - drracket:unit:get-program-editor-mixin - (-> ((subclass?/c text%) . -> . (subclass?/c text%))) - () - @{Returns a mixin that must be mixed in to any - @racket[text%] object that might contain - program text (and thus can be in the source - field of some syntax object). - - See also - @racket[drracket:unit:add-to-program-editor-mixin].}) - - (proc-doc/names - drracket:unit:add-to-program-editor-mixin - (((subclass?/c text%) . -> . (subclass?/c text%)) . -> . void?) - (mixin) - @{@phase[1] - - Adds @racket[mixin] to the result of - @racket[drracket:unit:get-program-editor-mixin].}) - - (proc-doc/names - drracket:unit:open-drscheme-window - (case-> - (-> (is-a?/c drracket:unit:frame%)) - ((or/c string? false/c) . -> . (is-a?/c drracket:unit:frame%))) - (() (filename)) - - @{Opens a DrRacket frame that displays - @racket[filename], - or nothing if @racket[filename] is @racket[#f] or not supplied.}) - - ; - ; - ; - ; ; - ; ; - ; ; - ; ; ;; ;; ;;; ;; ; ;;; ;;; - ; ;; ;; ; ; ; ; ;; ; ; ; - ; ; ; ; ; ; ; ; ; ; ;; - ; ; ; ; ; ; ; ; ;;;;;; ;; - ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ;; ; ; - ; ; ; ; ;;; ;; ; ;;;; ;;; - ; - ; - ; - - - (proc-doc/names - drracket:modes:add-mode - (string? - (or/c false/c (is-a?/c mode:surrogate-text<%>)) - ((is-a?/c drracket:rep:text%) number? . -> . boolean?) - ((or/c false/c (listof string?)) . -> . boolean?) - . -> . - drracket:modes:mode?) - (name surrogate repl-submit matches-language) - @{Adds a mode to DrRacket. Returns a mode value - that identifies the mode. - - The first argument, @racket[name], is the name - of the mode, used in DrRacket's GUI to allow - the user to select this mode. - - The @racket[surrogate] argument is set to the - definitions text and the interactions text - (via the - @racket[mode:host-text set-surrogate<%>] - method) whenever this mode is enabled. - - The @racket[repl-submit] procedure is called - whenever the user types a return in the interactions - window. It is passed the interactions editor - and the position where the last prompt occurs. - If it - returns @racket[#t], the text after the last - prompt is treated as a program fragment and - evaluated, according to the language settings. - If it returns @racket[#f], the text is - assumed to be an incomplete program fragment, and - the keystroke is not treated specially. - - The @racket[matches-language] predicate is called whenever - the language changes. If it returns @racket[#t] - this mode is installed. It is passed the list of strings - that correspond to the names of the language in the - language dialog. - - Modes are tested in the opposite order that they are - added. That is, the last mode to be added gets tested - first when the filename changes or when the language - changes. - - See also - @racket[drracket:modes:get-modes].}) - - (proc-doc/names - drracket:modes:mode? - (any/c . -> . boolean?) - (val) - @{Determines if @racket[val] is a mode.}) - - (proc-doc/names - drracket:modes:get-modes - (-> (listof drracket:modes:mode?)) - () - @{Returns all of the modes currently added to DrRacket. - - See also - @racket[drracket:modes:add-mode].}) - - (proc-doc/names - drracket:modes:mode-name - (drracket:modes:mode? . -> . string?) - (mode) - @{Extracts the name of the mode. - - See also - @racket[drracket:modes:add-mode].}) - - (proc-doc/names - drracket:modes:mode-surrogate - (drracket:modes:mode? . -> . (or/c false/c (is-a?/c mode:surrogate-text<%>))) - (mode) - @{Extracts the surrogate of the mode. - - See also - @racket[drracket:modes:add-mode].}) - - (proc-doc/names - drracket:modes:mode-repl-submit - (drracket:modes:mode? . -> . any) - (mode) - @{Extracts the repl submission predicate of the mode. - - See also - @racket[drracket:modes:add-mode].}) - - (proc-doc/names - drracket:modes:mode-matches-language - (drracket:modes:mode? . -> . ((or/c false/c (listof string?)) . -> . boolean?)) - (mode) - @{Extracts the language matching predicate of the mode. - - See also - @racket[drracket:modes:add-mode].}) - - - ; - ; - ; - ; - ; - ; - ; ; ; ;;; ; ;; - ; ;; ; ; ;; ; - ; ; ; ; ; ; - ; ; ;;;;;; ; ; - ; ; ; ; ; - ; ; ; ;; ; - ; ; ;;;; ; ;; - ; ; - ; ; - ; ; - - - (proc-doc/names - drracket:rep:get-welcome-delta - (-> (is-a?/c style-delta%)) - () - @{Returns a style delta that matches the style and color of the - phrase ``Welcome to'' in the beginning of the interactions window.}) - - (proc-doc/names - drracket:rep:get-dark-green-delta - (-> (is-a?/c style-delta%)) - () - @{Returns a style delta that matches the style and color of the - name of a language in the interactions window.}) - - (proc-doc/names - drracket:rep:get-drs-bindings-keymap - (-> (is-a?/c keymap%)) - () - @{Returns a keymap that binds various DrRacket-specific - keybindings. This keymap is used in the definitions - and interactions window. - - Defaultly binds C-x;o to a function that switches - the focus between the definitions and interactions - windows. Also binds f5 to Execute and f1 to Help Desk.}) - - (proc-doc/names - drracket:rep:current-rep - (-> (or/c false/c (is-a?/c drracket:rep:text%))) - () - - @{This is a parameter whose value should not be set by tools. - It is initialized to the repl that controls this evaluation - in the user's thread. - - It only returns @racket[#f] if the program not running - in the context of a repl (eg, the test suite window).}) - - (proc-doc/names - drracket:rep:current-value-port - (-> (or/c false/c port?)) - () - @{This is a parameter whose value is a port that - prints in the REPL in blue. It is used to print - the values of toplevel expressions in the REPL. - - It is only initialized on the user's thread.}) - - - ; - ; - ; - ; ; ; - ; ; ; - ; ; ; ; ; - ; ;; ; ;;; ;;;; ; ;;; ; ; ;;;; ;;; ; ;; ;; ; - ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; ; ; ;; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ;;;;;; ; ; ;;;;;; ; ; ;;;;;; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; - ; ;; ; ;;;; ;; ; ;;;; ; ; ;; ;;;; ; ; ;; ; - ; ; ; - ; ; ; ; - ; ;;;; - - - (proc-doc/names - drracket:get/extend:extend-tab - (case-> - ((make-mixin-contract drracket:unit:tab<%>) . -> . void?) - ((make-mixin-contract drracket:unit:tab<%>) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This class implements the tabs in DrRacket. One is created for each tab - in a frame (each frame always has at least one tab, even if the tab bar is not shown) - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#t].}) - - (proc-doc/names - drracket:get/extend:extend-interactions-text - (case-> - ((make-mixin-contract drracket:rep:text<%>) . -> . void?) - ((make-mixin-contract drracket:rep:text<%>) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This text is used in the bottom window of DrRacket frames. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#t].}) - - (proc-doc/names - drracket:get/extend:get-interactions-text - (-> (implementation?/c drracket:rep:text<%>)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-interactions-text] - raises an error, disallowing any more extensions.}) - - (proc-doc/names - drracket:get/extend:extend-definitions-text - (case-> - ((make-mixin-contract drracket:unit:definitions-text<%>) . -> . void?) - ((make-mixin-contract drracket:unit:definitions-text<%>) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This text is used in the top window of DrRacket frames. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#f].}) - - (proc-doc/names - drracket:get/extend:get-definitions-text - (-> (implementation?/c drracket:unit:definitions-text<%>)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-definitions-text] - raises an error, disallowing any more extensions.}) - - (proc-doc/names - drracket:get/extend:extend-interactions-canvas - (case-> - ((make-mixin-contract drracket:unit:interactions-canvas%) . -> . void?) - ((make-mixin-contract drracket:unit:interactions-canvas%) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This canvas is used in the bottom window of DrRacket frames. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#f].}) - - (proc-doc/names - drracket:get/extend:get-interactions-canvas - (-> (subclass?/c drracket:unit:interactions-canvas%)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-interactions-canvas] - raises an error, disallowing any more extensions.}) - - (proc-doc/names - drracket:get/extend:extend-definitions-canvas - (case-> - ((make-mixin-contract drracket:unit:definitions-canvas%) . -> . void?) - ((make-mixin-contract drracket:unit:definitions-canvas%) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This canvas is used in the top window of DrRacket frames. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#f].}) - - (proc-doc/names - drracket:get/extend:get-definitions-canvas - (-> (subclass?/c drracket:unit:definitions-canvas%)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-definitions-canvas] - raises an error, disallowing any more extensions.}) - - (proc-doc/names - drracket:get/extend:extend-unit-frame - (case-> - ((make-mixin-contract drracket:unit:frame%) . -> . void?) - ((make-mixin-contract drracket:unit:frame%) boolean? . -> . void?)) - ((mixin) (mixin before?)) - - @{This is the frame that implements the main DrRacket window. - - The argument, @racket[before], controls if the mixin is applied before or - after already installed mixins. - If unsupplied, this is the same as supplying @racket[#f].}) - - (proc-doc/names - drracket:get/extend:get-unit-frame - (-> (subclass?/c drracket:unit:frame%)) - () - - @{Once this function is called, - @racket[drracket:get/extend:extend-unit-frame] - raises an error, disallowing any more extensions.}) - - - - ; - ; - ; - ; - ; ; ;;; - ; ;;; - ; ;;;; ;;; ;;;;;;; ;;; ;;; ;;; ;; ;; ;;; - ; ;;;; ;;;;;;;;;;;; ;;;;; ;;; ;;;;;;; ;;;;;;; - ; ;;; ;;; ;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;; - ; ;;; ;;; ;;;;; ;;; ;;; ;;; ;;; ;;; ;;; - ; ;;; ;;; ;;; ;;; ;;; ;; ;;; ;;; ;;; ;;; ;;; - ; ;;;; ;;; ;;; ;;; ;;;;; ;;; ;;; ;;; ;;;;;;; - ; ;;; ;;; ;;;;;; ;;; ;;; ;;; ;;; ;; ;;; - ; ;;; - ; ;;;;;; - ; - ; - - (proc-doc/names - drracket:tracing:annotate - (-> syntax? syntax?) - (stx) - @{Call this function to add tracing annotations to the a fully-expanded - expression. When the program runs, DrRacket will pop open the tracing - window to display the trace.}) - - ; - ; - ; - ; ; - ; ; - ; ; - ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; - ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; - ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; - ; ; ; - ; ; ; ; ; - ; ;;;; ;;;; - ; - ; - ; - ; ;;; ; ; - ; ; - ; ; ; - ; ;;; ;;; ; ;; ;;;; ; ;; ; ; ; ; ; ;;; ;;;; ; ;;; ; ;; - ; ; ; ; ; ;; ; ; ; ; ;; ; ; ;; ; ; ; ; ; ; ;; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ;;;; ; ; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ; ; ; ;; ; ;; ; ; ; ; ; ; ; ; ; - ; ;;; ;;; ; ; ; ; ;; ; ;; ; ; ;;;;; ;; ; ;;; ; ; - ; ; - ; ; ; - ; ;;;; - - (proc-doc/names - drracket:language-configuration:get-languages - (-> (listof (is-a?/c drracket:language:language<%>))) - () - @{This can only be called after all of the tools initialization phases have completed. - - Returns the list of all of the languages installed in DrRacket.}) - - (proc-doc/names - drracket:language-configuration:add-language - ((and/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) - . -> . void?) - (language) - - @{@phase[2] - - Adds @racket[language] to the languages offerend by DrRacket.}) - - (proc-doc/names - drracket:language-configuration:get-settings-preferences-symbol - (-> symbol?) - () - @{Returns the symbol that is used to store the user's language - settings. Use as an argument to either - @racket[preferences:get] - or - @racket[preferences:set].}) - - (proc-doc/names - drracket:language-configuration:make-language-settings - ((or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c) - any/c - . -> . - drracket:language-configuration:language-settings?) - (language settings) - - @{This is the constructor for a record consisting of two - elements, a language and its settings. - - The settings is a language-specific record that holds a - value describing a parameterization of the language. - - It has two selectors, - @racket[drracket:language-configuration:language-settings-language] - and - @racket[drracket:language-configuration:language-settings-settings], and a predicate, - @racket[drracket:language-configuration:language-settings?]}) - - (proc-doc/names - drracket:language-configuration:language-settings-settings - (-> drracket:language-configuration:language-settings? - any/c) - (ls) - @{Extracts the settings field of a language-settings.}) - - (proc-doc/names - drracket:language-configuration:language-settings-language - (drracket:language-configuration:language-settings? - . -> . - (or/c (is-a?/c drracket:language:language<%>) drracket:language:object/c)) - (ls) - - @{Extracts the language field of a language-settings.}) - - (proc-doc/names - drracket:language-configuration:language-settings? - (any/c . -> . boolean?) - (val) - - @{Determines if the argument is a language-settings or not.}) - - (proc-doc/names - drracket:language-configuration:language-dialog - (->* (boolean? drracket:language-configuration:language-settings?) - ((or/c false/c (is-a?/c top-level-window<%>))) - (or/c false/c drracket:language-configuration:language-settings?)) - ((show-welcome? language-settings-to-show) - ((parent #t))) - @{Opens the language configuration dialog. - See also - @racket[drracket:language-configuration:fill-language-dialog]. - - The @racket[show-welcome?] argument determines if - if a ``Welcome to DrRacket'' message and some - natural language buttons are shown. - - The @racket[language-settings-to-show] argument - must be some default language settings that the dialog - is initialized to. - If unsure of a default, the currently set language - in the user's preferences can be obtained via: - @schemeblock[ - (preferences:get (drracket:language-configuration:get-settings-preferences-symbol)) - ] - - The @racket[parent] argument is used as the parent - to the dialog. - - The result if @racket[#f] when the user cancells the dialog, and - the selected language if they hit ok.}) - - (proc-doc/names - drracket:language-configuration:fill-language-dialog - (->* - ((is-a?/c vertical-panel%) - (is-a?/c area-container<%>) - drracket:language-configuration:language-settings?) - ((or/c false/c (is-a?/c top-level-window<%>)) - (-> symbol? void?)) - drracket:language-configuration:language-settings?) - ((panel button-panel language-setting) - ((re-center #f) - (ok-handler void))) - @{This procedure accepts two parent panels and - fills them with the contents of the language dialog. - It is used to include language configuration controls - in some larger context in another dialog. - - The @racket[panel] argument is the main panel where the - language controls will be placed. - The function adds buttons to the @racket[button-panel] - to revert a language to its default settings and to - show the details of a language. - - The @racket[language-setting] is the default - language to show in the dialog. - - The @racket[re-center] argument is used when the @onscreen{Show Details} - button is clicked. If that argument is a @racket[top-level-window<%>], - the @onscreen{Show Details} callback will recenter the window each time - it is clicked. Otherwise, the argument is not used. - - @racket[ok-handler] is a function that is in charge of interfacing the OK - button. It should accept a symbol message: @racket['enable] and - @racket['disable] to toggle the button, and @racket['execute] to run - the desired operation. (The language selection dialog also uses an - internal @racket['enable-sync] message.)}) - - (proc-doc - drracket:language:register-capability - (->d ([s symbol?] - [the-contract contract?] - [default the-contract]) - () - [res void?]) - @{Registers a new capability with a default value for each language - and a contract on the values the capability might have. - - By default, these capabilities are registered as DrRacket starts up: - @(let-syntax ([cap (syntax-rules () - [(cap key contract default desc ...) - (item @racket['key : contract = default] - "--- " desc ...)])]) - (itemize - @cap[drracket:check-syntax-button boolean? #t]{controls the visiblity of the check syntax button} - @cap[drracket:language-menu-title - string? - (string-constant scheme-menu-name)]{ - controls the name of the menu just to the right of the language - menu (defaultly named ``Racket'')} - @cap[drscheme:define-popup - (or/c #f - (list/c string? string? string?) - (cons/c string? string?)) - (list "(define" "(define ...)" "δ")]{ - specifies the prefix that the define popup should look for and what - label it should have, or @racket[#f] if it should not appear at all. - - If the list of three strings alternative is used, the first string is - the prefix that is looked for when finding definitions. The second - and third strings are used as the label of the control, in horizontal - and vertical mode, respectively. - - The pair of strings alternative is deprecated. If it is used, - the pair @racket[(cons a-str b-str)] is the same as @racket[(list a-str b-str "δ")].} - @cap[drscheme:help-context-term (or/c false/c string?) #f]{ - specifies a context query for documentation searches that are - initiated in this language, can be @racket[#f] (no change to the - user's setting) or a string to be used as a context query (note: the - context is later maintained as a cookie, @racket[""] is different - from @racket[#f] in that it clears the stored context)} - @cap[drscheme:special:insert-fraction boolean? #t]{ - determines if the insert fraction menu item in the special menu is - visible} - @cap[drscheme:special:insert-lambda boolean? #t]{ - determines if the insert lambda menu item in the special menu is - visible} - @cap[drscheme:special:insert-large-letters boolean? #t]{ - determines if the insert large letters menu item in the special menu - is visible} - @cap[drscheme:special:insert-image boolean? #t]{ - determines if the insert image menu item in the special menu is - visible} - @cap[drscheme:special:insert-comment-box boolean? #t]{ - determines if the insert comment box menu item in the special menu - is visible} - @cap[drscheme:special:insert-gui-tool boolean? #t]{ - determines if the insert gui menu item in the special menu is - visible} - @cap[drscheme:special:slideshow-menu-item boolean? #t]{ - determines if the insert pict box menu item in the special menu is - visible} - @cap[drscheme:special:insert-text-box boolean? #t]{ - determines if the insert text box menu item in the special menu is - visible} - @cap[drscheme:special:xml-menus boolean? #t]{ - determines if the insert scheme box, insert scheme splice box, and - the insert xml box menu item in the special menu are visible} - @cap[drscheme:autocomplete-words (listof string?) '()]{ - determines the list of words that are used when completing words in - this language} - @cap[drscheme:tabify-menu-callback - (or/c false/c (-> (is-a?/c text%) number? number? void?)) - (λ (t a b) (send t tabify-selection a b))]{ - is used as the callback when the ``Reindent'' or ``Reindent All'' - menu is selected. The first argument is the editor, and the second - and third are a range in the editor.} - ))}) - - (proc-doc/names - drracket:language:capability-registered? - (-> symbol? boolean?) - (s) - @{Indicates if - @racket[drracket:language:register-capability] - has been called with @racket[s].}) - (proc-doc - drracket:language:get-capability-default - (->d ([s (and/c symbol? drracket:language:capability-registered?)]) - () - [res (drracket:language:get-capability-contract s)]) - @{Returns the default for a particular capability.}) - (proc-doc/names - drracket:language:get-capability-contract - (-> (and/c symbol? drracket:language:capability-registered?) - contract?) - (s) - @{Returns the contract for a given capability, which was specified - when @racket[drracket:language:register-capability] was called.}) - - - ; - ; - ; - ; ; - ; ; - ; ; - ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; - ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; - ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; - ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; - ; ; ; - ; ; ; ; ; - ; ;;;; ;;;; - - - (proc-doc/names - drracket:language:add-snip-value - (->* ((-> any/c boolean?) - (-> any/c (is-a?/c snip%))) - ((-> any/c)) - void?) - ((test-value convert-value) - ((setup-thunk void))) - @{Registers a handler to convert values into snips as they are printed in the REPL. - - The @racket[test-snip] argument is called to determine if this handler can convert the value - and the @racket[convert-value] argument is called to build a snip. - The (optional) @racket[setup-thunk] is called just after the user's namespace and other - setings are built, but before any of the user's code is evaluated. - - All three functions are called on the user's thread and with the user's settings.}) - - (proc-doc/names - drracket:language:extend-language-interface - (-> interface? - (make-mixin-contract drracket:language:language<%>) - void?) - (interface default-implementation) - - @{@phase[1] - - Each language added passed to - @racket[drracket:language-configuration:add-language] - must implement @racket[interface]. - - The @racket[default-implementation] is a mixin - that provides a default implementation of - @racket[interface]. Languages that are unaware of - the specifics of @racket[extension] use - @racket[default-implementation] via - @racket[drracket:language:get-default-mixin].}) - - (proc-doc - drracket:language:get-default-mixin - (-> (make-mixin-contract drracket:language:language<%>)) - - @{@phase[2] - - The result of this function is the composite of all of the - @racket[default-implementation] arguments passed - to - @racket[drracket:language:extend-language-interface].}) - - (proc-doc/names - drracket:language:get-language-extensions - (-> (listof interface?)) - () - @{@phase[2] - - Returns a list of the interfaces passed to - @racket[drracket:language:extend-language-interface].}) - - (proc-doc/names - drracket:language:put-executable - ((is-a?/c top-level-window<%>) - path? - (or/c boolean? (symbols 'launcher 'standalone 'distribution)) - boolean? - string? - . -> . (or/c false/c path?)) - (parent program-filename mode mred? title) - @{Calls the MrEd primitive - @racket[put-file] - with arguments appropriate for creating an executable - from the file @racket[program-filename]. - - The arguments @racket[mred?] and @racket[mode] indicates - what type of executable this should be (and the dialog - may be slightly different on some platforms, depending - on these arguments). For historical reasons, @racket[#f] - is allowed for @racket[mode] as an alias for @racket['launcher], and - @racket[#t] is allowed for @racket[mode] as an alias for @racket['stand-alone]. - - The @racket[title] argument is used as the title to the primitive - @racket[put-file] - or - @racket[get-directory] - primitive.}) - - (proc-doc/names - drracket:language:create-executable-gui - ((or/c false/c (is-a?/c top-level-window<%>)) - (or/c false/c string?) - (or/c (λ (x) (eq? x #t)) (symbols 'launcher 'standalone 'distribution)) - (or/c (λ (x) (eq? x #t)) (symbols 'mzscheme 'mred)) - . -> . - (or/c false/c - (list/c (symbols 'no-show 'launcher 'stand-alone 'distribution) - (symbols 'no-show 'mred 'mzscheme) - string?))) - (parent program-name show-type show-base) - @{Opens a dialog to prompt the user about their choice of executable. - If @racket[show-type] is @racket[#t], the user is prompted about - a choice of executable: stand-alone, - launcher, or distribution; otherwise, the symbol determines the type. - If @racket[show-base] - is @racket[#t], the user is prompted about a choice of base - binary: mzscheme or mred; otherwise the symbol determines the base. - - The @racket[program-name] argument is used to construct the default - executable name in a platform-specific manner. - - The @racket[parent] argument is used for the parent of the dialog. - - The result of this function is @racket[#f] if the user cancel's - the dialog and a list of three items indicating what options - they chose. If either @racket[show-type] or @racket[show-base] - was not @racket[#t], the corresponding result will be @racket['no-show], - otherwise it will indicate the user's choice.}) - - (proc-doc/names - drracket:language:create-module-based-stand-alone-executable - ((or/c path? string?) - (or/c path? string?) any/c any/c any/c boolean? boolean? - . -> . - void?) - (program-filename - executable-filename - module-language-spec - transformer-module-language-spec - init-code - gui? - use-copy?) - - @{This procedure creates a stand-alone executable in the file - @racket[executable-filename] that runs the program - @racket[program-filename]. - - The arguments - @racket[module-language-spec] and - @racket[transformer-module-language-spec] specify the - settings of the initial namespace, both the transformer - portion and the regular portion. Both may be @racket[#f] - to indicate there are no initial bindings. - - The @racket[init-code] argument is an s-expression representing - the code for a module. This module is expected to provide - the identifer @racket[init-code], bound to a procedure of no - arguments. That module is required and the @racket[init-code] - procedure is executed to initialize language-specific - settings before the code in @racket[program-filename] runs. - - The @racket[gui?] argument indicates if a GRacket or Racket - stand-alone executable is created. - - The @racket[use-copy?] argument indicates if the initial - namespace should be populated with - @racket[namespace-require/copy] or - @racket[namespace-require]. }) - - (proc-doc/names - drracket:language:create-module-based-distribution - ((or/c path? string?) - (or/c path? string?) any/c any/c any/c boolean? boolean? - . -> . - void?) - (program-filename - distribution-filename - module-language-spec - transformer-module-language-spec - init-code - gui? - use-copy?) - - @{Like - @racket[drracket:language:create-module-based-stand-alone-executable], but packages the stand-alone executable into a distribution.}) - - (proc-doc/names - drracket:language:create-distribution-for-executable - ((or/c path? string?) - boolean? - (-> path? void?) - . -> . - void?) - (distribution-filename - gui? - make-executable) - - @{Creates a distribution where the given @racket[make-executable] procedure - creates the stand-alone executable to be distributed. - The @racket[make-executable] procedure is given the name of the - executable to create. The @racket[gui?] argument is needed in case the - executable's name (which @racket[drracket:language:create-distribution-for-executable] - must generate) depends on the type of executable. During the distribution-making - process, a progress dialog is shown to the user, and the user can click an - @onscreen{Abort} button that sends a break to the current thread.}) - - (proc-doc/names - drracket:language:create-module-based-launcher - ((or/c path? string?) (or/c path? string?) any/c any/c any/c boolean? boolean? - . -> . - void?) - (program-filename - executable-filename - module-language-spec - transformer-module-language-spec - init-code - gui? - use-copy?) - - @{This procedure is identical to - @racket[drracket:language:create-module-based-stand-alone-executable], except that it creates a launcher instead of a - stand-alone executable.}) - - (proc-doc/names - drracket:language:simple-module-based-language-convert-value - (-> any/c drracket:language:simple-settings? any/c) - (value settings) - @{Sets the @racket[constructor-style-printing] and @racket[show-sharing] - parameters based on @racket[settings] and sets @racket[current-print-convert-hook] - to ignore snips and then uses @racket[print-convert] on @racket[value]. - - Unless, of course, the @racket[settings] argument has @racket['write] in - the @racket[simple-settings-printing-style] field, in which case it simply - returns @racket[value].}) - - (proc-doc/names - drracket:language:setup-printing-parameters - (-> (-> any) drracket:language:simple-settings? (or/c number? 'infinity) any) - (thunk settings width) - @{Sets all of the @racket[pretty-print] and @racket[print-convert] parameters - either to the defaults to values based on @racket[settings] - and then invokes @racket[thunk], returning what it returns.}) - - (proc-doc/names - drracket:language:text/pos-text - (drracket:language:text/pos? . -> . (is-a?/c text%)) - (text/pos) - - @{Selects the @racket[text%] from a text/pos.}) - - (proc-doc/names - drracket:language:text/pos-start - (drracket:language:text/pos? . -> . number?) - (text/pos) - - @{Selects the starting position from a text/pos.}) - - (proc-doc/names - drracket:language:text/pos-end - (drracket:language:text/pos? . -> . number?) - (text/pos) - - @{Selects the ending position from a text/pos.}) - - (proc-doc/names - drracket:language:text/pos? - (any/c . -> . boolean?) - (val) - - @{Returns @racket[#t] if @racket[val] is a text/pos, and @racket[#f] - otherwise.}) - - (proc-doc/names - drracket:language:make-text/pos - ((is-a?/c text%) number? number? - . -> . - drracket:language:text/pos?) - (text start end) - - @{Constructs a text/pos.}) - - (proc-doc/names - drracket:language:simple-settings-case-sensitive - (drracket:language:simple-settings? . -> . boolean?) - (simple-settings) - - @{Extracts the case-sensitive setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-printing-style - (drracket:language:simple-settings? - . -> . - (symbols 'constructor 'quasiquote 'write)) - (simple-settings) - - @{Extracts the printing-style setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-fraction-style - (drracket:language:simple-settings? - . -> . - (symbols 'mixed-fraction - 'mixed-fraction-e - 'repeating-decimal - 'repeating-decimal-e)) - (simple-settings) - - @{Extracts the fraction-style setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-show-sharing - (drracket:language:simple-settings? - . -> . - boolean?) - (simple-settings) - - @{Extracts the show-sharing setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-insert-newlines - (drracket:language:simple-settings? - . -> . - boolean?) - (simple-settings) - - @{Extracts the insert-newline setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings-annotations - (drracket:language:simple-settings? - . -> . - (symbols 'none 'debug 'debug/profile 'test-coverage)) - (simple-settings) - - @{Extracts the debugging setting from a simple-settings.}) - - (proc-doc/names - drracket:language:simple-settings? - (any/c . -> . boolean?) - (val) - - @{Determines if @racket[val] is a simple-settings.}) - - (proc-doc/names - drracket:language:make-simple-settings - (-> boolean? - (symbols 'constructor 'quasiquote 'write) - (symbols 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e) - boolean? - boolean? - (symbols 'none 'debug 'debug/profile 'test-coverage) - drracket:language:simple-settings?) - (case-sensitive - printing-style - fraction-style - show-sharing - insert-newlines - annotations) - - @{Constructs a simple settings.}) - - (proc-doc/names - drracket:language:simple-settings->vector - (drracket:language:simple-settings? . -> . vector?) - (simple-settings) - - @{Constructs a vector whose elements are the fields of @racket[simple-settings].})) +#lang racket/base +(require drracket/tool-lib) +(provide (all-from-out drracket/tool-lib)) diff --git a/collects/drscheme/tool.rkt b/collects/drscheme/tool.rkt index 9d0842fc64..50df191632 100644 --- a/collects/drscheme/tool.rkt +++ b/collects/drscheme/tool.rkt @@ -1,6 +1,3 @@ #lang racket/base -(require "private/drsig.ss") -(provide drracket:tool^ - drracket:tool-exports^ - drscheme:tool^ - (rename-out [drracket:tool-exports^ drscheme:tool-exports^])) +(require drracket/tool) +(provide (all-from-out drracket/tool)) diff --git a/collects/eopl/eopl-tool.rkt b/collects/eopl/eopl-tool.rkt index fca21fb28c..87384f8333 100644 --- a/collects/eopl/eopl-tool.rkt +++ b/collects/eopl/eopl-tool.rkt @@ -46,6 +46,14 @@ wraps the load of the module.) (drscheme:language:simple-module-based-language->module-based-language-mixin language-base%)) (define/override (use-namespace-require/copy?) #t) + (define/override (default-settings) + (let ([s (super default-settings)]) + (drscheme:language:make-simple-settings (drscheme:language:simple-settings-case-sensitive s) + 'trad-write + (drscheme:language:simple-settings-fraction-style s) + (drscheme:language:simple-settings-show-sharing s) + (drscheme:language:simple-settings-insert-newlines s) + (drscheme:language:simple-settings-annotations s)))) (define/override (on-execute settings run-in-user-thread) (super on-execute settings run-in-user-thread) (print-mpair-curly-braces #f) diff --git a/collects/eopl/lang/reader.rkt b/collects/eopl/lang/reader.rkt index 8bc9b08724..b8b5aa123e 100644 --- a/collects/eopl/lang/reader.rkt +++ b/collects/eopl/lang/reader.rkt @@ -1,2 +1,3 @@ #lang s-exp syntax/module-reader eopl +#:language-info '#(scheme/language-info get-info #f) diff --git a/collects/framework/main.rkt b/collects/framework/main.rkt index f98deaefd1..7568e710ff 100644 --- a/collects/framework/main.rkt +++ b/collects/framework/main.rkt @@ -247,7 +247,7 @@ (-> void?) () @{Adds a preferences panel for configuring options related to - Scheme.}) + Racket.}) (proc-doc/names preferences:add-to-warnings-checkbox-panel @@ -261,7 +261,7 @@ (((is-a?/c vertical-panel%) . -> . void?) . -> . void?) (proc) @{Saves @scheme[proc] until the preferences panel is created, when it - is called with the Scheme preferences panel to add new children to + is called with the Racket preferences panel to add new children to the panel.}) (proc-doc/names @@ -1343,14 +1343,14 @@ scheme:get-keymap (-> (is-a?/c keymap%)) () - @{Returns a keymap with binding suitable for Scheme.}) + @{Returns a keymap with binding suitable for Racket.}) (proc-doc/names scheme:add-coloring-preferences-panel (-> any) () @{ - Installs the ``Scheme'' preferences panel in the ``Syntax Coloring'' + Installs the ``Racket'' preferences panel in the ``Syntax Coloring'' section.}) (proc-doc/names @@ -1359,7 +1359,7 @@ () @{Returns a table mapping from symbols - (naming the categories that the online colorer uses for Scheme mode coloring) to their colors. + (naming the categories that the online colorer uses for Racket mode coloring) to their colors. These symbols are suitable for input to @scheme[scheme:short-sym->pref-name] and @@ -1373,7 +1373,7 @@ () @{Returns a table mapping from symbols - (naming the categories that the online colorer uses for Scheme mode coloring) to their colors when + (naming the categories that the online colorer uses for Racket mode coloring) to their colors when the user chooses the white-on-black mode in the preferences dialog. See also @scheme[scheme:get-color-prefs-table].}) @@ -1399,7 +1399,7 @@ (-> (is-a?/c editor-wordbreak-map%)) () @{This method returns a @scheme[editor-wordbreak-map%] that is suitable - for Scheme.}) + for Racket.}) (proc-doc/names scheme:init-wordbreak-map @@ -1411,7 +1411,7 @@ scheme:setup-keymap ((is-a?/c keymap%) . -> . void?) (keymap) - @{Initializes @scheme[keymap] with Scheme-mode keybindings.}) + @{Initializes @scheme[keymap] with Racket-mode keybindings.}) (proc-doc/names editor:set-default-font-color diff --git a/collects/framework/private/scheme.rkt b/collects/framework/private/scheme.rkt index 96c002c075..f704fde98c 100644 --- a/collects/framework/private/scheme.rkt +++ b/collects/framework/private/scheme.rkt @@ -1186,7 +1186,7 @@ (values lexeme type paren start end backup-delta mode))))) (define/override (put-file text sup directory default-name) - (parameterize ([finder:default-extension "ss"] + (parameterize ([finder:default-extension "rkt"] [finder:default-filters '(["Racket Sources" "*.rkt;*.ss;*.scm"] ["Any" "*.*"])]) ;; don't call the surrogate's super, since it sets the default extension diff --git a/collects/lang/htdp-langs.rkt b/collects/lang/htdp-langs.rkt index 0396a1a496..9be1b078b5 100644 --- a/collects/lang/htdp-langs.rkt +++ b/collects/lang/htdp-langs.rkt @@ -196,17 +196,24 @@ (set-printing-parameters settings (λ () - (let ([converted-value (drscheme:language:simple-module-based-language-convert-value value settings)]) - (cond - [(drscheme:language:simple-settings-insert-newlines settings) - (if (number? width) - (parameterize ([pretty-print-columns width]) - (pretty-write converted-value port)) - (pretty-write converted-value port))] - [else - (parameterize ([pretty-print-columns 'infinity]) - (pretty-write converted-value port)) - (newline port)]))))) + (let-values ([(converted-value write?) + (call-with-values + (lambda () + (drscheme:language:simple-module-based-language-convert-value value settings)) + (case-lambda + [(converted-value) (values converted-value #t)] + [(converted-value write?) (values converted-value write?)]))]) + (let ([pretty-out (if write? pretty-write pretty-print)]) + (cond + [(drscheme:language:simple-settings-insert-newlines settings) + (if (number? width) + (parameterize ([pretty-print-columns width]) + (pretty-out converted-value port)) + (pretty-out converted-value port))] + [else + (parameterize ([pretty-print-columns 'infinity]) + (pretty-out converted-value port)) + (newline port)])))))) settings width)) @@ -309,13 +316,11 @@ (case (drscheme:language:simple-settings-printing-style settings) [(constructor) 0] [(quasiquote) 1] - [(write) 2] - [(print) 2]) + [(print trad-write write) 2]) (case (drscheme:language:simple-settings-printing-style settings) [(constructor) 0] [(quasiquote) 0] - [(write) 1] - [(print) 1]))) + [(print trad-write write) 1]))) (send fraction-style set-selection (case (drscheme:language:simple-settings-fraction-style settings) [(mixed-fraction) 0] diff --git a/collects/macro-debugger/syntax-browser/text.rkt b/collects/macro-debugger/syntax-browser/text.rkt index 8ab05c867c..6af632acf1 100644 --- a/collects/macro-debugger/syntax-browser/text.rkt +++ b/collects/macro-debugger/syntax-browser/text.rkt @@ -2,7 +2,7 @@ (require scheme/list scheme/class scheme/gui - drscheme/arrow + drracket/arrow framework/framework unstable/interval-map unstable/gui/notify diff --git a/collects/meta/contrib/completion/racket-completion.bash b/collects/meta/contrib/completion/racket-completion.bash index ece1eeb55a..a22b0f5d58 100644 --- a/collects/meta/contrib/completion/racket-completion.bash +++ b/collects/meta/contrib/completion/racket-completion.bash @@ -89,6 +89,18 @@ _raco_planet() COMPREPLY=( $(compgen -W "${planetcmds}" -- ${cur}) ) } +raco_cmds=$() + +_raco_help() +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + if [ ${#raco_cmds[@]} -eq 0 ]; then + # removing the empty string on the next line breaks things. such as my brain. + raco_cmds=$( echo '' 'help' ; for x in `racket -e '(begin (require raco/all-tools) (for ([(k v) (all-tools)]) (printf "~a\n" k)))'` ; do echo ${x} ; done ) + fi + COMPREPLY=( $(compgen -W "${raco_cmds}" -- ${cur}) ) +} + _raco() { COMPREPLY=() @@ -101,8 +113,8 @@ _raco() if [ $COMP_CWORD -eq 1 ]; then # removing the empty string on the next line breaks things. such as my brain. - local cmds=$( echo '' '--help' ; for x in `racket -e '(begin (require raco/all-tools) (for ([(k v) (all-tools)]) (printf "~a\n" k)))'` ; do echo ${x} ; done ) - COMPREPLY=($(compgen -W "${cmds}" -- ${cur})) + raco_cmds=$( echo '' 'help' ; for x in `racket -e '(begin (require raco/all-tools) (for ([(k v) (all-tools)]) (printf "~a\n" k)))'` ; do echo ${x} ; done ) + COMPREPLY=($(compgen -W "${raco_cmds}" -- ${cur})) elif [ $COMP_CWORD -eq 2 ]; then # Here we'll handle the main raco commands local prev="${COMP_WORDS[1]}" @@ -120,7 +132,8 @@ _raco() planet) _raco_planet ;; - --help) + help) + _raco_help ;; *) _filedir diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index 90be9f4d58..f7caf24f44 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -150,17 +150,17 @@ src-filter := (src: "") docs-filter := (- (doc: "") ; all docs, (notes: "") ; excluding basic stuff std-docs) ; and things in svn -docsrc-filter := (+ (collects: "setup/scribble.ss") ; only with doc sources +docsrc-filter := (+ (collects: "setup/scribble.rkt") ; only with doc sources (collects: "**/scribblings/") (srcfile: "*.{scrbl|scribble}") std-docs) man-filter := (man: "*") -tests-filter := (+ (collects: "**/tests/") (srcfile: "tests.ss")) +tests-filter := (+ (collects: "**/tests/") (srcfile: "tests.rkt")) gui-filter := (- (+ (collects: "**/gui/") (srcfile: "gui.rkt")) ;; for use in mz code that works in mr too (srcfile: "scheme/gui/dynamic.rkt") (srcfile: "racket/gui/dynamic.rkt")) -tools-filter := (+ (collects: "**/tools/") (srcfile: "tools.ss")) +tools-filter := (+ (collects: "**/tools/") (srcfile: "tools.rkt")) ;; these are in the doc directory, but are comitted in svn and should be ;; considered like sources @@ -327,7 +327,7 @@ plt := (+ dr plt-extras) ;; Packages etc mz-base := "/plt/readme.txt" ; generated - (package: "mzscheme") + (package: "mzscheme") (notes: "racket") "/plt/include/" ;; configuration stuff (cond (not src) => (collects: "info-domain/")) ; filtered @@ -337,22 +337,23 @@ mz-base := "/plt/readme.txt" ; generated ;; include the time-stamp collection when not a public release (cond (not release) => (- (collects: "repos-time-stamp/") - (cond (not dr) => (srcfile: "time-stamp.ss")))) + (cond (not dr) => (srcfile: "time-stamp.rkt")))) mz-manuals := (scribblings: "main/") ; generates main pages (next line) - (doc: "license/" "release/" "acks/" "search/" "master-index/" + (doc: "license/" "release/" "acks/" "search/" "getting-started/") (notes: "COPYING.LIB" "COPYING-libscheme.txt") (doc: "doc-license.txt") ; needed (when docs are included) (doc+src: "reference/" "guide/" "quick/" "more/" "foreign/" "inside/" ;; "places/" <- not ready yet + "scheme/" "honu/") (doc: "*.{html|css|js|sxref}") - (scribblings: "{{info|icons}.ss|*.png}" "compiled") + (scribblings: "{{info|icons}.rkt|*.png}" "compiled") -mr-base := (package: "mred") (bin: "mred-text") (collects: "afm/") +mr-base := (package: "mred") (notes: "gracket") (bin: "mred-text") (collects: "afm/") mr-manuals := (doc+src: "gui/") -dr-base := (package: "drscheme") (package: "framework") +dr-base := (package: "drracket") (package: "drscheme") (package: "framework") dr-manuals := (doc+src: "tools/") ;; Misc hooks, to be added on by package rules below @@ -362,7 +363,7 @@ dr-extras := plt-extras := ;; Tests definitions -mz-tests := (tests: "mzscheme/" "info.ss" "utils/" "match/" "eli-tester.ss") +mz-tests := (tests: "mzscheme/" "info.rkt" "utils/" "match/" "eli-tester.rkt") ;; ============================================================================ ;; Source definitions @@ -383,7 +384,7 @@ mr-src := (src: "mred/" "wxcommon/" "worksp/{png|wxme|wxs|wxutils|wxwin|zlib}/")) foreign-src := (src: "foreign/{Makefile.in|README}" - "foreign/{foreign.*|ssc-utils.ss}" + "foreign/{foreign.*|ssc-utils.rkt}" (cond win => "foreign/libffi_msvc" else => "foreign/gcc")) @@ -429,7 +430,7 @@ platform-dependent := ; hook for package rules ;; -------------------- setup mz-extras :+= (- (package: "setup-plt" #:collection "setup/") - (cond (not dr) => (srcfile: "plt-installer{|-sig|-unit}.ss"))) + (cond (not dr) => (srcfile: "plt-installer{|-sig|-unit}.rkt"))) ;; -------------------- raco mz-extras :+= (package: "raco") @@ -508,7 +509,7 @@ mz-extras :+= (package: "srfi") (doc: "srfi-std") ;; -------------------- xml mz-extras :+= (- (package: "xml/") - (cond* (not plt) => (srcfile: "*-{tool|snipclass}.ss" + (cond* (not plt) => (srcfile: "*-{tool|snipclass}.rkt" "xml.png"))) ;; -------------------- ffi @@ -534,7 +535,7 @@ mr-extras :+= (- (+ (package: "mrlib/") ;; -------------------- sgl mr-extras :+= (package: "sgl/") -;; gl-info.ss doesn't exist, but gl-info.zo holds platform-dependent data +;; gl-info.rkt doesn't exist, but gl-info.zo holds platform-dependent data platform-dependent :+= (and (collects: "sgl/") (srcfile: "sgl/gl-info")) @@ -579,7 +580,7 @@ dr-extras :+= (collects: "defaults/") ;; -------------------- version mz-extras :+= (- (package: "version/") - (cond* (not dr) => (srcfile: "tool.ss"))) + (cond* (not dr) => (srcfile: "tool.rkt"))) ;; -------------------- browser dr-extras :+= (package: "browser/") @@ -612,14 +613,16 @@ plt-extras :+= (package: "frtime/") dr-extras :+= (package: "typed-scheme/" ; used in drscheme #:docs "ts-{reference|guide}/") (- (collects: "typed/") - (cond (not plt) => (collects: "typed/test-engine/"))) + (cond (not plt) => (collects: "typed/test-engine/") + (collects: "typed/racunit/") + (srcfile: "typed/racunit.rkt"))) ;; -------------------- gui-debugger plt-extras :+= (collects: "gui-debugger/") ;; -------------------- swindle mz-extras :+= (- (package: "swindle") - (cond (not dr) => (srcfile: "tool.ss" "swindle*.png"))) + (cond (not dr) => (srcfile: "tool.rkt" "swindle*.png"))) ;; -------------------- plot plt-extras :+= @@ -665,4 +668,6 @@ plt-extras :+= (package: "plai/") plt-extras :+= (package: "racunit/") plt-extras :+= (package: "schemeunit/") +plt-extras :+= (package: "raclog/") + ;; ============================================================================ diff --git a/collects/meta/props b/collects/meta/props index 61b10c3dd7..f19de70fb9 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -547,6 +547,7 @@ path/s is either such a string or a list of them. "collects/compiler/commands/ctool.rkt" drdr:command-line "" "collects/compiler/commands/exe-dir.rkt" drdr:command-line "" "collects/compiler/commands/exe.rkt" drdr:command-line "" +"collects/compiler/commands/make.rkt" drdr:command-line "mzc ~s" "collects/compiler/commands/pack.rkt" drdr:command-line "" "collects/config" responsible (mflatt eli) "collects/defaults" responsible (robby) @@ -563,53 +564,57 @@ path/s is either such a string or a list of them. "collects/deinprogramm/run-dmda-code.rkt" drdr:command-line "mzc ~s" "collects/deinprogramm/turtle.rkt" drdr:command-line "mred-text -t ~s" "collects/deinprogramm/world.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket" responsible (robby) +"collects/drracket/arrow.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/drracket.rkt" drdr:command-line "mzc ~s" +"collects/drracket/main.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/app.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/auto-language.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/bindings-browser.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/bitmap-message.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/debug.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/drracket-normal.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/eb.rkt" drdr:command-line "mred-text ~s" +"collects/drracket/private/embedded-snip-utils.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/eval.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/font.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/frame.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/help-desk.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/honu-logo.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/init.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/insert-large-letters.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/label-frame-mred.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/language-configuration.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/language-object-contract.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/language.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/launcher-mred-bootstrap.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/launcher-mz-bootstrap.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/link.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/main.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/modes.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/module-browser.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/module-language-tools.rkt" drdr:command-line "mred-text ~s" +"collects/drracket/private/module-language.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/multi-file-search.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/number-snip.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/palaka.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/prefs-contract.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/profile-drs.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/rep.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/stick-figures.rkt" drdr:command-line "mzc ~s" +"collects/drracket/private/syncheck-debug.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/text.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/tools-drs.rkt" drdr:command-line "mred ~s" +"collects/drracket/private/tools.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/tracing.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/private/unit.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/sprof.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/syncheck-drracket-button.rkt" drdr:command-line "mred-text ~s" +"collects/drracket/syncheck.rkt" drdr:command-line "mred-text -t ~s" +"collects/drracket/tool-lib.rkt" drdr:command-line "mzc ~s" "collects/drscheme" responsible (robby) -"collects/drscheme/arrow.rkt" drdr:command-line "mred-text -t ~s" "collects/drscheme/drscheme.rkt" drdr:command-line "mzc ~s" "collects/drscheme/main.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/app.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/auto-language.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/bindings-browser.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/bitmap-message.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/debug.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/drscheme-normal.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/eb.rkt" drdr:command-line "mred-text ~s" -"collects/drscheme/private/embedded-snip-utils.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/eval.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/font.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/frame.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/help-desk.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/honu-logo.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/init.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/insert-large-letters.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/label-frame-mred.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/language-configuration.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/language-object-contract.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/language.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/launcher-mred-bootstrap.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/launcher-mz-bootstrap.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/link.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/main.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/modes.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/module-browser.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/module-language-tools.rkt" drdr:command-line "mred-text ~s" -"collects/drscheme/private/module-language.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/multi-file-search.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/number-snip.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/palaka.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/prefs-contract.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/profile-drs.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/rep.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/stick-figures.rkt" drdr:command-line "mzc ~s" -"collects/drscheme/private/syncheck-debug.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/text.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/tools-drs.rkt" drdr:command-line "mred ~s" -"collects/drscheme/private/tools.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/tracing.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/private/unit.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/sprof.rkt" drdr:command-line "mred-text -t ~s" -"collects/drscheme/syncheck-drracket-button.rkt" drdr:command-line "mred-text ~s" -"collects/drscheme/syncheck.rkt" drdr:command-line "mred-text -t ~s" "collects/drscheme/tool-lib.rkt" drdr:command-line "mzc ~s" "collects/dynext" responsible (mflatt) "collects/dynext/private/macinc.rkt" drdr:command-line "mzscheme -f ~s" @@ -1167,8 +1172,8 @@ path/s is either such a string or a list of them. "collects/redex/tests/run-tests.rkt" drdr:command-line "mred-text ~s --examples --no-bitmaps" drdr:timeout 300 "collects/redex/tests/term-test.rkt" drdr:command-line "mzc ~s" "collects/redex/tests/tl-test.rkt" drdr:command-line "mzc ~s" -"collects/repos-time-stamp" responsible (eli) -"collects/repos-time-stamp/time-stamp.rkt" drdr:command-line "mred-text -t ~s" +"collects/repo-time-stamp" responsible (eli) +"collects/repo-time-stamp/time-stamp.rkt" drdr:command-line "mred-text -t ~s" "collects/rnrs" responsible (mflatt) "collects/s-exp" responsible (mflatt eli) "collects/scheme" responsible (mflatt sstrickl samth robby eli) @@ -1188,7 +1193,7 @@ path/s is either such a string or a list of them. "collects/scribble" responsible (mflatt eli) "collects/scribble/run.rkt" drdr:command-line "mzc ~s" "collects/scribble/tools/drscheme-buttons.rkt" drdr:command-line "mred-text ~s" -"collects/scribble/tools/private/mk-drs-bitmaps.rkt" drdr:command-line "mred-text ~s" drdr:timeout 600 +"collects/scribble/tools/private/mk-drs-bitmaps.rkt" drdr:command-line "gracket-text ~s skip" "collects/scribblings" responsible (mflatt eli robby mathias) "collects/scribblings/foreign/unsafe-foreign.rkt" drdr:command-line "mzc ~s" "collects/scribblings/framework/standard-menus.scrbl" drdr:command-line "" @@ -1332,22 +1337,22 @@ path/s is either such a string or a list of them. "collects/tests/deinprogramm" responsible (sperber) "collects/tests/deinprogramm/image.rkt" drdr:command-line "mred-text -t ~s" "collects/tests/deinprogramm/run-image-test.rkt" drdr:command-line "mred-text -t ~s" -"collects/tests/drscheme" responsible (robby) -"collects/tests/drscheme/drscheme-test-util.rkt" drdr:command-line "mred -t ~s" -"collects/tests/drscheme/io.rkt" drdr:command-line "mred ~s" -"collects/tests/drscheme/language-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 -"collects/tests/drscheme/module-lang-test-utils.rkt" drdr:command-line "mred-text -t ~s" -"collects/tests/drscheme/module-lang-test.rkt" drdr:command-line "mred ~s" drdr:timeout 120 -"collects/tests/drscheme/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s" -"collects/tests/drscheme/randomly-click-preferences.rkt" drdr:command-line "mzc ~s" -"collects/tests/drscheme/randomly-click.rkt" drdr:command-line "" -"collects/tests/drscheme/repl-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 -"collects/tests/drscheme/sample-solutions-one-window.rkt" drdr:command-line "mred-text -t ~s" -"collects/tests/drscheme/save-teaching-lang-file.rkt" drdr:command-line "mred ~s" -"collects/tests/drscheme/stepper-test.rkt" drdr:command-line "mred-text -t ~s" -"collects/tests/drscheme/syncheck-test.rkt" drdr:command-line "mred ~s" -"collects/tests/drscheme/teachpack.rkt" drdr:command-line "mred ~s" -"collects/tests/drscheme/time-keystrokes.rkt" drdr:command-line "mred-text -t ~s" +"collects/tests/drracket" responsible (robby) +"collects/tests/drracket/drracket-test-util.rkt" drdr:command-line "mred -t ~s" +"collects/tests/drracket/io.rkt" drdr:command-line "mred ~s" +"collects/tests/drracket/language-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 +"collects/tests/drracket/module-lang-test-utils.rkt" drdr:command-line "mred-text -t ~s" +"collects/tests/drracket/module-lang-test.rkt" drdr:command-line "mred ~s" drdr:timeout 120 +"collects/tests/drracket/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s" +"collects/tests/drracket/randomly-click-preferences.rkt" drdr:command-line "mzc ~s" +"collects/tests/drracket/randomly-click.rkt" drdr:command-line "" +"collects/tests/drracket/repl-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 +"collects/tests/drracket/sample-solutions-one-window.rkt" drdr:command-line "mred-text -t ~s" +"collects/tests/drracket/save-teaching-lang-file.rkt" drdr:command-line "mred ~s" +"collects/tests/drracket/stepper-test.rkt" drdr:command-line "mred-text -t ~s" +"collects/tests/drracket/syncheck-test.rkt" drdr:command-line "mred ~s" +"collects/tests/drracket/teachpack.rkt" drdr:command-line "mred ~s" +"collects/tests/drracket/time-keystrokes.rkt" drdr:command-line "mred-text -t ~s" "collects/tests/framework" responsible (robby) "collects/tests/framework/canvas.rkt" drdr:command-line "mzc -k ~s" "collects/tests/framework/debug.rkt" drdr:command-line "mzc -k ~s" @@ -1810,14 +1815,14 @@ path/s is either such a string or a list of them. "doc/release-notes/gracket" responsible (mflatt) "doc/release-notes/racket" responsible (mflatt) "doc/release-notes/stepper" responsible (clements) -"man/man1/drscheme.1" responsible (robby) "man/man1/drracket.1" responsible (robby) -"man/man1/mred.1" responsible (mflatt) +"man/man1/drscheme.1" responsible (robby) "man/man1/gracket.1" responsible (mflatt) +"man/man1/mred.1" responsible (mflatt) "man/man1/mzscheme.1" responsible (mflatt) +"man/man1/plt-help.1" responsible (robby) "man/man1/racket.1" responsible (mflatt) "man/man1/raco.1" responsible (mflatt) -"man/man1/plt-help.1" responsible (robby) "src/Makefile.in" responsible (mflatt) "src/README" responsible (mflatt) "src/a-list" responsible (mflatt) diff --git a/collects/net/scribblings/sendurl.scrbl b/collects/net/scribblings/sendurl.scrbl index 96317df1fb..fc479dac3f 100644 --- a/collects/net/scribblings/sendurl.scrbl +++ b/collects/net/scribblings/sendurl.scrbl @@ -29,16 +29,18 @@ use an intermediate redirecting file due to a bug in IE7.) Under Mac OS X, @scheme[send-url] runs @exec{osascript} to start the user's chosen browser. -Under Unix, @scheme[send-url] uses the value of the -@scheme[external-browser] parameter to select a browser. +Under Unix, @scheme[send-url] uses a user-preference, or when none is +set, it will look for a known browser. See the description of +@scheme[external-browser] for details. The @scheme[url] string is usually escaped to avoid dangerous shell -characters (quotations, dollar signs, backslashes, and non-ASCII). -Note that it is a good idea to encode URLs before passing them to this -function. Also note that the encoding is meant to make the URL work -in shell quotes: URLs can still hold characters like @litchar{#}, -@litchar{?}, and @litchar{&}, so the @scheme[external-browser] should -use quotations.} +characters (quotations, dollar signs, backslashes, and non-ASCII). Note +that it is a good idea to encode URLs before passing them to this +function. + +On all platforms, @scheme[external-browser] parameter can be set to a +procedure to override the above behavior --- the procedure will be +called with the @scheme[url] string.} @defproc[(send-url/file [path path-string?] [separate-window? any/c #t] [#:fragment fragment (or/c string? false/c) #f] @@ -71,20 +73,24 @@ old temporary files are still deleted as described above.} @defparam[external-browser cmd browser-preference?]{ -A parameter that, under Unix, determines the browser started -@scheme[send-url]. +A parameter that can hold a procedure to override how a browser is +started, or @scheme[#f] to use the default platform-dependent command. -The parameter is initialized to the value of the -@scheme['external-browser] preference. +Under Unix, the command that is used depends on the +@scheme['external-browser] preference. If the preference is unset, +@scheme[send-url] uses the first of the browsers from +@scheme[unix-browser-list] for which the executable is found. +Otherwise, the preference should hold a symbol indicating a known +browser (from the @scheme[unix-browser-list]), or it a pair of a prefix +and a suffix string that are concatenated around the @scheme[url] string +to make up a shell command to run. In addition, the +@scheme[external-browser] paremeter can be set to one of these values, +and @scheme[send-url] will use it instead of the preference value. -The parameter value can be any of the symbols in -@scheme[unix-browser-list], @scheme[#f] to indicate that the -preference is unset, or a pair of strings. If the preference is -unset, @scheme[send-url] uses the first of the browsers from -@scheme[unix-browser-list] for which the executable is found. If the -parameter is a pair of strings, then a command line is constructed by -concatenating in order the first string, the URL string, and the -second string. +Note that the URL is encoded to make it work inside shell double-quotes: +URLs can still hold characters like @litchar{#}, @litchar{?}, and +@litchar{&}, so if the @scheme[external-browser] is set to a pair of +prefix/suffix strings, they should use double quotes around the url. If the preferred or default browser can't be launched, @scheme[send-url] fails. See @scheme[get-preference] and diff --git a/collects/openssl/openssl.scrbl b/collects/openssl/openssl.scrbl index a2580dac86..d7d75bff2f 100644 --- a/collects/openssl/openssl.scrbl +++ b/collects/openssl/openssl.scrbl @@ -2,7 +2,8 @@ @(require scribble/manual scribble/bnf (for-label openssl - scheme)) + scheme + openssl/sha1)) @title{@bold{OpenSSL}} @@ -339,6 +340,35 @@ collection for testing purposes where the peer identifies itself using @; ---------------------------------------------------------------------- +@section{SHA-1 Hashing} + +@defmodule[openssl/sha1]{The @schememodname[openssl/sha1] library +provides a Racket wrapper for the OpenSSL library's SHA-1 hashing +functions.} + +@defproc[(sha1 [in input-port]) string?]{ + +Returns a 40-character string that represents the SHA-1 hash (in +hexadecimal notation) of the content from @scheme[in], consuming all +of the input from @scheme[in] until an end-of-file. + +The @scheme[sha1] function composes @scheme[bytes->hex-string] with +@racket[sha1-bytes].} + +@defproc[(sha1-bytes [in input-port]) bytes?]{ + +Returns a 20-byte byte string that represents the SHA-1 hash of the +content from @scheme[in], consuming all of the input from @scheme[in] +until an end-of-file.} + +@defproc[(bytes->hex-string [bstr bytes?]) string?]{ + +Converts the given byte string to a string representation, where each +byte in @scheme[bstr] is converted to its two-digit hexadecimal +representation in the resulting string.} + +@; ---------------------------------------------------------------------- + @section{Implementation Notes} For Windows, @schememodname[openssl] relies on @filepath{libeay32.dll} diff --git a/collects/parser-tools/info.rkt b/collects/parser-tools/info.rkt index 9a0b87d84d..d29e869da7 100644 --- a/collects/parser-tools/info.rkt +++ b/collects/parser-tools/info.rkt @@ -1,5 +1,5 @@ #lang setup/infotab -(define compile-omit-paths '("private-lex/error-tests.ss")) +(define compile-omit-paths '("private-lex/error-tests.rkt")) (define scribblings '(("parser-tools.scrbl" (multi-page) (parsing-library)))) diff --git a/collects/redex/redex.scrbl b/collects/redex/redex.scrbl index cc273a9f87..035500794a 100644 --- a/collects/redex/redex.scrbl +++ b/collects/redex/redex.scrbl @@ -77,7 +77,7 @@ the names documented in this library. The module @schememodname[redex/reduction-semantics] provides only the non-GUI portions of what is described in this manual (everything except the last two sections), -making it suitable for use with @tt{mzscheme} scripts. +making it suitable for use with @tt{racket} scripts. @table-of-contents[] @@ -109,20 +109,20 @@ in the grammar are terminals. real string variable - (variable-except ...) - (variable-prefix ) + (variable-except id ...) + (variable-prefix id) variable-not-otherwise-mentioned hole symbol - (name ) - (in-hole ) - (hide-hole ) - (side-condition guard) - (cross ) + (name id pattern) + (in-hole pattern pattern) + (hide-hole pattern) + (side-condition pattern guard) + (cross id) ( ...) - ] + racket-constant] [pattern-sequence - + pattern (code:line ... (code:comment "literal ellipsis")) ..._id]) @@ -262,9 +262,9 @@ there via @tt{_} pattersn) are bound using @scheme[term-let] in the guard. } -@item{The @tt{(@defpattech[cross] symbol)} @pattern is used for the compatible +@item{The @scheme[(@defpattech[cross] id)] @pattern is used for the compatible closure functions. If the language contains a non-terminal with the -same name as @scheme[symbol], the @pattern @scheme[(cross symbol)] matches the +same name as @scheme[symbol], the @pattern @scheme[(cross id)] matches the context that corresponds to the compatible closure of that non-terminal. } @@ -395,7 +395,7 @@ all non-GUI portions of Redex) and also exported by @schememodname[redex] (which includes all of Redex). Object language expressions in Redex are written using -@scheme[term]. It is similar to Scheme's @scheme[quote] (in +@scheme[term]. It is similar to Racket's @scheme[quote] (in many cases it is identical) in that it constructs lists as the visible representation of terms. @@ -405,14 +405,14 @@ stands for repetition unless otherwise indicated): @(schemegrammar* #:literals (in-hole hole unquote unquote-splicing) [term identifier (term-sequence ...) - ,scheme-expression + ,racket-expression (in-hole term term) hole #t #f string] [term-sequence term - ,@scheme-expression + ,@racket-expression (code:line ... (code:comment "literal ellipsis"))]) @itemize[ @@ -425,15 +425,15 @@ corresponding symbol, unless the identifier is bound by @item{A term written @scheme[(_term-sequence ...)] constructs a list of the terms constructed by the sequence elements.} -@item{A term written @scheme[,_scheme-expression] evaluates the -@scheme[scheme-expression] and substitutes its value into the term at +@item{A term written @scheme[,_racket-expression] evaluates the +@scheme[_racket-expression] and substitutes its value into the term at that point.} -@item{A term written @scheme[,@_scheme-expression] evaluates the -@scheme[scheme-expression], which must produce a list. It then splices +@item{A term written @scheme[,@_racket-expression] evaluates the +@scheme[_racket-expression], which must produce a list. It then splices the contents of the list into the expression at that point in the sequence.} -@item{A term written @scheme[(in-hole @|tttterm| @|tttterm|)] +@item{A term written @scheme[(in-hole @#,|tttterm| @#,|tttterm|)] is the dual to the @pattern @scheme[in-hole] -- it accepts a context and an expression and uses @scheme[plug] to combine them.} @@ -681,9 +681,9 @@ all non-GUI portions of Redex) and also exported by [reduction-case (--> @#,ttpattern @#,tttterm extras ...)] [extras name (fresh fresh-clause ...) - (side-condition scheme-expression) + (side-condition racket-expression) (where tl-pat @#,tttterm) - (side-condition/hidden scheme-expression) + (side-condition/hidden racket-expression) (where/hidden tl-pat @#,tttterm)] [fresh-clause var ((var1 ...) (var2 ...))] [tl-pat identifier (tl-pat-ele ...)] @@ -722,7 +722,7 @@ bound by the left-hand side of the rule. All side-conditions provided with @scheme[side-condition] and @scheme[hidden-side-condition] are collected with @scheme[and] and used as guards on the case being matched. The argument to each -side-condition should be a Scheme expression, and the pattern +side-condition should be a Racket expression, and the pattern variables in the @|ttpattern| are bound in that expression. A @scheme[side-condition/hidden] form is the same as @scheme[side-condition], except that the side condition is not @@ -901,8 +901,8 @@ all non-GUI portions of Redex) and also exported by ...) ([contract (code:line) (code:line id : @#,ttpattern ... -> @#,ttpattern)] - [extras (side-condition scheme-expression) - (side-condition/hidden scheme-expression) + [extras (side-condition racket-expression) + (side-condition/hidden racket-expression) (where tl-pat @#,tttterm) (where/hidden tl-pat @#,tttterm)] [tl-pat identifier (tl-pat-ele ...)] @@ -1451,9 +1451,9 @@ filled in for the remaining colors. The @scheme[scheme-colors?] argument, if @scheme[#t] causes @scheme[traces] to color the contents of each of the windows according -to DrScheme's Scheme mode color Scheme. If it is @scheme[#f], +to DrRacket's Racket mode color scheme. If it is @scheme[#f], @scheme[traces] just uses black for the color scheme. -In addition, Scheme-mode parenthesis highlighting is +In addition, Racket-mode parenthesis highlighting is enabled when @scheme[scheme-colors?] is @scheme[#t] and not when it is @scheme[#f]. @@ -1698,7 +1698,7 @@ Slideshow (see This section documents two classes of operations, one for direct use of creating postscript figures for use in papers -and for use in DrScheme to easily adjust the typesetting: +and for use in DrRacket to easily adjust the typesetting: @scheme[render-term], @scheme[render-language], @scheme[render-reduction-relation], @@ -1808,7 +1808,7 @@ other tools that combine picts together. If provided with one argument, @scheme[render-metafunction] produces a pict that renders properly in the definitions -window in DrScheme. If given two arguments, it writes +window in DrRacket. If given two arguments, it writes postscript into the file named by @scheme[filename] (which may be either a string or bytes). @@ -2071,12 +2071,12 @@ single reduction relation. @deftech{Removing the pink background from PLT Redex rendered picts and ps files} When reduction rules, a metafunction, or a grammar contains -unquoted Scheme code or side-conditions, they are rendered +unquoted Racket code or side-conditions, they are rendered with a pink background as a guide to help find them and provide alternative typesettings for them. In general, a good goal for a PLT Redex program that you intend to typeset is to only include such things when they correspond to -standard mathematical operations, and the Scheme code is an +standard mathematical operations, and the Racket code is an implementation of those operations. To replace the pink code, use: @@ -2174,7 +2174,7 @@ explanation of logical-space): @defproc[(lw? (v any/c)) boolean?]{} @defidform[lw]{}]]{ -The lw data structure corresponds represents a pattern or a Scheme +The lw data structure corresponds represents a pattern or a Racket expression that is to be typeset. The functions listed above construct @scheme[lw] structs, select fields out of them, and recognize them. The @scheme[lw] binding can be used with diff --git a/collects/repos-time-stamp/doc.txt b/collects/repo-time-stamp/doc.txt similarity index 100% rename from collects/repos-time-stamp/doc.txt rename to collects/repo-time-stamp/doc.txt diff --git a/collects/repos-time-stamp/info.rkt b/collects/repo-time-stamp/info.rkt similarity index 100% rename from collects/repos-time-stamp/info.rkt rename to collects/repo-time-stamp/info.rkt diff --git a/collects/repos-time-stamp/stamp.rkt b/collects/repo-time-stamp/stamp.rkt similarity index 100% rename from collects/repos-time-stamp/stamp.rkt rename to collects/repo-time-stamp/stamp.rkt diff --git a/collects/repos-time-stamp/time-stamp.rkt b/collects/repo-time-stamp/time-stamp.rkt similarity index 100% rename from collects/repos-time-stamp/time-stamp.rkt rename to collects/repo-time-stamp/time-stamp.rkt diff --git a/collects/scribble/base.rkt b/collects/scribble/base.rkt index a8545a84e5..d3d7fc4431 100644 --- a/collects/scribble/base.rkt +++ b/collects/scribble/base.rkt @@ -638,7 +638,7 @@ ;; the last round, and #f means no desc (define desc-order '(part mod libs delayed #f)) ;; this defines an imposed ordering for module names - (define lib-order '(#rx"^scheme(?:/|$)" #rx"^r.rs(?:/|$)" #rx"^lang(?:/|$)")) + (define lib-order '(#rx"^racket(?:/|$)" #rx"^r.rs(?:/|$)" #rx"^lang(?:/|$)")) (define (liblist c))]) (set! src-col (or (syntax-column i) src-col)) (hash-set! next-col-map src-col dest-col) - ((loop init-line! (+ quote-depth quote-delta) expr? #f) i))))] + ((loop init-line! (max 0 (+ quote-depth quote-delta)) expr? #f) i))))] [(and (pair? (syntax-e c)) (or (not expr?) (positive? quote-depth) diff --git a/collects/scribble/tools/private/mk-drs-bitmaps.rkt b/collects/scribble/tools/private/mk-drs-bitmaps.rkt index 0e5641d651..db7c5318fc 100644 --- a/collects/scribble/tools/private/mk-drs-bitmaps.rkt +++ b/collects/scribble/tools/private/mk-drs-bitmaps.rkt @@ -66,4 +66,6 @@ (send pdf-bitmap save-file "../pdf.png" 'png) (send html-bitmap save-file "../html.png" 'png)) -(send f show #t) +(match (current-command-line-arguments) + [(vector "skip") (void)] + [_ (send f show #t)]) diff --git a/collects/scribblings/drracket/keybindings.scrbl b/collects/scribblings/drracket/keybindings.scrbl index 1beb739047..8b6f3053b2 100644 --- a/collects/scribblings/drracket/keybindings.scrbl +++ b/collects/scribblings/drracket/keybindings.scrbl @@ -205,7 +205,7 @@ s-exp framework/keybinding-lang The @racket[framework/keybinding-lang] languages provides all of the bindings from @racketmodname[racket], @racketmodname[racket/class], and -@racketmodname[drscheme/tool-lib], +@racketmodname[drracket/tool-lib], except that it adjusts @|mz-mod-begin| to introduce a @racketidfont{keybinding} form: diff --git a/collects/scribblings/drracket/printing.scrbl b/collects/scribblings/drracket/printing.scrbl index 105e2f570a..44fb00eb7f 100644 --- a/collects/scribblings/drracket/printing.scrbl +++ b/collects/scribblings/drracket/printing.scrbl @@ -34,8 +34,8 @@ determines how evaluation results are printed in the @tech{interactions window}. This setting also applies to output generated by calling @racket[print] explicitly. -The following table illustrates the difference between the different -output styles: +The @onscreen{print} style is the normal Racket output style. The +following table illustrates the other output styles: @print-table[ [(cons 1 2) (cons 1 2) `(1 . 2) (1 . 2)] @@ -54,30 +54,36 @@ output styles: [(regexp "a") (regexp "a") (regexp "a") #rx"a"] ] -The @as-index{@onscreen{Constructor} output} mode treats -@racket[cons], @racket[vector], and similar primitives as value -constructors, rather than functions. It also treats @racket[list] as -shorthand for multiple @racket[cons]'s ending with the empty list. -@onscreen{Constructor} output is especially valuable for beginning -programmers, because output values look the same as input values. +The @as-index{@onscreen{Constructor} output} mode is similar to +Rackets normal print mode, except that even quotable are still printed +with constructors, constructor functions and forms are used to +approximate some otherwise unprintable values. For example, +@onscreen{Constructor} output prints a procedure in a +@racketresult[lambda] form. For output to a graphical context, +rational numbers are printed using a special @racket[snip%] object +that lets the user choose between improper fractions, mixed fractions, +and repeating decimals. The @as-index{@onscreen{Quasiquote} output} mode is like @onscreen{Constructor} output, but it uses @racket[quasiquote] (abbreviated with @litchar{`}) to print lists, and it uses @racket[unquote] (abbreviated with @litchar{,}) to escape back to -@onscreen{Constructor} printing as needed. This mode provides the same -benefit as @onscreen{Constructor} output, in that printed results are -expressions, but it is more convenient for many kinds of data, -especially data that represents expressions. +@onscreen{Constructor} printing as needed. The @as-index{@onscreen{write} output} mode corresponds to traditional -Scheme printing via the @racket[print] procedure, which defaults to -@racket[write]-like printing, as shown in the last column. +Scheme printing via the @racket[write] procedure. For example, lists +print by parenthesizing the printed form of the list elements, without +a leading quote mark or a constructor name. -DrRacket also sets the @racket[global-port-print-handler] in order to -customize a few aspects of the printing for all of these modes, namely -printing the symbol @racket[quote] as a single tick mark (mutatis -mutandis for @racket[quasiquote], @racket[unquote], and -@racket[unquote-splicing]), and to print rational real numbers using a -special @racket[snip%] object that lets the user choose between -improper fractions, mixed fractions, and repeating decimals. +Finally, the @as-index{@onscreen{print} output} mode corresponds to +Racket's default printing via the @racket[print] procedure. Output via +@racket[print] is further configurable through run-time settings, such +as the @racket[print-as-expression] parameter, and it may be adjusted +by a @hash-lang[]-specified language. For example, the +@racketmodname[scheme] language sets the @racket[print-as-expression] +parameter to @racket[#f], which essentially makes @onscreen{print} +mode act like @onscreen{write} mode. + +For any of the output styles, DrRacket sets the +@racket[global-port-print-handler] so that the @racket[print] +procedure produces output as selected. diff --git a/collects/scribblings/foreign/atomic.scrbl b/collects/scribblings/foreign/atomic.scrbl index 854d14bd8d..3d19125a33 100644 --- a/collects/scribblings/foreign/atomic.scrbl +++ b/collects/scribblings/foreign/atomic.scrbl @@ -11,7 +11,7 @@ @defproc[(end-atomic) void?] )]{ -Disables and enables context switches at the level of Scheme +Disables and enables context switches at the level of Racket threads. Calls to @scheme[start-atomic] and @scheme[end-atomic] can be nested. diff --git a/collects/scribblings/foreign/cpointer.scrbl b/collects/scribblings/foreign/cpointer.scrbl index d27e407385..5ab2000cde 100644 --- a/collects/scribblings/foreign/cpointer.scrbl +++ b/collects/scribblings/foreign/cpointer.scrbl @@ -18,7 +18,7 @@ operations manage tags to distinguish pointer types. ctype])]{ Construct a kind of a pointer that gets a specific tag when converted -to Scheme, and accept only such tagged pointers when going to C. An +to Racket, and accept only such tagged pointers when going to C. An optional @scheme[ptr-type] can be given to be used as the base pointer type, instead of @scheme[_pointer]. @@ -37,7 +37,7 @@ an interface can hide its value from users (e.g., not provide the @scheme[_cpointer/null] is similar to @scheme[_cpointer] except that it tolerates @cpp{NULL} pointers both going to C and back. Note that -@cpp{NULL} pointers are represented as @scheme[#f] in Scheme, so they +@cpp{NULL} pointers are represented as @scheme[#f] in Racket, so they are not tagged.} @@ -63,7 +63,7 @@ obtain a tag. The tag is the string form of @schemevarfont{id}.} These two functions treat pointer tags as lists of tags. As described in @secref["foreign:pointer-funcs"], a pointer tag does not have any -role, except for Scheme code that uses it to distinguish pointers; +role, except for Racket code that uses it to distinguish pointers; these functions treat the tag value as a list of tags, which makes it possible to construct pointer types that can be treated as other pointer types, mainly for implementing inheritance via upcasts (when a diff --git a/collects/scribblings/foreign/cvector.scrbl b/collects/scribblings/foreign/cvector.scrbl index 07efc91e34..5459c7f40f 100644 --- a/collects/scribblings/foreign/cvector.scrbl +++ b/collects/scribblings/foreign/cvector.scrbl @@ -17,9 +17,9 @@ pointer to a memory block). Like @scheme[_bytes], @scheme[_cvector] can be used as a simple type that corresponds to a pointer that is managed as a safe C vector on -the Scheme side. The longer form behaves similarly to the +the Racket side. The longer form behaves similarly to the @scheme[_list] and @scheme[_vector] custom types, except that -@scheme[_cvector] is more efficient; no Scheme list or vector is +@scheme[_cvector] is more efficient; no Racket list or vector is needed.} @defproc[(make-cvector [type ctype?][length exact-nonnegative-integer?]) cvector?]{ diff --git a/collects/scribblings/foreign/libs.scrbl b/collects/scribblings/foreign/libs.scrbl index f2757fb696..b5cffa0be8 100644 --- a/collects/scribblings/foreign/libs.scrbl +++ b/collects/scribblings/foreign/libs.scrbl @@ -68,7 +68,7 @@ Looks for the given object name @scheme[objname] in the given @scheme[lib] library. If @scheme[lib] is not a foreign-library value produced by @scheme[ffi-lib], it is converted to one by calling @scheme[ffi-lib]. If @scheme[objname] is found in @scheme[lib], it is -converted to Scheme using the given @scheme[type]. Types are described +converted to Racket using the given @scheme[type]. Types are described in @secref["types"]; in particular the @scheme[get-ffi-obj] procedure is most often used with function types created with @scheme[_fun]. @@ -101,7 +101,7 @@ Looks for @scheme[objname] in @scheme[lib] similarly to @scheme[get-ffi-obj], but then it stores the given @scheme[new] value into the library, converting it to a C value. This can be used for setting library customization variables that are part of its -interface, including Scheme callbacks.} +interface, including Racket callbacks.} @defproc[(make-c-parameter [objname (or/c string? bytes? symbol?)] @@ -114,7 +114,7 @@ Returns a parameter-like procedure that can either references the specified foreign value, or set it. The arguments are handled as in @scheme[get-ffi-obj]. -A parameter-like function is useful in case Scheme code and library +A parameter-like function is useful in case Racket code and library code interact through a library value. Although @scheme[make-c-parameter] can be used with any time, it is not recommended to use this for foreign functions, since each reference @@ -124,9 +124,9 @@ actual call.} @defform[(define-c id lib-expr type-expr)]{ -Defines @scheme[id] behave like a Scheme binding, but @scheme[id] is +Defines @scheme[id] behave like a Racket binding, but @scheme[id] is actually redirected through a parameter-like procedure created by -@scheme[make-c-parameter]. The @scheme[id] is used both for the Scheme +@scheme[make-c-parameter]. The @scheme[id] is used both for the Racket binding and for the foreign object's name.} @defproc[(ffi-obj-ref [objname (or/c string? bytes? symbol?)] diff --git a/collects/scribblings/foreign/misc.scrbl b/collects/scribblings/foreign/misc.scrbl index 212d22548d..09ae2b08ea 100644 --- a/collects/scribblings/foreign/misc.scrbl +++ b/collects/scribblings/foreign/misc.scrbl @@ -20,7 +20,7 @@ for cases where the regular expression begins with a @litchar{^} or ends with a @litchar{$}, in which case @scheme[regexp-replace] is used. -For example, the following makes it convenient to define Scheme +For example, the following makes it convenient to define Racket bindings such as @scheme[foo-bar] for foreign names like @scheme[MyLib_foo_bar]: @@ -48,7 +48,7 @@ according to the given @scheme[type].} @defproc[(vector->cblock [vec vector?][type type?]) any]{ -Like @scheme[list->cblock], but for Scheme vectors.} +Like @scheme[list->cblock], but for Racket vectors.} @defproc[(vector->cpointer [vec vector?]) cpointer?]{ @@ -93,7 +93,7 @@ The conversion is equivalent to list?]{ Converts C @scheme[cblock], which is a vector of @scheme[type]s, to a -Scheme list. The arguments are the same as in the +Racket list. The arguments are the same as in the @scheme[list->cblock]. The @scheme[length] must be specified because there is no way to know where the block ends.} @@ -101,4 +101,4 @@ there is no way to know where the block ends.} @defproc[(cblock->vector [cblock any/c][type ctype?][length exact-nonnegative-integer?]) vector?]{ -Like @scheme[cblock->vector], but for Scheme vectors.} +Like @scheme[cblock->vector], but for Racket vectors.} diff --git a/collects/scribblings/foreign/pointers.scrbl b/collects/scribblings/foreign/pointers.scrbl index 437bd7e05c..7df8911783 100644 --- a/collects/scribblings/foreign/pointers.scrbl +++ b/collects/scribblings/foreign/pointers.scrbl @@ -13,7 +13,7 @@ Returns @scheme[#f] for other values.} @defproc[(ptr-equal? [cptr1 cpointer?][cptr2 cpointer?]) boolean?]{ -Compares the values of the two pointers. Two different Scheme +Compares the values of the two pointers. Two different Racket pointer objects can contain the same pointer.} @@ -189,7 +189,7 @@ inclusive).} @defproc[(cpointer-tag [cptr cpointer?]) any]{ -Returns the Scheme object that is the tag of the given @scheme[cptr] +Returns the Racket object that is the tag of the given @scheme[cptr] pointer.} @@ -207,7 +207,7 @@ can contain other information).} @section{Memory Management} -For general information on C-level memory management with PLT Scheme, +For general information on C-level memory management with Racket, see @|InsideMzScheme|. @defproc[(malloc [bytes-or-type (or/c exact-nonnegative-integer? ctype?)] @@ -223,7 +223,7 @@ see @|InsideMzScheme|. Allocates a memory block of a specified size using a specified allocation. The result is a @scheme[cpointer] to the allocated memory. Although not reflected above, the four arguments can appear in -any order since they are all different types of Scheme objects; a size +any order since they are all different types of Racket objects; a size specification is required at minimum: @itemize[ @@ -243,8 +243,8 @@ specification is required at minimum: @item{A symbol @scheme[mode] argument can be given, which specifies what allocation function to use. It should be one of - @indexed-scheme['nonatomic] (uses @cpp{scheme_malloc} from PLT - Scheme's C API), @indexed-scheme['atomic] + @indexed-scheme['nonatomic] (uses @cpp{scheme_malloc} from + Racket's C API), @indexed-scheme['atomic] (@cpp{scheme_malloc_atomic}), @indexed-scheme['stubborn] (@cpp{scheme_malloc_stubborn}), @indexed-scheme['uncollectable] (@cpp{scheme_malloc_uncollectable}), @indexed-scheme['eternal] @@ -269,7 +269,7 @@ type, and @scheme['atomic] allocation is used otherwise.} Uses the operating system's @cpp{free} function for @scheme['raw]-allocated pointers, and for pointers that a foreign library allocated and we should free. Note that this is useful as -part of a finalizer (see below) procedure hook (e.g., on the Scheme +part of a finalizer (see below) procedure hook (e.g., on the Racket pointer object, freeing the memory when the pointer object is collected, but beware of aliasing).} @@ -283,7 +283,7 @@ pointer.} @defproc[(malloc-immobile-cell [v any/c]) cpointer?]{ Allocates memory large enough to hold one arbitrary (collectable) -Scheme value, but that is not itself collectable or moved by the +Racket value, but that is not itself collectable or moved by the memory manager. The cell is initialized with @scheme[v]; use the type @scheme[_scheme] with @scheme[ptr-ref] and @scheme[ptr-set!] to get or set the cell's value. The cell must be explicitly freed with @@ -298,7 +298,7 @@ Frees an immobile cell created by @scheme[malloc-immobile-cell].} @defproc[(register-finalizer [obj any/c][finalizer (any/c . -> . any)]) void?]{ Registers a finalizer procedure @scheme[finalizer-proc] with the given -@scheme[obj], which can be any Scheme (GC-able) object. The finalizer +@scheme[obj], which can be any Racket (GC-able) object. The finalizer is registered with a will executor; see @scheme[make-will-executor]. The finalizer is invoked when @scheme[obj] is about to be collected. (This is done by a thread that @@ -306,9 +306,9 @@ is in charge of triggering these will executors.) Finalizers are mostly intended to be used with cpointer objects (for freeing unused memory that is not under GC control), but it can be -used with any Scheme object---even ones that have nothing to do with +used with any Racket object---even ones that have nothing to do with foreign code. Note, however, that the finalizer is registered for the -@italic{Scheme} object. If you intend to free a pointer object, then +@italic{Racket} object. If you intend to free a pointer object, then you must be careful to not register finalizers for two cpointers that point to the same address. Also, be careful to not make the finalizer a closure that holds on to the object. @@ -319,7 +319,7 @@ string that you should free. Here is an attempt at creating a suitable type: @schemeblock[ (define bytes/free (make-ctype _pointer - #f (code:comment @#,t{a Scheme bytes can be used as a pointer}) + #f (code:comment @#,t{a Racket bytes can be used as a pointer}) (lambda (x) (let ([b (make-byte-string x)]) (register-finalizer x free) @@ -336,7 +336,7 @@ for debugging: @schemeblock[ (define bytes/free (make-ctype _pointer - #f (code:comment @#,t{a Scheme bytes can be used as a pointer}) + #f (code:comment @#,t{a Racket bytes can be used as a pointer}) (lambda (x) (let ([b (make-byte-string x)]) (register-finalizer b @@ -359,10 +359,10 @@ procedure would then not close over @scheme[b].)} Returns a byte string made of the given pointer and the given length. No copying is done. This can be used as an alternative to make -pointer values accessible in Scheme when the size is known. +pointer values accessible in Racket when the size is known. If @scheme[cptr] is an offset pointer created by @scheme[ptr-add], the offset is immediately added to the pointer. Thus, this function cannot -be used with @scheme[ptr-add] to create a substring of a Scheme byte +be used with @scheme[ptr-add] to create a substring of a Racket byte string, because the offset pointer would be to the middle of a collectable object (which is not allowed).} diff --git a/collects/scribblings/foreign/types.scrbl b/collects/scribblings/foreign/types.scrbl index 61f3572c02..7607d6385b 100644 --- a/collects/scribblings/foreign/types.scrbl +++ b/collects/scribblings/foreign/types.scrbl @@ -23,7 +23,7 @@ along with conversion functions to and from the existing types. Creates a new @tech{C type} value whose representation for foreign code is the same as @scheme[type]'s. The given conversions functions -convert to and from the Scheme representation of @scheme[type]. Either +convert to and from the Racket representation of @scheme[type]. Either conversion function can be @scheme[#f], meaning that the conversion for the corresponding direction is the identity function. If both functions are @scheme[#f], @scheme[type] is returned.} @@ -119,7 +119,7 @@ correspond to @scheme[_int16]. The @scheme[_int] aliases correspond to For cases where speed matters and where you know that the integer is small enough, the types @scheme[_fixnum] and @scheme[_ufixnum] are similar to @scheme[_long] and @scheme[_ulong] but assume that the -quantities fit in PLT Scheme's immediate integers (i.e., not bignums).} +quantities fit in Racket's immediate integers (i.e., not bignums).} @defthing*[([_fixint ctype?] [_ufixint ctype?])]{ @@ -146,7 +146,7 @@ value to @scheme[1].} @defthing[_void ctype?]{ -Indicates a Scheme @|void-const| return value, and it cannot be used +Indicates a Racket @|void-const| return value, and it cannot be used to translate values to C. This type cannot be used for function inputs.} @@ -157,9 +157,9 @@ inputs.} @subsection{Primitive String Types} The five primitive string types correspond to cases where a C -representation matches MzScheme's representation without encodings. +representation matches Racket's representation without encodings. -The form @scheme[_bytes] form can be used type for Scheme byte +The form @scheme[_bytes] form can be used type for Racket byte strings, which corresponds to C's @cpp{char*} type. In addition to translating byte strings, @scheme[#f] corresponds to the @cpp{NULL} pointer. @@ -168,8 +168,8 @@ pointer. @defthing[_string/ucs-4 ctype?] )]{ -A type for Scheme's native Unicode strings, which are in UCS-4 format. -These correspond to the C @cpp{mzchar*} type used by PLT Scheme. As usual, the types +A type for Racket's native Unicode strings, which are in UCS-4 format. +These correspond to the C @cpp{mzchar*} type used by Racket. As usual, the types treat @scheme[#f] as @cpp{NULL} and vice-versa.} @@ -183,7 +183,7 @@ Unicode strings in UTF-16 format. As usual, the types treat @defthing[_path ctype?]{ -Simple @cpp{char*} strings, corresponding to Scheme's paths. As usual, +Simple @cpp{char*} strings, corresponding to Racket's paths. As usual, the types treat @scheme[#f] as @cpp{NULL} and vice-versa. Beware that changing the current directory via @@ -196,7 +196,7 @@ them to a foreign function.} @defthing[_symbol ctype?]{ -Simple @cpp{char*} strings as Scheme symbols (encoded in UTF-8). +Simple @cpp{char*} strings as Racket symbols (encoded in UTF-8). Return values using this type are interned as symbols.} @@ -206,7 +206,7 @@ Return values using this type are interned as symbols.} [_string/latin-1 ctype?] [_string/locale ctype?])]{ -Types that correspond to (character) strings on the Scheme side and +Types that correspond to (character) strings on the Racket side and @cpp{char*} strings on the C side. The bridge between the two requires a transformation on the content of the string. As usual, the types treat @scheme[#f] as @cpp{NULL} and vice-versa.} @@ -216,18 +216,18 @@ treat @scheme[#f] as @cpp{NULL} and vice-versa.} [_string*/locale ctype?])]{ Similar to @scheme[_string/utf-8], etc., but accepting a wider range -of values: Scheme byte strings are allowed and passed as is, and -Scheme paths are converted using @scheme[path->bytes].} +of values: Racket byte strings are allowed and passed as is, and +Racket paths are converted using @scheme[path->bytes].} @subsection{Variable Auto-Converting String Type} The @scheme[_string/ucs-4] type is rarely useful when interacting with foreign code, while using @scheme[_bytes] is somewhat unnatural, since -it forces Scheme programmers to use byte strings. Using +it forces Racket programmers to use byte strings. Using @scheme[_string/utf-8], etc., meanwhile, may prematurely commit to a particular encoding of strings as bytes. The @scheme[_string] type -supports conversion between Scheme strings and @cpp{char*} strings +supports conversion between Racket strings and @cpp{char*} strings using a parameter-determined conversion. @defthing[_string ctype?]{ @@ -248,19 +248,19 @@ so @italic{before} interfaces are defined.} @defthing[_file ctype?]{ -Like @scheme[_path], but when values go from Scheme to C, +Like @scheme[_path], but when values go from Racket to C, @scheme[cleanse-path] is used on the given value. As an output value, it is identical to @scheme[_path].} @defthing[_bytes/eof ctype?]{ Similar to the @scheme[_bytes] type, except that a foreign return -value of @cpp{NULL} is translated to a Scheme @scheme[eof] value.} +value of @cpp{NULL} is translated to a Racket @scheme[eof] value.} @defthing[_string/eof ctype?]{ Similar to the @scheme[_string] type, except that a foreign return -value of @cpp{NULL} is translated to a Scheme @scheme[eof] value.} +value of @cpp{NULL} is translated to a Racket @scheme[eof] value.} @; ------------------------------------------------------------ @@ -268,8 +268,8 @@ value of @cpp{NULL} is translated to a Scheme @scheme[eof] value.} @defthing[_pointer ctype?]{ -Corresponds to Scheme ``C pointer'' objects. These pointers can have -an arbitrary Scheme object attached as a type tag. The tag is ignored +Corresponds to Racket ``C pointer'' objects. These pointers can have +an arbitrary Racket object attached as a type tag. The tag is ignored by built-in functionality; it is intended to be used by interfaces. See @secref["foreign:tagged-pointers"] for creating pointer types that use these tags for safety. A @scheme[#f] value is converted to @@ -296,12 +296,15 @@ formerly occupied by the reference to be used later by the garbage collector.} -@defthing[_scheme ctype?]{ +@deftogether[( +@defthing[_racket ctype?] +@defthing[_scheme ctype?] +)]{ -This type can be used with any Scheme object; it corresponds to the -@cpp{Scheme_Object*} type of PLT Scheme's C API (see +A type that can be used with any Racket object; it corresponds to the +@cpp{Scheme_Object*} type of Racket's C API (see @|InsideMzScheme|). It is useful only for libraries that are aware of -PLT Scheme's C API.} +Racket's C API.} @defthing[_fpointer ctype?]{ @@ -358,14 +361,14 @@ instead, since it manages a wide range of complicated cases. The resulting type can be used to reference foreign functions (usually @scheme[ffi-obj]s, but any pointer object can be referenced with this type), generating a matching foreign callout object. Such objects are new primitive -procedure objects that can be used like any other Scheme procedure. +procedure objects that can be used like any other Racket procedure. As with other pointer types, @scheme[#f] is treated as a @cpp{NULL} function pointer and vice-versa. A type created with @scheme[_cprocedure] can also be used for passing -Scheme procedures to foreign functions, which will generate a foreign -function pointer that calls the given Scheme procedure when it is -used. There are no restrictions on the Scheme procedure; in +Racket procedures to foreign functions, which will generate a foreign +function pointer that calls the given Racket procedure when it is +used. There are no restrictions on the Racket procedure; in particular, its lexical context is properly preserved. The optional @scheme[abi] keyword argument determines the foreign ABI @@ -375,12 +378,12 @@ platform-dependent default; other possible values are ``cdecl''). This is especially important on Windows, where most system functions are @scheme['stdcall], which is not the default. -If @scheme[atomic?] is true, then when a Scheme procedure is given -this procedure type and called from foreign code, then the PLT Scheme -process is put into atomic mode while evaluating the Scheme procedure -body. In atomic mode, other Scheme threads do not run, so the Scheme +If @scheme[atomic?] is true, then when a Racket procedure is given +this procedure type and called from foreign code, then the Racket +process is put into atomic mode while evaluating the Racket procedure +body. In atomic mode, other Racket threads do not run, so the Racket code must not call any function that potentially synchronizes with -other threads, or else it may deadlock. In addition, the Scheme code +other threads, or else it may deadlock. In addition, the Racket code must not perform any potentially blocking operation (such as I/O), it must not raise an uncaught exception, it must not perform any escaping continuation jumps, and its non-tail recursion must be minimal to @@ -397,8 +400,8 @@ accessible through @scheme[saved-errno]. If @scheme[save-errno] is under Windows (on other platforms @scheme[saved-errno] will return 0). If @scheme[save-errno] is @scheme[#f], no error value is saved automatically. The error-recording support provided by -@scheme[save-errno] is needed because the PLT Scheme runtime system -may otherwise preempt the current Scheme thread and itself call +@scheme[save-errno] is needed because the Racket runtime system +may otherwise preempt the current Racket thread and itself call functions that set error values. The optional @scheme[wrapper], if provided, is expected to be a @@ -410,10 +413,10 @@ manipulations before the foreign function is invoked, and return different results (for example, grabbing a value stored in an ``output'' pointer and returning multiple values). It can also be used for callbacks, as an additional layer that tweaks arguments from -the foreign code before they reach the Scheme procedure, and possibly +the foreign code before they reach the Racket procedure, and possibly changes the result values too. -Sending Scheme functions as callbacks to foreign code is achieved by +Sending Racket functions as callbacks to foreign code is achieved by translating them to a foreign ``closure,'' which foreign code can call as plain C functions. Additional care must be taken in case the foreign code might hold on to the callback function. In these cases @@ -446,14 +449,14 @@ values: @itemize[ allowing the box itself to be garbage-collected. This is can be useful if the box is held for a dynamic extent that corresponds to when the callback is needed; for example, you might encapsulate some - foreign functionality in a Scheme class or a unit, and keep the + foreign functionality in a Racket class or a unit, and keep the callback box as a field in new instances or instantiations of the unit.} @item{A box holding @scheme[null] (or any list) -- this is similar to the previous case, except that new callback values are consed onto the contents of the box. It is therefore useful in (rare) cases - when a Scheme function is used in multiple callbacks (that is, sent + when a Racket function is used in multiple callbacks (that is, sent to foreign code to hold onto multiple times).} @item{Finally, if a one-argument function is provided as @@ -643,7 +646,7 @@ following: one will be freshly allocated before the call.} @item{@scheme[io] --- combines the above into an - @italic{input/output} pointer argument: the wrapper gets the Scheme + @italic{input/output} pointer argument: the wrapper gets the Racket value, allocates and set a pointer using this value, and then references the value after the call. The ``@scheme[_ptr]'' name can be confusing here: it means that the foreign function expects a @@ -691,7 +694,7 @@ length of the list which the C function will most likely require.} @defform[(_vector mode type maybe-len)]{ A @tech{custom function type} like @scheme[_list], except that it uses -Scheme vectors instead of lists.} +Racket vectors instead of lists.} @defform*[#:literals (o) @@ -717,7 +720,7 @@ is present for consistency with the above macros).} The primitive type constructor for creating new C struct types. These types are actually new primitive types; they have no conversion -functions associated. The corresponding Scheme objects that are used +functions associated. The corresponding Racket objects that are used for structs are pointers, but when these types are used, the value that the pointer @italic{refers to} is used, rather than the pointer itself. This value is basically made of a number of bytes that is @@ -741,7 +744,7 @@ below for a more efficient approach.} Defines a new C struct type, but unlike @scheme[_list-struct], the resulting type deals with C structs in binary form, rather than -marshaling them to Scheme values. The syntax is similar to +marshaling them to Racket values. The syntax is similar to @scheme[define-struct], providing accessor functions for raw struct values (which are pointer objects). The new type uses pointer tags to guarantee that only proper struct objects are used. The @scheme[_id] @@ -793,7 +796,7 @@ inheritance, where a sub-struct is made by having a first field that is its super-struct. Instances of the sub-struct can be considered as instances of the super-struct, since they share the same initial layout. Using the tag of an initial cstruct field means that the same -behavior is implemented in Scheme; for example, accessors and mutators +behavior is implemented in Racket; for example, accessors and mutators of the super-cstruct can be used with the new sub-cstruct. See the example below. @@ -914,7 +917,7 @@ take an @cpp{A} pointer: (gety b) ] -Constructing a @cpp{B} instance in Scheme requires allocating a +Constructing a @cpp{B} instance in Racket requires allocating a temporary @cpp{A} struct: @schemeblock[ diff --git a/collects/scribblings/foreign/unexported.scrbl b/collects/scribblings/foreign/unexported.scrbl index 65ec7568fd..4dade5ca78 100644 --- a/collects/scribblings/foreign/unexported.scrbl +++ b/collects/scribblings/foreign/unexported.scrbl @@ -19,7 +19,7 @@ please let us know. [lib (or/c ffi-lib? path-string? #f)]) any]{ -Pulls out a foreign object from a library, returning a Scheme value +Pulls out a foreign object from a library, returning a Racket value that can be used as a pointer. If a name is provided instead of a foreign-library value, @scheme[ffi-lib] is used to create a library object.} @@ -48,9 +48,9 @@ cstructs, and another ctype for user-defined ctypes.} [abi (or/c symbol/c #f) #f]) any]{ -The primitive mechanism that creates Scheme ``callout'' values. The +The primitive mechanism that creates Racket ``callout'' values. The given @scheme[ptr] (any pointer value, including @scheme[ffi-obj] -values) is wrapped in a Scheme-callable primitive function that uses +values) is wrapped in a Racket-callable primitive function that uses the types to specify how values are marshaled. The optional @scheme[abi] argument determines the foreign ABI that is @@ -66,7 +66,7 @@ especially important on Windows, where most system functions are [atomic? any/c #f]) ffi-callback?]{ -The symmetric counterpart of @scheme[ffi-call]. It receives a Scheme +The symmetric counterpart of @scheme[ffi-call]. It receives a Racket procedure and creates a callback object, which can also be used as a pointer. This object can be used as a C-callable function, which invokes @scheme[proc] using the types to specify how values are diff --git a/collects/scribblings/framework/comment-box.scrbl b/collects/scribblings/framework/comment-box.scrbl index 518fee4370..e87ce3f9bf 100644 --- a/collects/scribblings/framework/comment-box.scrbl +++ b/collects/scribblings/framework/comment-box.scrbl @@ -6,7 +6,7 @@ @defclass[comment-box:snip% editor-snip:decorated% (readable-snip<%>)]{ This snip implements the comment boxes that you see in - DrScheme. + DrRacket. @defmethod*[#:mode override (((make-editor) (is-a?/c text%)))]{ diff --git a/collects/scribblings/framework/editor.scrbl b/collects/scribblings/framework/editor.scrbl index d5d19533ea..64a353be79 100644 --- a/collects/scribblings/framework/editor.scrbl +++ b/collects/scribblings/framework/editor.scrbl @@ -79,7 +79,7 @@ Typically, this method is called when the frame containing the editor is closed, but in some cases an editor is considered ``closed'' before the frame it is - in is closed (eg, when a tab in DrScheme is closed), and + in is closed (e.g., when a tab in DrRacket is closed), and thus @method[editor:basic<%> on-close] will be called at that point. diff --git a/collects/scribblings/framework/frame.scrbl b/collects/scribblings/framework/frame.scrbl index aea24cfcff..a0f94c39a0 100644 --- a/collects/scribblings/framework/frame.scrbl +++ b/collects/scribblings/framework/frame.scrbl @@ -161,7 +161,7 @@ Calls @scheme[exit:on-exit] and then queues a callback - to call MzScheme's @scheme[exit] + to call Racket's @scheme[exit] function. If that returns, it calls @scheme[exit:set-exiting] diff --git a/collects/scribblings/framework/framework.scrbl b/collects/scribblings/framework/framework.scrbl index 8eac4c3906..01d2b005e9 100644 --- a/collects/scribblings/framework/framework.scrbl +++ b/collects/scribblings/framework/framework.scrbl @@ -1,85 +1,85 @@ #lang scribble/doc -@(require (for-label framework scheme/gui)) +@(require (for-label framework racket/gui)) @(require scribble/manual) -@title{@bold{Framework}: PLT GUI Application Framework} +@title{@bold{Framework}: Racket GUI Application Framework} @(defmodule framework) @author["Robert Bruce Findler" "Matthew Flatt"] The framework provides a number of mixins, classes and functions designed to help you build a complete application -program on top of the @scheme[scheme/gui] library. +program on top of the @racket[racket/gui] library. @itemize[ @item{@bold{Entire Framework} @itemize[ -@item{@scheme[(require @#,schememodname[framework])] +@item{@racket[(require @#,racketmodname[framework])] This library provides all of the definitions and syntax described in this manual. } -@item{@scheme[(require framework/framework-sig)] +@item{@racket[(require framework/framework-sig)] This library provides the signature definitions: - @scheme[framework^], and - @scheme[framework-class^]. - The @scheme[framework^] signature contains all of the + @racket[framework^], and + @racket[framework-class^]. + The @racket[framework^] signature contains all of the names of the procedures described in this manual, except - those that begin with @scheme[test:] and - @scheme[gui-utils:]. The @scheme[framework-class^] + those that begin with @racket[test:] and + @racket[gui-utils:]. The @racket[framework-class^] signature contains all of the classes defined in this manual. } -@item{@scheme[(require framework/framework-unit)] +@item{@racket[(require framework/framework-unit)] This library provides one - @scheme[unit/sig]: @scheme[framework@]. It exports the signature - @scheme[framework^]. It imports the @scheme[mred^] signature. + @racket[unit/sig]: @racket[framework@]. It exports the signature + @racket[framework^]. It imports the @racket[mred^] signature. } ]} @item{ @bold{Test Suite Engine} -@scheme[(require @#,schememodname[framework/test])] +@racket[(require @#,racketmodname[framework/test])] This library provides all of the definitions beginning with -@scheme[test:] described in this manual. +@racket[test:] described in this manual. } @item{ @bold{GUI Utilities} -@scheme[(require @#,schememodname[framework/gui-utils])] +@racket[(require @#,racketmodname[framework/gui-utils])] This libraries provides all of the definitions beginning - with @scheme[gui-utils:] described in this manual. + with @racket[gui-utils:] described in this manual. } @item{ @bold{Preferences} -@scheme[(require @#,schememodname[framework/preferences])] +@racket[(require @#,racketmodname[framework/preferences])] This library provides a subset of the names of the @tt{framework.ss} library, namely those for manipulating preference settings and is designed to be - used from mzscheme. + used from @exec{racket}. The precise set of exported names is: -@scheme[preferences:snapshot?], -@scheme[preferences:restore-prefs-snapshot], -@scheme[preferences:get-prefs-snapshot], -@scheme[exn:make-unknown-preference], -@scheme[exn:unknown-preference?], -@scheme[preferences:low-level-put-preferences], -@scheme[preferences:get], -@scheme[preferences:set], -@scheme[preferences:add-callback], -@scheme[preferences:set-default], -@scheme[preferences:set-un/marshall], and -@scheme[preferences:restore-defaults]. +@racket[preferences:snapshot?], +@racket[preferences:restore-prefs-snapshot], +@racket[preferences:get-prefs-snapshot], +@racket[exn:make-unknown-preference], +@racket[exn:unknown-preference?], +@racket[preferences:low-level-put-preferences], +@racket[preferences:get], +@racket[preferences:set], +@racket[preferences:add-callback], +@racket[preferences:set-default], +@racket[preferences:set-un/marshall], and +@racket[preferences:restore-defaults]. } @item{@bold{Decorated Editor Snip} -@scheme[(require framework/decorated-editor-snip)] +@racket[(require framework/decorated-editor-snip)] This library is here for backwards compatibility. The functionality in it has moved into the framework proper, in diff --git a/collects/scribblings/framework/scheme.scrbl b/collects/scribblings/framework/scheme.scrbl index 3534b8a1d3..8684d2fd28 100644 --- a/collects/scribblings/framework/scheme.scrbl +++ b/collects/scribblings/framework/scheme.scrbl @@ -2,7 +2,7 @@ @(require scribble/manual scribble/extract) @(require (for-label framework)) @(require (for-label scheme/gui)) -@title{Scheme} +@title{Racket} @definterface[scheme:sexp-snip<%> ()]{ @defmethod*[(((get-saved-snips) (listof snip%)))]{ @@ -35,7 +35,7 @@ } } @definterface[scheme:text<%> (text:basic<%> mode:host-text<%> color:text<%>)]{ - Texts matching this interface support Scheme mode operations. + Texts matching this interface support Racket mode operations. @defmethod*[(((get-limit (start exact-integer)) int))]{ Returns a limit for backward-matching parenthesis starting at position @@ -225,7 +225,7 @@ } } @defmixin[scheme:text-mixin (text:basic<%> mode:host-text<%> color:text<%> text:autocomplete<%>) (scheme:text<%>)]{ - This mixin adds functionality for editing Scheme files. + This mixin adds functionality for editing Racket files. The result of this mixin uses the same initialization arguments as the mixin's argument. @@ -241,7 +241,7 @@ implements this interface. } @defmixin[scheme:text-mode-mixin (color:text-mode<%> mode:surrogate-text<%>) (scheme:text-mode<%>)]{ - This mixin adds Scheme mode functionality + This mixin adds Racket mode functionality to the mode that it is mixed into. The resulting mode assumes that it is only set to an editor that is the result of diff --git a/collects/scribblings/framework/test.scrbl b/collects/scribblings/framework/test.scrbl index e6ce261d24..baf993fb63 100644 --- a/collects/scribblings/framework/test.scrbl +++ b/collects/scribblings/framework/test.scrbl @@ -8,7 +8,7 @@ The framework provides several new primitive functions that simulate user actions, which may be used to test applications. You use these -primitives and combine them just as regular MzScheme functions. For +primitives and combine them just as regular Racket functions. For example, @schemeblock[ (test:keystroke #\A) diff --git a/collects/scribblings/framework/text.scrbl b/collects/scribblings/framework/text.scrbl index a169a63f35..96ae777ca0 100644 --- a/collects/scribblings/framework/text.scrbl +++ b/collects/scribblings/framework/text.scrbl @@ -121,7 +121,7 @@ The result of this method is a symbol that identifies this editor and that is used as the port-name of a port that is - read from this editor if this editor is used in DrScheme. + read from this editor if this editor is used in DrRacket. See also @method[text:basic<%> port-name-matches?]. } @@ -345,7 +345,7 @@ hits are coalesced into a single search results when bubbles are drawn. This means, for example, that searching for a space in a file with 80,000 spaces (as one file in - the PLT Scheme code base has) is still tractable, since + the Racket code base has) is still tractable, since many of those spaces will be next to each other and thus there will be far fewer bubbles (the file in question has only 20,000 such bubbles). diff --git a/collects/scribblings/guide/dialects.scrbl b/collects/scribblings/guide/dialects.scrbl index 7beeb4660e..b6dc1f69d5 100644 --- a/collects/scribblings/guide/dialects.scrbl +++ b/collects/scribblings/guide/dialects.scrbl @@ -97,7 +97,7 @@ including the following: @itemize[ - @item{@racketmodname[typed/scheme] --- like + @item{@racketmodname[typed/racket] --- like @racketmodname[racket], but statically typed; see @other-manual['(lib "typed-scheme/scribblings/ts-guide.scrbl")]} diff --git a/collects/scribblings/main/acks.scrbl b/collects/scribblings/main/acks.scrbl index 64caf9502e..547c7f5c58 100644 --- a/collects/scribblings/main/acks.scrbl +++ b/collects/scribblings/main/acks.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require scribble/manual - drscheme/acks + drracket/acks "private/utils.ss") @main-page['acks] diff --git a/collects/scribblings/main/private/search.js b/collects/scribblings/main/private/search.js index 632e0b24ee..4cd852abce 100644 --- a/collects/scribblings/main/private/search.js +++ b/collects/scribblings/main/private/search.js @@ -194,8 +194,8 @@ function InitializeSearch() { +'
    ' +MakeContextQueryItem("M:", "Bindings") +MakeContextQueryItem("T:reference", "Reference manual") - +MakeContextQueryItem("M:scheme", "{{scheme}} bindings") - +MakeContextQueryItem("M:scheme/base", "{{scheme/base}} bindings") + +MakeContextQueryItem("M:racket", "{{racket}} bindings") + +MakeContextQueryItem("M:racket/base", "{{racket/base}} bindings") +'
' +'' +MakeChevrons(1, diff --git a/collects/scribblings/raco/zo-parse.scrbl b/collects/scribblings/raco/zo-parse.scrbl index 9f01d45cef..2f696e0fd6 100644 --- a/collects/scribblings/raco/zo-parse.scrbl +++ b/collects/scribblings/raco/zo-parse.scrbl @@ -210,6 +210,7 @@ to its depth from before evaluating the form.} @defstruct+[(mod form) ([name symbol?] + [srcname symbol?] [self-modidx module-path-index?] [prefix prefix?] [provides (listof (list/c (or/c exact-integer? #f) diff --git a/collects/scribblings/reference/init.scrbl b/collects/scribblings/reference/init.scrbl index 3c178388c2..dd7e27d264 100644 --- a/collects/scribblings/reference/init.scrbl +++ b/collects/scribblings/reference/init.scrbl @@ -16,3 +16,27 @@ the @racketmodname[racket], @racketmodname[racket/enter] and library for GRacket. It re-exports the @racketmodname[racket/init] and @racketmodname[racket/gui/base] libraries, and it sets @racket[current-load] to use @racket[text-editor-load-handler].} + +@defmodule*/no-declare[(racket/language-info)]{The +@racketmodname[racket/language-info] library provides a +@schemeidfont{get-info} function that takes any value and returns +another function; the returned function takes a key value and a +default value, and it returns @scheme['(#(racket/runtime-config +configure #f))] if the key is @scheme['configure-runtime] or the +default value otherwise.} + +The vector @scheme['#(racket/language-info get-info #f)] is suitable +for attaching to a module as its language info to get the same +language information as the @scheme[racket/base] language. + +@defmodule*/no-declare[(racket/runtime-config)]{The +@racketmodname[racket/runtime-config] library provides a +@racketidfont{configure} function that returns another function; the +returned function takes an value ans set @racket[print-as-expression] +to @scheme[#t].} + +The vector @scheme[#(racket/runtime-config configure #f)] is suitable +as a member of a list of runtime-configuration specification (as +returned by a module's language-information function for the key +@racket['configure-runtime]) to obtain the same runtime configuration as +for the @schememodname[racket/base] language. diff --git a/collects/scribblings/reference/module-reflect.scrbl b/collects/scribblings/reference/module-reflect.scrbl index 4959db1f26..b5b08f2006 100644 --- a/collects/scribblings/reference/module-reflect.scrbl +++ b/collects/scribblings/reference/module-reflect.scrbl @@ -323,7 +323,8 @@ the interpretation of results is up to external tools, such as DrRacket. If no information is available for a given key, the result should be the given default value. -See also @racket[module->language-info].} +See also @racket[module->language-info] and +@racketmodname[racket/language-info].} @;------------------------------------------------------------------------ diff --git a/collects/scribblings/reference/printer.scrbl b/collects/scribblings/reference/printer.scrbl index f8fa142c63..a4f235f691 100644 --- a/collects/scribblings/reference/printer.scrbl +++ b/collects/scribblings/reference/printer.scrbl @@ -4,27 +4,39 @@ @title[#:tag "printing" #:style 'quiet]{The Printer} -The Racket printer support three modes: +The Racket printer supports three modes: @itemlist[ - @item{@racket[print] mode by default prints most datatypes in such a - way that evaluating the output as an expression produces a - value that is @racket[equal?] to the printed value;} - @item{@racket[write] mode prints core datatypes in such a way that using @racket[read] on the output produces a value that is - @racket[equal?] to the printed value; when - @racket[print-as-expression] is set to @racket[#f], then - @racket[print] mode is like @racket[write] mode;} + @racket[equal?] to the printed value;} @item{@racket[display] mode prints core datatypes is a form in a more ``end-user'' style rather than ``programmer' style; for example, a string @racket[display]s as its content characters - without surrounding @litchar{"}s or escapes.} + without surrounding @litchar{"}s or escapes;} + + @item{@racket[print] mode by default---when + @scheme[print-as-expression] is @scheme[#t]---prints most + datatypes in such a way that evaluating the output as an + expression produces a value that is @racket[equal?] to the + printed value; when @racket[print-as-expression] is set to + @racket[#f], then @racket[print] mode is like @racket[write] + mode.} ] +In @racket[print] mode when @racket[print-as-expression] is +@scheme[#t] (as is the default), a value prints at a @deftech{quoting +depth} of either @scheme[0] (unquoted) or @scheme[1] (quoted). The +initial quoting depth is accepted as an optional argument by +@racket[print], and printing of some compound datatypes adjusts the +print depth for component values. For example, when a list is printed +at quoting depth @scheme[0] and all of its elements are +@deftech{quotable}, the list is printed with a @litchar{'} prefix, and +the list's elements are printed at quoting depth @scheme[1]. + When the @scheme[print-graph] parameter is set to @scheme[#t], then the printer first scans an object to detect cycles. The scan traverses the components of pairs, mutable pairs, vectors, boxes (when @@ -44,16 +56,6 @@ terms of Unicode characters; see @secref["ports"] for information on how a character stream is written to an port's underlying byte stream. -In @racket[print] mode when @racket[print-as-expression] is -@scheme[#t] (as is the default), a value prints at a @deftech{quoting -depth} of either @scheme[0] (unquoted) or @scheme[1] (quoted). The -initial quoting depth is accepted as an optional argument by -@racket[print], and printing of some compound datatypes adjusts the -print depth for component values. For example, when a list is printed -at quoting depth @scheme[0] and all of its elements are -@deftech{quotable}, the list is printed with a @litchar{'} prefix, and -the list's elements are printed at quoting depth @scheme[1]. - @section[#:tag "print-symbol"]{Printing Symbols} @@ -183,7 +185,11 @@ mode but with a @litchar{'} prefix; the pair's content is printed with (when the pair is a list), or @litchar{list*} (otherwise) after the openining @litchar{(}, any @litchar{.} that would otherwise be printed is suppressed, and the pair content is printed at @tech{quoting depth} -@scheme[0]. +@scheme[0]. In all cases, when @scheme[print-as-expression] is +@scheme[#t] for @scheme[print] mode, then the value of +@scheme[print-reader-abbreviations] is ignored and reader +abbreviations are always used for lists printed at @tech{quoting +depth} @scheme[1]. By default, mutable pairs (as created with @scheme[mcons]) print the same as pairs for @scheme[write] and @scheme[display], except that diff --git a/collects/scribblings/reference/startup.scrbl b/collects/scribblings/reference/startup.scrbl index f1177da4cd..a04989358f 100644 --- a/collects/scribblings/reference/startup.scrbl +++ b/collects/scribblings/reference/startup.scrbl @@ -134,7 +134,9 @@ flags: the evaluation are printed via @racket[current-print].} @item{@FlagFirst{f} @nonterm{file} or @DFlagFirst{load} - @nonterm{file} : @racket[load]s @nonterm{file}.} + @nonterm{file} : @racket[load]s @nonterm{file}; if + @nonterm{file} is @filepath{-}, then expressions are read and + evaluated from standard input.} @item{@FlagFirst{t} @nonterm{file} or @DFlagFirst{require} @nonterm{file} : @racket[require]s @nonterm{file}.} diff --git a/collects/scribblings/reference/syntax.scrbl b/collects/scribblings/reference/syntax.scrbl index 581c30b1bd..884be10580 100644 --- a/collects/scribblings/reference/syntax.scrbl +++ b/collects/scribblings/reference/syntax.scrbl @@ -202,9 +202,12 @@ is a module path (in the sense of @racket[module-path?]) and the second is a symbol, then the property value is preserved in the corresponding compiled and/or declared module. The third component of the vector should be printable and @racket[read]able, so that it can -be preserved in marshaled bytecode. See also -@racket[module-compiled-language-info] and -@racket[module->language-info].} +be preserved in marshaled bytecode. The @racketmodname[racket/base] +and @racketmodname[racket] languages attach +@scheme['#(racket/language-info get-info #f)] to a @racket[module] +form. See also @racket[module-compiled-language-info], +@racket[module->language-info], and +@racketmodname[racket/language-info].} See also @secref["module-eval-model"] and @secref["mod-parse"]. diff --git a/collects/scribblings/reference/write.scrbl b/collects/scribblings/reference/write.scrbl index 5f126188d3..608ab0e090 100644 --- a/collects/scribblings/reference/write.scrbl +++ b/collects/scribblings/reference/write.scrbl @@ -212,7 +212,7 @@ with @racket[quote], @racket['quasiquote], @racket['unquote], @defboolparam[print-as-expression on?]{ A parameter that controls printing in @racket[print] mode (as opposed -to @racket[write] or @racket[display]); defaults to @racket[#f]. See +to @racket[write] or @racket[display]); defaults to @racket[#t]. See @secref["printing"] for more information.} @defboolparam[print-honu on?]{ diff --git a/collects/scribblings/scheme/scheme.scrbl b/collects/scribblings/scheme/scheme.scrbl index 8bed0260f4..2b2e352574 100644 --- a/collects/scribblings/scheme/scheme.scrbl +++ b/collects/scribblings/scheme/scheme.scrbl @@ -148,6 +148,21 @@ must occur after all the @scheme[provide*] forms to which it refers.} @compat[scheme/help racket/help] @compat[scheme/include racket/include] @compat[scheme/init racket/init] + +@;------------------------------------------------------------------------ + +@section[#:tag "scheme/language-info"]{@schememodname[scheme/language-info]} + +@defmodule[scheme/language-info]{ +The @schememodname[scheme/language-info] library is like +@schememodname[racket/language-info], except that it produces +@scheme['(#(scheme/runtime-config configure #f))] for the +@scheme['configure-runtime] information key.} + +See also @racketmodname[scheme/runtime-config]. + +@;------------------------------------------------------------------------ + @compat[scheme/list racket/list] @compat[scheme/load racket/load] @compat[scheme/local racket/local] @@ -230,6 +245,19 @@ An alias for @racket[pretty-write].} @compat[scheme/require racket/require] @compat[scheme/require-syntax racket/require-syntax] @compat[scheme/require-transform racket/require-transform] + +@;------------------------------------------------------------------------ + +@section[#:tag "scheme/runtime-config"]{@schememodname[scheme/runtime-config]} + +@defmodule[scheme/runtime-config]{ +The @schememodname[scheme/runtime-config] library is like +@schememodname[racket/runtime-config], except that the result of its +@schemeidfont{configure} function is a procedure that sets +@racket[print-as-expression] to @scheme[#f].} + +@; ---------------------------------------- + @compat[scheme/runtime-path racket/runtime-path] @; ---------------------------------------- diff --git a/collects/scribblings/tools/frame.scrbl b/collects/scribblings/tools/frame.scrbl index eb16fe88bb..3ee7e11550 100644 --- a/collects/scribblings/tools/frame.scrbl +++ b/collects/scribblings/tools/frame.scrbl @@ -5,7 +5,7 @@ @defclass[drracket:frame:name-message% canvas% ()]{ This class implements the little filename button in the top-right hand -side of drscheme's frame. +side of DrRacket's frame. @@ -40,7 +40,7 @@ Provides an implementation of @defmixin[drracket:frame:basics-mixin (frame:standard-menus<%>) (drracket:frame:basics<%>)]{ -Use this mixin to establish some common menu items across various DrScheme windows. +Use this mixin to establish some common menu items across various DrRacket windows. @@ -88,7 +88,7 @@ adds a [evt (is-a?/c control-event%)]) void?]{ -Opens a new, empty DrScheme window. +Opens a new, empty DrRacket window. } @@ -127,7 +127,7 @@ Returns the empty string. @methspec{ Each string in the result of this method is added as a menu -item to DrScheme's ``Related Web Sites'' menu item. The +item to DrRacket's ``Related Web Sites'' menu item. The first string is the name of the menu item and the second string is a url that, when the menu item is chosen, is sent to the user's browser. @@ -145,7 +145,7 @@ Defaultly returns the empty list. [evt (is-a?/c control-event%)]) void?]{ -Opens an about box for DrScheme. +Opens an about box for DrRacket. } @@ -154,7 +154,7 @@ Opens an about box for DrScheme. (help-menu:about-string) string?]{ -Returns the string @scheme["DrScheme"]. +Returns the string @scheme["DrRacket"]. } @@ -163,7 +163,7 @@ Returns the string @scheme["DrScheme"]. (help-menu:before-about [help-menu (is-a?/c menu%)]) void?]{ -Adds the Help Desk menu item and the Welcome to DrScheme menu item. +Adds the Help Desk menu item and the Welcome to DrRacket menu item. } @defmethod[#:mode override @@ -243,7 +243,7 @@ that evaluation is taking place in the user's program. This method is intended to be overridden. It's job is to update the @scheme["View"] menu to match the state of the -visible windows. In the case of the standard DrScheme +visible windows. In the case of the standard DrRacket window, it change the menu items to reflect the visibility of the definitions and interaction @scheme[editor-canvas%]s. diff --git a/collects/scribblings/tools/language.scrbl b/collects/scribblings/tools/language.scrbl index 824f5acb88..75f2c40bbd 100644 --- a/collects/scribblings/tools/language.scrbl +++ b/collects/scribblings/tools/language.scrbl @@ -152,8 +152,8 @@ The settings in this structure reflect the settings show in the language configuration dialog for languages constructed with this mixin. The first controls the input for the language. The rest specify printing controls for the -language. The style @scheme['write] is the default style, -used in the MzScheme REPL. The sharing field determines if +language. The style @scheme['print] is the default style, +as normally used in the Racket REPL. The sharing field determines if cycles and sharing in values are displayed when the value is rendered. The insert newlines field determines if values in the repl are formatted with @scheme[write] style-line @@ -323,7 +323,7 @@ Returns @scheme[#t]. @definterface[drracket:language:module-based-language<%> ()]{ This interface is for languages that can be implemented -with MzScheme @scheme[module]s. +with Racket @scheme[module]s. Use the @scheme[drracket:language:module-based-language->language-mixin] @@ -476,8 +476,8 @@ This method is the same as @defmethod[(use-mred-launcher) boolean?]{ This method is called when an executable is created to -determine if the executable should use the mred or the -mzscheme binary. +determine if the executable should use the GRacket or the +Racket binary. } @@ -488,7 +488,7 @@ mzscheme binary. The result of this method controls how the module is attached to the user's namespace. If the method returns @scheme[#t], -the mzscheme primitive +the Racket primitive @scheme[namespace-require/copy] is used and if it returns @scheme[#f], @scheme[namespace-require] @@ -565,10 +565,10 @@ to install the result of @definterface[drracket:language:language<%> ()]{ Implementations of this interface are languages that -DrScheme supports. +DrRacket supports. See @secref["adding-languages"] for an overview of -adding languages to DrScheme. +adding languages to DrRacket. @@ -698,7 +698,7 @@ and This method is called on the user's main eventspace thread, and without a prompt or other control delimiter. It must return without raising an - error, or else the DrScheme window will be wedged. + error, or else the DrRacket window will be wedged. } @defmethod[(front-end/interaction [port input-port] @@ -717,7 +717,7 @@ See also @defmethod[(get-comment-character) (values string? char?)]{ Returns text to be used for the ``Insert Large Letters'' -menu item in DrScheme. The first result is a prefix to be +menu item in DrRacket. The first result is a prefix to be placed at the beginning of each line and the second result is a character to be used for each pixel in the letters. @@ -727,7 +727,7 @@ is a character to be used for each pixel in the letters. string?]{ Returns the name of the language, as shown in the REPL when executing programs in the language and in the bottom left of -the drscheme window. +the DrRacket window. } @@ -738,7 +738,7 @@ This method is used in a manner analogous to Each element in the list indicates how the names at that point in dialog will be sorted. Names with lower numbers -appear first. If two languages are added to DrScheme with +appear first. If two languages are added to DrRacket with the same strings (as given by the @method[drracket:language:language<%> get-language-position] method) the corresponding numbers returned by this method must be the same. Additionally, no two languages can have the @@ -800,8 +800,8 @@ This method is only called when It is expected to return a string that contains N lines, where N is the result of calling @method[drracket:language:language<%> get-metadata-lines]. The string is prefixed to the buffer before the file is -saved by DrScheme, and removed from the buffer after it is -opened in DrScheme. +saved by DrRacket, and removed from the buffer after it is +opened in DrRacket. The string is expect to be a prefix to the file that sets up a reader for files in this language, using @tt{#reader}. @@ -856,7 +856,7 @@ The result of this method is used when saving or loading files. If the result is a sexp, saved files get a prefix inserted at the beginning (the prefix is determined by calling -@method[drracket:language:language<%> get-metadata]). When the file is then loaded, DrScheme recognizes this +@method[drracket:language:language<%> get-metadata]). When the file is then loaded, DrRacket recognizes this prefix and sets the language back to match the saved file. See also @@ -870,7 +870,7 @@ See also @defmethod[(get-style-delta) (or/c #f (is-a?/c style-delta%) (listof (list/c (is-a?/c style-delta%) number? number?)))]{ The style delta that this method returns is used in the -language dialog and the DrScheme REPL when the language's +language dialog and the DrRacket REPL when the language's name is printed. When it is @scheme[#f], no styling is used. @@ -883,7 +883,7 @@ the name. } @defmethod[(extra-repl-information [settings settings] [port output-port?]) void?]{ - This method is called on the DrScheme eventspace main thread to insert extra + This method is called on the DrRacket eventspace main thread to insert extra information into the REPL to reflect the state of the program. It is used, for example, to print out the ``Teachpack'' lines in the HtDP languages. @@ -893,7 +893,7 @@ the name. @defmethod[(marshall-settings [settings settings]) writable]{ -Translates an instance of the settings type into a scheme +Translates an instance of the settings type into a Racket object that can be written out to disk. } @@ -904,7 +904,7 @@ object that can be written out to disk. This method is only called when @method[drracket:language:language<%> get-reader-module] returns an sexp. -When a file is opened in DrScheme, if this language's +When a file is opened in DrRacket, if this language's @method[drracket:language:language<%> get-reader-module] returns an sexp, the prefix of the file (the first N lines, where N is the number returned by @@ -921,27 +921,27 @@ the settings for this language. @defmethod[(on-execute [settings settings] [run-in-user-thread ((-> any) -> any)]) any]{ -The @scheme[on-execute] method is called on DrScheme's +The @scheme[on-execute] method is called on DrRacket's eventspace's main thread before any evaluation happens when the Run button is clicked. It is also called when -a new DrScheme tab (or window) is created to initialize +a new DrRacket tab (or window) is created to initialize the empty interactions window. -Use this method to initialize MzScheme's +Use this method to initialize Racket's @secref[#:doc '(lib "scribblings/reference/reference.scrbl") "parameters"] for the user. When this function is called, the user's thread has already been created, as has its custodian. These parameters have been -changed from the defaults in MzScheme: +changed from the defaults in Racket: @itemize[ @item{@scheme[current-custodian] is set to a new custodian.} @item{@scheme[current-namespace] has been set to a newly created empty namespace.This namespace has the following modules copied (with @scheme[namespace-attach-module]) - from DrScheme's original namespace: + from DrRacket's original namespace: @itemize[ @item{@scheme['mzscheme]} - @item{@scheme['(lib "mred.ss" "mred")]} + @item{@scheme['mred]} ]} @item{ @scheme[read-curly-brace-as-paren] @@ -980,16 +980,16 @@ changed from the defaults in MzScheme: @scheme[current-output-port], and @scheme[current-error-port].} @item{The -@scheme[event-dispatch-handler] is set so that DrScheme can perform some initial setup and +@scheme[event-dispatch-handler] is set so that DrRacket can perform some initial setup and close down around the user's code.} @item{The @scheme[current-directory] and @scheme[current-load-relative-directory] are set to the directory where the definitions file is saved, or if it isn't saved, to the initial directory where - DrScheme started up.} + DrRacket started up.} @item{The snip-class-list, returned by -@scheme[get-the-snip-class-list] is initialized with all of the snipclasses in DrScheme's eventspace's snip-class-list.} +@scheme[get-the-snip-class-list] is initialized with all of the snipclasses in DrRacket's eventspace's snip-class-list.} @item{ The @@ -1004,10 +1004,10 @@ that error message into the definitions window.} The @scheme[run-in-user-thread] arguments accepts thunks and runs them on the user's eventspace's main thread. These -thunks must not raise an exceptions (or drscheme itself will +thunks must not raise an exceptions (or DrRacket itself will get stuck). In addition, the output ports are not yet functioning, so print outs should be directed to the -original drscheme output port, if necessary. +original DrRacket output port, if necessary. } @@ -1049,7 +1049,7 @@ See also @defmethod[(unmarshall-settings [input writable]) (or/c settings false/c)]{ -Translates a Scheme value into a settings, returning +Translates a Racket value into a settings, returning @scheme[#f] if that is not possible. }} diff --git a/collects/scribblings/tools/module-language-tools.scrbl b/collects/scribblings/tools/module-language-tools.scrbl index 423f4d7109..54526e0ca8 100644 --- a/collects/scribblings/tools/module-language-tools.scrbl +++ b/collects/scribblings/tools/module-language-tools.scrbl @@ -2,14 +2,13 @@ @(require "common.ss") @(tools-title "module-language-tools") -@section-index["drscheme:toolbar-buttons"] If the result of @scheme[read-language] for a language is a function, -DrScheme will query it to determine if there are any new toolbar +DrRacket will query it to determine if there are any new toolbar buttons to be used when editing files in this language (when -DrScheme's language is set to the Module language). +DrRacket's language is set to the Module language). -Specifically, DrScheme will pass @scheme['drscheme:toolbar-buttons] +Specifically, DrRacket will pass @indexed-scheme['drscheme:toolbar-buttons] to the function and expect back a value matching this contract: @schemeblock[(listof (list/c string? (is-a?/c bitmap%) diff --git a/collects/scribblings/tools/module-language.scrbl b/collects/scribblings/tools/module-language.scrbl index 16f960e31d..b5a5ffdefc 100644 --- a/collects/scribblings/tools/module-language.scrbl +++ b/collects/scribblings/tools/module-language.scrbl @@ -4,8 +4,8 @@ @definterface[drracket:language:module-language<%> ()]{ -The only language that implements this interface is DrScheme's ``Use the language declared in the source'' language, -i.e., the ``Module'' language. +The only language that implements this interface is DrRacket's ``Use +the language declared in the source'' language. @defmethod[(get-users-language-name) string]{ Returns the name of the language that is declared in the source, as a string. diff --git a/collects/scribblings/tools/rep.scrbl b/collects/scribblings/tools/rep.scrbl index 3a3a8bfa16..f2a5bab734 100644 --- a/collects/scribblings/tools/rep.scrbl +++ b/collects/scribblings/tools/rep.scrbl @@ -9,8 +9,8 @@ @defclass[drracket:rep:text% scheme:text% (drracket:rep:text<%>)]{ -This class implements a read-eval-print loop for DrScheme. User -submitted evaluations in DrScheme are evaluated asynchronously, in an +This class implements a read-eval-print loop for DrRacket. User +submitted evaluations in DrRacket are evaluated asynchronously, in an eventspace created for the user. No evaluations carried out by this class affect the implementation that uses it. @@ -52,7 +52,7 @@ are just ignored. @methspec{ Use this function to evaluate code or run actions that should mimic -the user's interactions. For example, DrScheme uses this function to +the user's interactions. For example, DrRacket uses this function to evaluate expressions in the definitions window and expressions submitted at the prompt. @@ -102,18 +102,18 @@ The @scheme[complete-program?] argument determines if the @method[drracket:language:language<%> front-end/interaction] method. When evaluation finishes, it calls @scheme[cleanup] on the user's main thread. - This method must be called from the drscheme main thread. + This method must be called from the DrRacket main thread. } @defmethod[#:mode augment (after-many-evals) any]{ - Called from the drscheme main thread after + Called from the DrRacket main thread after @method[drracket:rep:text% evaluate-from-port] finishes (no matter how it finishes). } @defmethod[#:mode augment (on-execute [run-on-user-thread (-> any)]) any]{ - Called from the drscheme thread after the language's + Called from the DrRacket thread after the language's @method[drracket:language:language<%> on-execute] method has been invoked, and after the special values have been setup (the ones registered @@ -220,7 +220,7 @@ See also @defmethod[(initialize-console) void?]{ -This inserts the ``Welcome to DrScheme'' message into the interactions +This inserts the ``Welcome to DrRacket'' message into the interactions buffer, calls @method[drracket:rep:text% reset-console], @method[drracket:rep:text% insert-prompt], and @@ -263,7 +263,7 @@ Calls the super method. void?]{ @methspec{ -This method queues thunks for drscheme's eventspace in a +This method queues thunks for DrRacket's eventspace in a special output-related queue. }} @@ -306,7 +306,7 @@ Calls @scheme[f], after switching to the user's thread. void?]{ Shuts down the user's program and all windows. Reclaims any resources the program allocated. It is expected to be -called from DrScheme's main eventspace thread. +called from DrRacket's main eventspace thread. } @@ -316,7 +316,7 @@ This waits for all pending IO in the rep to finish and then returns. This method must only be called from the main thread in -DrScheme's eventspace +DrRacket's eventspace } @@ -333,7 +333,7 @@ in the user's eventspace @defmixin[drracket:rep:drs-bindings-keymap-mixin (editor:keymap<%>) ()]{ -This mixin adds some drscheme-specific keybindings to the +This mixin adds some DrRacket-specific keybindings to the editor it is mixed onto. @@ -343,7 +343,7 @@ editor it is mixed onto. (listof (is-a?/c keymap%))]{ Calls the super method and adds in a keymap with the -drscheme-specific keybindings: +DrRacket-specific keybindings: @itemize[ @item{f5 - Run} @@ -375,7 +375,7 @@ process the program. Tools that annotate the program text should augment this method to clear their own annotations on the program text. -DrScheme calls this method before a program is run (via the +DrRacket calls this method before a program is run (via the Run button). } diff --git a/collects/scribblings/tools/tool-lib-extracts.rkt b/collects/scribblings/tools/tool-lib-extracts.rkt index 2c8fce5fe7..ed091b609a 100644 --- a/collects/scribblings/tools/tool-lib-extracts.rkt +++ b/collects/scribblings/tools/tool-lib-extracts.rkt @@ -2,4 +2,4 @@ (require scribble/extract) -(provide-extracted (lib "tool-lib.rkt" "drscheme")) +(provide-extracted (lib "tool-lib.rkt" "drracket")) diff --git a/collects/scribblings/tools/tools.scrbl b/collects/scribblings/tools/tools.scrbl index 4c44e6e786..e5e4c9b050 100644 --- a/collects/scribblings/tools/tools.scrbl +++ b/collects/scribblings/tools/tools.scrbl @@ -2,33 +2,38 @@ @(begin (require scribble/manual (for-label scheme/gui/base) - (for-label drscheme/tool-lib) + (for-label drracket/tool-lib) (for-label scheme/unit scheme/contract scheme/class) (for-label scheme/base) - (for-label framework/framework)) + (for-label framework/framework) + (for-label drracket/syncheck-drracket-button)) (define (File x) @tt[x]) (define (FileFirst x) @tt[x]) ;; indexing missing -(define (item/cap x . ys) - (apply item (bold (format "~a" x)) ": " ys)) ;; indexing missing +(define-syntax-rule (item/cap x . ys) + (item (indexed-scheme x) ": " . ys)) ;; indexing missing ) -@title{@bold{Plugins}: Extending DrScheme} +@title{@bold{Plugins}: Extending DrRacket} @author["Robert Bruce Findler"] -@(defmodule drscheme/tool-lib) +@defmodule*[(drracket/tool-lib drscheme/tool-lib)] -This manual describes DrScheme's tools interface. It assumes +This manual describes DrRacket's tools interface. It assumes familiarity with -PLT Scheme, as described in +Racket, as described in @(other-manual '(lib "scribblings/guide/guide.scrbl")), -DrScheme, as described in +DrRacket, as described in @(other-manual '(lib "scribblings/drracket/drracket.scrbl")), and the Framework, as described in @(other-manual '(lib "scribblings/framework/framework.scrbl")). +The @racketmodname[drscheme/tool-lib] library is for backward +compatibility; it exports all of the bindings of +@racketmodname[drracket/tool-lib]. + @table-of-contents[] @bold{Thanks} @@ -45,47 +50,47 @@ Christian Queinnec, PLT at large, and many others for their feedback and help. -@section[#:tag "implementing-tools"]{Implementing DrScheme Tools} +@section[#:tag "implementing-tools"]{Implementing DrRacket Tools} -Tools are designed for major extensions in DrScheme's +Tools are designed for major extensions in DrRacket's functionality. To extend the appearance -or the functionality the DrScheme window (say, to annotate -programs in certain ways, to add buttons to the DrScheme -frame or to add additional languages to DrScheme) use a +or the functionality the DrRacket window (say, to annotate +programs in certain ways, to add buttons to the DrRacket +frame or to add additional languages to DrRacket) use a tool. The Macro Stepper, the Syntax Checker, the Stepper, and the teaching languages are all implemented as tools. -When DrScheme starts up, it looks for tools by reading -fields in the @File{info.ss} file of each collection and the +When DrRacket starts up, it looks for tools by reading +fields in the @File{info.rkt} file of each collection and the newest version of each PLaneT package installed on the -system. (Technically, DrScheme looks in a cache of the -info.ss files contents created by setup-plt. Be sure to +system. (Technically, DrRacket looks in a cache of the +@filepath{info.rkt} files contents created by setup-plt. Be sure to re-run setup-plt if you change the contents of -the @File{info.ss} files). DrScheme checks for these +the @File{info.rkt} files). DrRacket checks for these fields: @itemize[ -@item/cap['tools]{ +@item/cap[tools]{ @scheme[(listof (listof string[subcollection-name]))] } -@item/cap['tool-names]{@scheme[(listof (union #f string))]} -@item/cap['tool-icons]{ +@item/cap[tool-names]{@scheme[(listof (union #f string))]} +@item/cap[tool-icons]{ @schemeblock[ (listof (union #f string[relative-pathname] (cons string[filename] (listof string[collection-name]))))] } -@item/cap['tool-urls]{ +@item/cap[tool-urls]{ @scheme[(listof (union #f string[url]))] }] The @scheme[tools] field names a list of tools in this collection. Each tool is specified as a collection path, -relative to the collection where the @File{info.ss} file +relative to the collection where the @File{info.rkt} file resides. As an example, if there is only one tool named -@File{tool.ss}, this suffices: +@File{tool.rkt}, this suffices: @schemeblock[ -(define tools (list (list "tool.ss"))) +(define tools (list (list "tool.rkt"))) ] If the @scheme[tool-icons] or @scheme[tool-names] fields are present, they must be the same length as @scheme[tools]. The @@ -98,7 +103,7 @@ the same as the arguments to @scheme[lib], inside This bitmap and the name show up in the about box, Help Desk's bug report form, and the splash screen as the tool is -loaded at DrScheme's startup. +loaded at DrRacket's startup. @index{phase1} @index{phase2} @@ -106,7 +111,7 @@ Each of @scheme[tools] files must contain a module that @scheme[provide]s @scheme[tool@], which must be bound to a @scheme[unit]. The unit must import the @scheme[drracket:tool^] signature, which is -provided by the @FileFirst{tool.ss} library in the +provided by the @FileFirst{tool.rkt} library in the @scheme[drscheme] collection. The @scheme[drracket:tool^] signature contains all of the names listed in this manual. The unit must export the @scheme[drracket:tool-exports^] @@ -119,7 +124,7 @@ the @tt{phase1} functions are called and then all of the @tt{phase2} functions are called. Certain primitives can only be called during the dynamic extent of those calls. -This mechanism is designed to support DrScheme's +This mechanism is designed to support DrRacket's @scheme[drracket:language:language<%>] extension capabilities. That is, this mechanism enables two tools to cooperate via new capabilities of languages. The first phase @@ -148,21 +153,21 @@ Phase 2 functions: If the tool raises an error as it is loaded, invoked, or as the @scheme[phase1] or @scheme[phase2] thunks are called, -DrScheme catches the error and displays a message box. Then, -DrScheme continues to start up, without the tool. +DrRacket catches the error and displays a message box. Then, +DrRacket continues to start up, without the tool. -For example, if the @File{info.ss} file in a collection +For example, if the @File{info.rkt} file in a collection contains: @schememod[ setup/infotab (define name "Tool Name") -(define tools (list (list "tool.ss"))) +(define tools (list (list "tool.rkt"))) ] then the same collection would be expected to contain a -@File{tool.ss} file. It might contain something like this: +@File{tool.rkt} file. It might contain something like this: @schememod[ scheme/gui -(require drscheme/tool) +(require drracket/tool) (provide tool@) @@ -178,103 +183,98 @@ This tool just opens a few windows to indicate that it has been loaded and that the @scheme[phase1] and @scheme[phase2] functions have been called. -@section[#:tag "adding-languages"]{Adding Languages to DrScheme} -@index{adding languages to DrScheme} +@section[#:tag "adding-languages"]{Adding Languages to DrRacket} +@index{adding languages to DrRacket} -@subsection{Adding Module-based Languages to DrScheme} +@subsection{Adding Module-based Languages to DrRacket} If a language can be implemented as a module (see @scheme[module] for details) and the standard language settings are sufficient, simply create an -@File{info.ss} file in the collection +@File{info.rkt} file in the collection where the module is saved. Include these definitions: @itemize[ -@item/cap['drscheme-language-modules]{ - @index{drscheme-language-modules} This must be bound to a +@item/cap[drscheme-language-modules]{ + This must be bound to a list of collection path specifications or strings, one for each language in the collection. Each collection path specification is the quoted form of what might appear as an argument to @scheme[require], using the @tt{lib} argument (but without the @tt{lib}). The strings represent relative paths starting at the directory - containing the @File{info.ss} file. They are interpreted + containing the @File{info.rkt} file. They are interpreted like string arguments to @scheme[require]. } -@item/cap['drscheme-language-positions]{ -@index{drscheme-language-positions} +@item/cap[drscheme-language-positions]{ This must be bound to a list of language positions. Each language position corresponds to the position of the language in language dialog. Each language position is a list of strings whose length must be at least two. } -@item/cap['drscheme-language-numbers]{ -@index{drscheme-language-numbers} +@item/cap[drscheme-language-numbers]{ This is optional. If present, it must be a list of a list of numbers. Each list corresponds to a single language from this collection. Each number indicates a sorting order in the language dialog for the corresponding string in - @bold{drscheme-language-positions}. If absent, it defaults + @racket[drscheme-language-positions]. If absent, it defaults to a list of zeros that has the same length as - @bold{drscheme-language-positions}. This will rarely be correct. + @racket[drscheme-language-positions]. This will rarely be correct. } -@item/cap['drscheme-language-one-line-summaries]{ -@index{drscheme-language-one-line-summaries} +@item/cap[drscheme-language-one-line-summaries]{ This is optional. If present, it must be a list of strings. Each string is displayed at the bottom of the language dialog when the corresponding language is selected. } -@item/cap['drscheme-language-urls]{ -@index{drscheme-language-urls} +@item/cap[drscheme-language-urls]{ This is optional. If present, it must be a list whose elements are either strings or @scheme[#f]. Clicking the corresponding language's name in the interactions window opens a web browser to the url. } -@item/cap['drscheme-language-readers]{ -@index{drscheme-language-readers} +@item/cap[drscheme-language-readers]{ This is optional. If present, it must be bound to a quoted list of module specifications (that is, a quoted version of the argument to @scheme[require]). Each specification must be a module that exports a function named @scheme[read-syntax]. Each of these - @scheme[read-syntax] functions must match MzScheme's + @scheme[read-syntax] functions must match Racket's @scheme[read-syntax] primitive's contract, but may read different concrete syntax. If the module specification is a plain string, it represents a relative path starting at the directory - containing the @File{info.ss} file. It is interpreted + containing the @File{info.rkt} file. It is interpreted like the string arguments to @scheme[require]. }] The lists must have the same length. As an example, the @italic{Essentials of Programming Languages} -language specification's @File{info.ss} looks like this: +language specification's @File{info.rkt} used to look like this: @schememod[ setup/infotab (require string-constants) (define name "EoPL Support") (define drscheme-language-modules - (list "eopl-lang.ss")) + (list "eopl-lang.rkt")) (define drscheme-language-positions (list (list (string-constant teaching-languages) "Essentials of Programming Languages"))) ] -This @File{info.ss} file indicates that there is a single +This @File{info.rkt} file indicates that there is a single language in this collection. The module that implements the -language is the @File{eopl-lang.ss} file in the same directory as -the @File{info.ss} file. Additionally, the language dialog will contain +language is the @File{eopl-lang.rkt} file in the same directory as +the @File{info.rkt} file. Additionally, the language dialog will contain @tt{Essentials of Programming Languages} as a potential language. The use of the string constant @scheme[teaching-languages] ensures that EoPL's language is -placed properly in foreign language versions of DrScheme. +placed properly in foreign language versions of DrRacket. For collections that define multiple (related) languages, if the language-positions contain multiple strings, the @@ -290,14 +290,14 @@ and the two languages will be grouped together in the language dialog. -@subsection{Adding Arbitrary Languages to DrScheme} +@subsection{Adding Arbitrary Languages to DrRacket} With some additional work, any language that can be compiled -to PLT Scheme is supported by the tools interface, +to Racket is supported by the tools interface, not just those that use standard configurations and @scheme[module]. Each language is a class that implement the -@scheme[drracket:language:language<%>] interface. DrScheme also +@scheme[drracket:language:language<%>] interface. DrRacket also provides two simpler interfaces: @scheme[drracket:language:module-based-language<%>] and @scheme[drracket:language:simple-module-based-language<%>], @@ -311,7 +311,7 @@ Each language is a class that implement the Once you have an implementation of the @scheme[drracket:language:language^] interface, call @scheme[drracket:language-configuration:add-language] to add the language -to DrScheme. +to DrRacket. Each language comes with its own type, called @tt{settings}. This can be any type the language @@ -320,7 +320,7 @@ designer chooses, but to aid documentation, we call it contain parameters of the language, such as case sensitivity, etc. The implementor of the language provides a GUI so the user can configure the settings and all of the -language's operations accept a setting. DrScheme maintains +language's operations accept a setting. DrRacket maintains the current settings for each language. @subsection{Language Extensions} @@ -376,16 +376,16 @@ To help test your tool, use the @seclink["environment-variables" #:doc '(lib "scribblings/drracket/drracket.scrbl")]{@tt{PLTONLYTOOL}} environment variable to load it in isolation. -@section{Creating New Kinds of DrScheme Frames} +@section{Creating New Kinds of DrRacket Frames} -Each frame in DrScheme has certain menus and functionality, +Each frame in DrRacket has certain menus and functionality, most of which is achieved by using the framework. -Additionally, there is one mixin that DrScheme provides to +Additionally, there is one mixin that DrRacket provides to augment that. It is @scheme[drracket:frame:basics-mixin]. Be sure to mix it into any new frame class that you add to -DrScheme. +DrRacket. -@section{Extending the Existing DrScheme Classes} +@section{Extending the Existing DrRacket Classes} Each of the names: @itemize[ @@ -419,12 +419,12 @@ extends the interactions text class with a method named @tt{method1}. Macro-expanding a program may involve arbitrary computation and requires the setup of the correct language. To aid this, -DrScheme's tool interface provides +DrRacket's tool interface provides @scheme[drracket:eval:expand-program] to help. Use this method to extract the fully expanded program text in a particular language. -Because expanding the user's program may require DrScheme to +Because expanding the user's program may require DrRacket to evaluate arbitrary code that the user wrote, tools that expand the user's program should also allow the user to break the expansion. To help with this, the tools interfaces @@ -441,7 +441,7 @@ to disable your tool and calling them to ensure that only one expansion is happening at a time. -Finally, DrScheme provides the +Finally, DrRacket provides the @method[drracket:rep:context<%> set-breakables] method. This method controls what behavior the Break button has. @@ -450,21 +450,21 @@ has. @index{modes} @index{scheme mode} -DrScheme provides support for multiple editor modes. Tools +DrRacket provides support for multiple editor modes. Tools register modes via @scheme[drracket:modes:add-mode]. Each mode is visible in the @onscreen{Modes} submenu of the @onscreen{Edit} -menu. Initially, DrScheme only supports two modes: scheme +menu. Initially, DrRacket only supports two modes: Racket mode and text mode. -DrScheme automatically selects a mode for each open +DrRacket automatically selects a mode for each open file based on the file's extension. If the file ends with -@File{.txt}, DrScheme uses text mode. Otherwise, DrScheme -uses Scheme mode. +@File{.txt}, DrRacket uses text mode. Otherwise, DrRacket +uses Racket mode. @section{Language-specific capabilities} -Drscheme's capability interface provides a mechanism for +DrRacket's capability interface provides a mechanism for tools to allow languages to hide their GUI interface, if the tool does not apply to the language. Tools register capabilities keyed with symbols via. @@ -472,17 +472,16 @@ capabilities keyed with symbols via. registered, a tool can query a language, via the @method[drracket:language:language<%> capability-value] method. The result from this method controls whether or not -the tool shows this part of the GUI for DrScheme. +the tool shows this part of the GUI for DrRacket. See @scheme[drracket:language:register-capability] for a list of the capabilities registered by default. @section{Check Syntax} -Check Syntax is a part of the DrScheme collection, but is implemented via the tools api, i.e., -not taking any advantage of +Check Syntax is a part of the DrRacket collection, but is implemented via the tools API. -@defmodule[drscheme/syncheck-drracket-button] +@defmodule[drracket/syncheck-drracket-button] @defthing[syncheck-drracket-button (list/c @@ -494,20 +493,16 @@ not taking any advantage of This is meant to be used with the @scheme['drscheme:toolbar-buttons] argument to the info proc returned from @scheme[read-language]. - } -toolbar-buttons] - argument to the info proc returned - from @scheme[read-language]. } @defidform[syncheck:button-callback]{ This is defined with @scheme[define-local-member-name] and - is bound to a method of no arguments of the DrScheme frame that runs Check + is bound to a method of no arguments of the DrRacket frame that runs Check Syntax. } @defthing[syncheck-bitmap (is-a?/c bitmap%)]{ - The bitmap in the Check Syntax button on the DrScheme frame. + The bitmap in the Check Syntax button on the DrRacket frame. } @include-section["get-slash-extend.scrbl"] diff --git a/collects/scribblings/tools/unit.scrbl b/collects/scribblings/tools/unit.scrbl index 57d70dd26c..a9583c8495 100644 --- a/collects/scribblings/tools/unit.scrbl +++ b/collects/scribblings/tools/unit.scrbl @@ -44,7 +44,7 @@ Enables the Run button, and the Run menu item and unlocks @defmethod[(get-defs) (is-a?/c drracket:unit:definitions-text<%>)]{ -This text is initially the top half of the drscheme window and +This text is initially the top half of the DrRacket window and contains the users program. This text defaults to a @scheme[text%] @@ -58,7 +58,7 @@ object, but if you change (or/c string? false/c)]{ This is the directory that the file is saved in, or the -directory DrScheme started up in, if the file has not been +directory DrRacket started up in, if the file has not been saved. @@ -80,7 +80,7 @@ Returns the frame that this tab is inside. @defmethod[(get-ints) (is-a?/c drracket:rep:text%)]{ -This text is initially the bottom half of the drscheme window and +This text is initially the bottom half of the DrRacket window and contains the users interactions with the REPL. This text defaults to a @scheme[drracket:rep:text%] @@ -100,7 +100,7 @@ Indicates if this tab is the currently active tab. boolean?]{ Indicates if the running message in the bottom right of -drscheme's frame should be ``running'' or ``not running'' +DrRacket's frame should be ``running'' or ``not running'' when this frame is active. @@ -202,7 +202,7 @@ Passes all arguments to @scheme[super-init]. @defclass[drracket:unit:frame% (drracket:frame:basics-mixin (drracket:frame:mixin frame:searchable%)) (drracket:unit:frame<%>)]{ -This frame inserts the Scheme and Language menus into the menu bar as it is initialized. +This frame inserts the @onscreen{Racket} and @onscreen{Language} menus into the menu bar as it is initialized. @@ -246,7 +246,7 @@ Breaks the user's evaluation started by the Run button void?]{ Loads this file into this already created frame. In normal -DrScheme use, this method is only called if this is the +DrRacket use, this method is only called if this is the first frame opened and no editing has occurred. It should be safe to call this at anytime, however. @@ -353,7 +353,7 @@ Returns the break button. Mostly used for test suites. @defmethod[(get-button-panel) (is-a?/c horizontal-panel%)]{ -This panel goes along the top of the drscheme window and has buttons +This panel goes along the top of the DrRacket window and has buttons for important actions the user frequently executes. A tool can add a button to this panel to make some new functionality @@ -390,7 +390,7 @@ Returns the result of @methspec{ This method is provided so that tools can add -@scheme[area-container<%>]s to the drscheme frame. Override this method so that it +@scheme[area-container<%>]s to the DrRacket frame. Override this method so that it returns a child of the super-classes's result and insert new children in between. @@ -475,7 +475,7 @@ Calls the super method. void?]{ Updates the preferences for the window width and height -so next time a drscheme window is opened, it will be this +so next time a DrRacket window is opened, it will be this width and height. @@ -518,7 +518,7 @@ This method is called by the @defmethod[(update-save-message [name string?]) void?]{ -Updates the save message on the drscheme frame. This method is called by +Updates the save message on the DrRacket frame. This method is called by the @method[drracket:unit:definitions-text% set-filename] method. @@ -540,7 +540,7 @@ items based on the contents of the windows. @defmethod[(get-language-menu) (is-a?/c menu%)]{ Returns the language-specific menu. This menu is called the - @onscreen{Scheme} menu in the Scheme language but is, in general, + @onscreen{Racket} menu in the Racket language but is, in general, controlled by the @scheme['drscheme:language-menu-title] capability (see @scheme[drracket:language:register-capability] for details on capabilities). @@ -598,7 +598,7 @@ Returns the currently active tab. (is-a?/c drracket:unit:definitions-canvas%)]{ This canvas is the canvas containing the -@method[drracket:unit:frame<%> get-definitions-text]. It is initially the top half of the drscheme window. +@method[drracket:unit:frame<%> get-definitions-text]. It is initially the top half of the DrRacket window. This canvas defaults to a @scheme[drracket:unit:definitions-canvas%] object, but if you change the @@ -629,7 +629,7 @@ Returns the Insert menu. (instanceof (derivedfrom drracket:unit:interactions-canvas%))]{ This canvas is the canvas containing the -@method[drracket:unit:frame<%> get-interactions-text]. It is initially the bottom half of the drscheme window. +@method[drracket:unit:frame<%> get-interactions-text]. It is initially the bottom half of the DrRacket window. This canvas defaults to a @scheme[drracket:unit:interactions-canvas%] object, but if you use the @@ -761,9 +761,9 @@ Called when the next settings changes. See also @defmethod[(begin-metadata-changes) void?]{ -Augment this method to be notified when DrScheme is changing +Augment this method to be notified when DrRacket is changing the buffer to insert metadata. The metadata is only inserted -during saving, so tools that track changes to DrScheme will +during saving, so tools that track changes to DrRacket will need to ignore changes that occur after this method is called, and before @method[drracket:unit:definitions-text<%> end-metadata-changes] is called. @@ -789,7 +789,7 @@ the calls cannot be nested). @defmethod[(get-next-settings) language-settings]{ This method returns the language-settings that will be used -when the user next clicks Run in this DrScheme window. +when the user next clicks Run in this DrRacket window. } @@ -822,7 +822,7 @@ source field of an exception record) matches this editor. void?]{ @methspec{ -This method, when called, puts this drscheme window in a +This method, when called, puts this DrRacket window in a state such that interactions submitted to the REPL will trigger a yellow warning message. The state is reset when the program is next Run. diff --git a/collects/string-constants/german-string-constants.rkt b/collects/string-constants/german-string-constants.rkt index 91722039c5..d4fbbd1f74 100644 --- a/collects/string-constants/german-string-constants.rkt +++ b/collects/string-constants/german-string-constants.rkt @@ -957,6 +957,13 @@ (module-language-auto-text "Automatisch Zeile mit #lang") ;; shows up in the details section of the module language + ;; for the upper portion of the language dialog + (use-language-in-source "Im Quelltext angegebene Sprache benutzen") + (choose-a-language "Sprache auswählen") + (lang-in-source-discussion + "Die Zeile mit \"#lang\" am Anfang eines Programms legt die Sprache fest. Das ist der präferierte Standard-Modus von DrRacket.") + + ;;; from the `not a language language' used initially in drscheme. (must-choose-language "DrRacket kann keine Programme verarbeiten, bis Sie eine Sprache auswählen.") @@ -970,6 +977,7 @@ (start-with-after "anfangen?") (seasoned-plt-schemer? "Erfahrener PLT-Schemer?") + (racketeer? "Sind Sie ein Racketeer?") (looking-for-standard-scheme? "Wollen Sie Standard-Scheme?") ;; the three string constants are concatenated together and the middle @@ -1091,8 +1099,8 @@ (module-browser-show-lib-paths/short "\"lib\"-requires folgen") ;; check box label in show module browser pane in drscheme window. (module-browser-show-planet-paths/short "\"PLaneT\"-requires folgen") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "Aktualisieren") ;; button label in show module browser pane in drscheme window. -; (module-browser-only-in-plt-and-module-langs -; "Der Modul-Browser ist nur für Programme in den PLT-Sprachen und in der Modul-Sprache verfügbar (und nur für Programme mit Modulen).") + (module-browser-only-in-plt-and-module-langs + "Der Modul-Browser ist nur für modulbasierte Programme verfügbar.") (module-browser-name-length "Länge der Namen") (module-browser-name-short "Kurz") (module-browser-name-medium "Mittel") diff --git a/collects/tests/drscheme/drscheme-test-util.rkt b/collects/tests/drracket/drracket-test-util.rkt similarity index 100% rename from collects/tests/drscheme/drscheme-test-util.rkt rename to collects/tests/drracket/drracket-test-util.rkt diff --git a/collects/tests/drscheme/info.rkt b/collects/tests/drracket/info.rkt similarity index 100% rename from collects/tests/drscheme/info.rkt rename to collects/tests/drracket/info.rkt diff --git a/collects/tests/drscheme/io.rkt b/collects/tests/drracket/io.rkt similarity index 99% rename from collects/tests/drscheme/io.rkt rename to collects/tests/drracket/io.rkt index 8665a42459..88ba8da5d1 100644 --- a/collects/tests/drscheme/io.rkt +++ b/collects/tests/drracket/io.rkt @@ -12,7 +12,7 @@ add this test: |# -(require "drscheme-test-util.ss" +(require "drracket-test-util.ss" tests/utils/gui mzlib/class mzlib/pretty diff --git a/collects/tests/drscheme/language-test.rkt b/collects/tests/drracket/language-test.rkt similarity index 99% rename from collects/tests/drscheme/language-test.rkt rename to collects/tests/drracket/language-test.rkt index d49c06d1de..3a3ea329c1 100644 --- a/collects/tests/drscheme/language-test.rkt +++ b/collects/tests/drracket/language-test.rkt @@ -14,7 +14,7 @@ the settings above should match r5rs |# -(require "drscheme-test-util.ss" +(require "drracket-test-util.ss" tests/utils/gui mred framework @@ -86,7 +86,7 @@ the settings above should match r5rs (test-expression "true" "#t") (test-expression "mred^" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: mred^") (test-expression "(eq? 'a 'A)" "#f") - (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined identifier: x") + (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined variable: x") (test-expression "(define qqq 2) (set! qqq 1)" "") (test-expression "(cond [(= 1 2) 3])" "") (test-expression "(cons 1 2)" "(1 . 2)") @@ -186,7 +186,7 @@ the settings above should match r5rs (test-expression "true" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: true") (test-expression "mred^" "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: mred^") (test-expression "(eq? 'a 'A)" "#t") - (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined identifier: x") + (test-expression "(set! x 1)" "{stop-multi.png} {stop-22x22.png} set!: cannot set undefined variable: x") (test-expression "(define qqq 2) (set! qqq 1)" "") (test-expression "(cond ((= 1 2) 3))" "") (test-expression "(cons 1 2)" "(1 . 2)") @@ -938,7 +938,7 @@ the settings above should match r5rs "false") (test-expression "(set! x 1)" "x: name is not defined" - "set!: cannot set identifier before its definition: x") + "set!: cannot set variable before its definition: x") (test-expression "(define qqq 2) (set! qqq 1)" "(void)" "define: cannot redefine name: qqq\n(void)") diff --git a/collects/tests/drscheme/module-lang-test-utils.rkt b/collects/tests/drracket/module-lang-test-utils.rkt similarity index 97% rename from collects/tests/drscheme/module-lang-test-utils.rkt rename to collects/tests/drracket/module-lang-test-utils.rkt index 314be3b3b5..b12b5b0f70 100644 --- a/collects/tests/drscheme/module-lang-test-utils.rkt +++ b/collects/tests/drracket/module-lang-test-utils.rkt @@ -1,5 +1,5 @@ #lang scheme/gui -(require "drscheme-test-util.ss" mzlib/etc framework scheme/string) +(require "drracket-test-util.ss" mzlib/etc framework scheme/string) (provide test t rx run-test in-here write-test-modules) @@ -184,8 +184,8 @@ (equal? (regexp-replace* #rx"[\n\t ]+" a " ") (regexp-replace* #rx"[\n\t ]+" b " "))) - (define drs/compiled/et (build-path "compiled" "drscheme" "errortrace")) - (define drs/compiled (build-path "compiled" "drscheme")) + (define drs/compiled/et (build-path "compiled" "drracket" "errortrace")) + (define drs/compiled (build-path "compiled" "drracket")) (define compiled/et (build-path "compiled" "errortrace")) (define compiled (build-path "compiled")) diff --git a/collects/tests/drscheme/module-lang-test.rkt b/collects/tests/drracket/module-lang-test.rkt similarity index 99% rename from collects/tests/drscheme/module-lang-test.rkt rename to collects/tests/drracket/module-lang-test.rkt index 7b9dc8a5ee..7de75cd9a5 100644 --- a/collects/tests/drscheme/module-lang-test.rkt +++ b/collects/tests/drracket/module-lang-test.rkt @@ -260,5 +260,5 @@ "3") -(require "drscheme-test-util.ss") +(require "drracket-test-util.ss") (fire-up-drscheme-and-run-tests run-test) diff --git a/collects/tests/drscheme/randomly-click-language-dialog.rkt b/collects/tests/drracket/randomly-click-language-dialog.rkt similarity index 100% rename from collects/tests/drscheme/randomly-click-language-dialog.rkt rename to collects/tests/drracket/randomly-click-language-dialog.rkt diff --git a/collects/tests/drscheme/randomly-click-preferences.rkt b/collects/tests/drracket/randomly-click-preferences.rkt similarity index 100% rename from collects/tests/drscheme/randomly-click-preferences.rkt rename to collects/tests/drracket/randomly-click-preferences.rkt diff --git a/collects/tests/drscheme/randomly-click.rkt b/collects/tests/drracket/randomly-click.rkt similarity index 100% rename from collects/tests/drscheme/randomly-click.rkt rename to collects/tests/drracket/randomly-click.rkt diff --git a/collects/tests/drscheme/repl-test.rkt b/collects/tests/drracket/repl-test.rkt similarity index 96% rename from collects/tests/drscheme/repl-test.rkt rename to collects/tests/drracket/repl-test.rkt index b0f424202b..ce1773ac04 100644 --- a/collects/tests/drscheme/repl-test.rkt +++ b/collects/tests/drracket/repl-test.rkt @@ -13,7 +13,7 @@ This produces an ACK message |# -(require "drscheme-test-util.ss" +(require "drracket-test-util.ss" mred framework) @@ -59,7 +59,7 @@ This produces an ACK message (string-append (regexp-quote "#; given #" "{stop-multi.png} {stop-22x22.png} repl-test-tmp3.ss:1:0: expt: expected argument of type ; given #" "expt: expected argument of type ; given #" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: expt: expected argument of type ; given #" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: expt: expected argument of type ; given #") + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: expt: expected argument of type ; given #" + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: expt: expected argument of type ; given #") 'definitions #f void @@ -507,8 +507,8 @@ This produces an ACK message "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: x" "{stop-multi.png} {stop-22x22.png} repl-test-tmp3.ss:1:4: reference to undefined identifier: x" "1\n2\nreference to undefined identifier: x" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: reference to undefined identifier: x" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: reference to undefined identifier: x") + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: reference to undefined identifier: x" + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: reference to undefined identifier: x") 'definitions #f void @@ -620,8 +620,8 @@ This produces an ACK message "{stop-multi.png} {stop-22x22.png} expt: expected argument of type ; given #f\n15" "{stop-multi.png} {stop-22x22.png} repl-test-tmp3.ss:5:19: expt: expected argument of type ; given #f\n15" "expt: expected argument of type ; given #f\n15" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: expt: expected argument of type ; given #f\n15" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: expt: expected argument of type ; given #f\n15") + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: expt: expected argument of type ; given #f\n15" + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: expt: expected argument of type ; given #f\n15") 'definitions #f void @@ -719,8 +719,8 @@ This produces an ACK message "{stop-multi.png} {stop-22x22.png} expt: expected argument of type ; given #f" "{stop-multi.png} {stop-22x22.png} repl-test-tmp3.ss:6:15: expt: expected argument of type ; given #f" "expt: expected argument of type ; given #f" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: expt: expected argument of type ; given #f" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: expt: expected argument of type ; given #f") + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: expt: expected argument of type ; given #f" + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: expt: expected argument of type ; given #f") 'definitions #f void @@ -796,8 +796,8 @@ This produces an ACK message "{stop-multi.png} {stop-22x22.png} procedure application: expected procedure, given: 3; arguments were: 3" "{stop-multi.png} {stop-22x22.png} repl-test-tmp3.ss:3:13: procedure application: expected procedure, given: 3; arguments were: 3" "procedure application: expected procedure, given: 3; arguments were: 3" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: procedure application: expected procedure, given: 3; arguments were: 3" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: procedure application: expected procedure, given: 3; arguments were: 3") + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: procedure application: expected procedure, given: 3; arguments were: 3" + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: procedure application: expected procedure, given: 3; arguments were: 3") 'definitions #f void @@ -898,8 +898,8 @@ This produces an ACK message "{stop-multi.png} {stop-22x22.png} reference to undefined identifier: xx" "{stop-multi.png} {stop-22x22.png} repl-test-tmp3.ss:1:0: reference to undefined identifier: xx" "reference to undefined identifier: xx" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: reference to undefined identifier: xx" - #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.ss:[0-9]+:[0-9]+: reference to undefined identifier: xx") + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx" + #rx"{stop-multi.png} {stop-22x22.png} .*mred/private/snipfile.rkt:[0-9]+:[0-9]+: reference to undefined identifier: xx") 'definitions #f void @@ -1088,7 +1088,7 @@ This produces an ACK message #; (normal-case-path (normalize-path - (collection-path "tests" "drscheme")))) + (collection-path "tests" "drracket")))) (define tmp-load-short-filename "repl-test-tmp.ss") (define tmp-load-filename (build-path tmp-load-directory tmp-load-short-filename)) @@ -1361,7 +1361,7 @@ This produces an ACK message (next-test) (clear-definitions drscheme-frame) (do-execute drscheme-frame) - (test:menu-select "Scheme" kill-menu-item) + (test:menu-select "Racket" kill-menu-item) (let ([win (wait-for-new-frame drscheme-frame)]) (test:button-push "OK") (let ([drs2 (wait-for-new-frame win)]) @@ -1385,7 +1385,7 @@ This produces an ACK message "(define (f) (queue-callback f) (error 'ouch)) (f)") (do-execute drscheme-frame #f) (sleep 1/2) - (test:menu-select "Scheme" kill-menu-item) + (test:menu-select "Racket" kill-menu-item) (let ([win (wait-for-new-frame drscheme-frame null 360)]) (test:button-push "OK") (let ([drs2 (wait-for-new-frame win)]) diff --git a/collects/tests/drscheme/run.sh b/collects/tests/drracket/run.sh similarity index 100% rename from collects/tests/drscheme/run.sh rename to collects/tests/drracket/run.sh diff --git a/collects/tests/drscheme/sample-solutions-one-window.rkt b/collects/tests/drracket/sample-solutions-one-window.rkt similarity index 99% rename from collects/tests/drscheme/sample-solutions-one-window.rkt rename to collects/tests/drracket/sample-solutions-one-window.rkt index 19aebc9283..7ef39b7465 100644 --- a/collects/tests/drscheme/sample-solutions-one-window.rkt +++ b/collects/tests/drracket/sample-solutions-one-window.rkt @@ -1,6 +1,6 @@ (module sample-solutions-one-window mzscheme - (require "drscheme-test-util.ss" + (require "drracket-test-util.ss" tests/utils/gui mzlib/class mzlib/list @@ -29,7 +29,7 @@ (define ((test-single-file labels sample-solutions-dir toc) filename) (let* ([sample-solutions-teachpack-filename - (build-path (collection-path "tests" "drscheme") "sample-solutions-testsuite-tp.scm")] + (build-path (collection-path "tests" "drracket") "sample-solutions-testsuite-tp.scm")] [toc-entry (let ([lookup (assoc (string->symbol filename) toc)]) (if lookup (cdr lookup) diff --git a/collects/tests/drscheme/sample-solutions-testsuite-tp.scm b/collects/tests/drracket/sample-solutions-testsuite-tp.scm similarity index 100% rename from collects/tests/drscheme/sample-solutions-testsuite-tp.scm rename to collects/tests/drracket/sample-solutions-testsuite-tp.scm diff --git a/collects/tests/drscheme/save-teaching-lang-file.rkt b/collects/tests/drracket/save-teaching-lang-file.rkt similarity index 97% rename from collects/tests/drscheme/save-teaching-lang-file.rkt rename to collects/tests/drracket/save-teaching-lang-file.rkt index 65690a2ec8..d36d1b0f54 100644 --- a/collects/tests/drscheme/save-teaching-lang-file.rkt +++ b/collects/tests/drracket/save-teaching-lang-file.rkt @@ -5,7 +5,7 @@ framework/test framework/preferences) -(require tests/drscheme/drscheme-test-util) +(require tests/drracket/drracket-test-util) (fire-up-drscheme-and-run-tests (λ () diff --git a/collects/tests/drscheme/stepper-test.rkt b/collects/tests/drracket/stepper-test.rkt similarity index 99% rename from collects/tests/drscheme/stepper-test.rkt rename to collects/tests/drracket/stepper-test.rkt index 7a80f1aeda..fed2e55420 100644 --- a/collects/tests/drscheme/stepper-test.rkt +++ b/collects/tests/drracket/stepper-test.rkt @@ -2,7 +2,7 @@ (module stepper-test mzscheme (require mred mzlib/class - "drscheme-test-util.ss" + "drracket-test-util.ss" tests/utils/gui framework mzlib/pretty) diff --git a/collects/tests/drscheme/syncheck-test.rkt b/collects/tests/drracket/syncheck-test.rkt similarity index 99% rename from collects/tests/drscheme/syncheck-test.rkt rename to collects/tests/drracket/syncheck-test.rkt index 82b016b909..51387918c3 100644 --- a/collects/tests/drscheme/syncheck-test.rkt +++ b/collects/tests/drracket/syncheck-test.rkt @@ -7,7 +7,7 @@ trigger runtime errors in check syntax. |# #lang scheme/base - (require "drscheme-test-util.ss" + (require "drracket-test-util.ss" string-constants/string-constant tests/utils/gui scheme/path diff --git a/collects/tests/drscheme/teachpack.rkt b/collects/tests/drracket/teachpack.rkt similarity index 97% rename from collects/tests/drscheme/teachpack.rkt rename to collects/tests/drracket/teachpack.rkt index 57417db162..2bbf8a22b1 100644 --- a/collects/tests/drscheme/teachpack.rkt +++ b/collects/tests/drracket/teachpack.rkt @@ -1,6 +1,6 @@ #lang scheme/base -(require "drscheme-test-util.ss" +(require "drracket-test-util.ss" scheme/class scheme/path scheme/gui/base @@ -21,7 +21,7 @@ (let ([tp-names (let ([teachpack-path (normal-case-path (normalize-path - (collection-path "tests" "drscheme")))]) + (collection-path "tests" "drracket")))]) (let loop ([tp-exps tp-exps] [n 0]) (cond @@ -63,7 +63,7 @@ (let ([tp-name (normal-case-path (normalize-path (build-path - (collection-path "tests" "drscheme") + (collection-path "tests" "drracket") "teachpack-tmp.ss")))]) (call-with-output-file tp-name (lambda (port) (display tp-exp port)) @@ -93,7 +93,7 @@ (let ([tp-name (normal-case-path (normalize-path (build-path - (collection-path "tests" "drscheme") + (collection-path "tests" "drracket") "teachpack-tmp.ss")))]) (call-with-output-file tp-name (lambda (port) (display tp-exp port)) diff --git a/collects/tests/drscheme/time-keystrokes.rkt b/collects/tests/drracket/time-keystrokes.rkt similarity index 100% rename from collects/tests/drscheme/time-keystrokes.rkt rename to collects/tests/drracket/time-keystrokes.rkt diff --git a/collects/tests/file/gzip.rkt b/collects/tests/file/gzip.rkt index 7f42c43549..412c8d691d 100644 --- a/collects/tests/file/gzip.rkt +++ b/collects/tests/file/gzip.rkt @@ -23,7 +23,7 @@ (define (test-big-file) (define big-file - (build-path (collection-path "drscheme/private") "unit.rkt")) + (build-path (collection-path "drracket/private") "unit.rkt")) ;; should be around 6 times smaller (id* (file->bytes big-file) 4)) diff --git a/collects/tests/framework/main.rkt b/collects/tests/framework/main.rkt index 0f6c45696b..d94f3a78dc 100644 --- a/collects/tests/framework/main.rkt +++ b/collects/tests/framework/main.rkt @@ -91,15 +91,13 @@ (reset-section-jump!))))) files-to-process) -(debug-printf admin " restoring preferences file ~s to ~s\n" - old-preferences-file preferences-file) -(when (file-exists? preferences-file) - (unless (file-exists? old-preferences-file) - (error 'framework-test "lost preferences file backup!")) +(when (file-exists? old-preferences-file) + (debug-printf admin " restoring preferences file ~s to ~s\n" + old-preferences-file preferences-file) (delete-file preferences-file) (copy-file old-preferences-file preferences-file) - (delete-file old-preferences-file)) -(debug-printf admin " restored preferences file\n") + (delete-file old-preferences-file) + (debug-printf admin " restored preferences file\n")) (shutdown-listener) diff --git a/collects/tests/info.rkt b/collects/tests/info.rkt index a7377f7216..53afb981fa 100644 --- a/collects/tests/info.rkt +++ b/collects/tests/info.rkt @@ -1,7 +1,7 @@ #lang setup/infotab (define name "Test Suites") -(define tools '(("time-keystrokes.ss" "drscheme"))) +(define tools '(("time-keystrokes.ss" "drracket"))) (define tool-names '("Time Keystrokes")) (define compile-omit-paths diff --git a/collects/typed-scheme/scribblings/begin.scrbl b/collects/typed-scheme/scribblings/begin.scrbl index 011f28aad1..b000ef32a9 100644 --- a/collects/typed-scheme/scribblings/begin.scrbl +++ b/collects/typed-scheme/scribblings/begin.scrbl @@ -1,12 +1,12 @@ #lang scribble/manual -@begin[(require (for-label (only-meta-in 0 typed/scheme)) scribble/eval +@begin[(require (for-label (only-meta-in 0 typed/racket)) scribble/eval "utils.ss" (only-in "quick.scrbl" typed-mod))] @(define the-eval (make-base-eval)) -@(the-eval '(require typed/scheme)) +@(the-eval '(require typed/racket)) -@title[#:tag "beginning"]{Beginning Typed Scheme} +@title[#:tag "beginning"]{Beginning Typed Racket} Recall the typed module from @secref["quick"]: @@ -14,62 +14,62 @@ Recall the typed module from @secref["quick"]: Let us consider each element of this program in turn. -@schememod[typed/scheme] +@racketmod[typed/racket] This specifies that the module is written in the -@schememodname[typed/scheme] language, which is a typed version of the -@schememodname[scheme] language. Typed versions of other languages +@racketmodname[typed/racket] language, which is a typed version of the +@racketmodname[racket] language. Typed versions of other languages are provided as well; for example, the -@schememodname[typed/scheme/base] language corresponds to -@schememodname[scheme/base]. +@racketmodname[typed/racket/base] language corresponds to +@racketmodname[racket/base]. -@schemeblock[(define-struct: pt ([x : Real] [y : Real]))] +@racketblock[(define-struct: pt ([x : Real] [y : Real]))] -@margin-note{Many forms in Typed Scheme have the same name as the -untyped forms, with a @scheme[:] suffix.} -This defines a new structure, name @scheme[pt], with two fields, -@scheme[x] and @scheme[y]. Both fields are specified to have the type -@scheme[Real], which corresponds to the @rtech{real numbers}. +@margin-note{Many forms in Typed Racket have the same name as the +untyped forms, with a @racket[:] suffix.} +This defines a new structure, name @racket[pt], with two fields, +@racket[x] and @racket[y]. Both fields are specified to have the type +@racket[Real], which corresponds to the @rtech{real numbers}. The -@scheme[define-struct:] form corresponds to the @scheme[define-struct] -form from @schememodname[scheme]---when porting a program from -@schememodname[scheme] to @schememodname[typed/scheme], uses of -@scheme[define-struct] should be changed to @scheme[define-struct:]. +@racket[define-struct:] form corresponds to the @racket[define-struct] +form from @racketmodname[racket]---when porting a program from +@racketmodname[racket] to @racketmodname[typed/racket], uses of +@racket[define-struct] should be changed to @racket[define-struct:]. -@schemeblock[(: mag (pt -> Number))] +@racketblock[(: mag (pt -> Number))] -This declares that @scheme[mag] has the type @scheme[(pt -> Number)]. -@;{@scheme[mag] must be defined at the top-level of the module containing +This declares that @racket[mag] has the type @racket[(pt -> Number)]. +@;{@racket[mag] must be defined at the top-level of the module containing the declaration.} -The type @scheme[(pt -> Number)] is a function type, that is, the type +The type @racket[(pt -> Number)] is a function type, that is, the type of a procedure. The input type, or domain, is a single argument of -type @scheme[pt], which refers to an instance of the @scheme[pt] -structure. The @scheme[->] both indicates that this is a function +type @racket[pt], which refers to an instance of the @racket[pt] +structure. The @racket[->] both indicates that this is a function type and separates the domain from the range, or output type, in this -case @scheme[Number]. +case @racket[Number]. -@schemeblock[ +@racketblock[ (define (mag p) (sqrt (+ (sqr (pt-x p)) (sqr (pt-y p))))) ] This definition is unchanged from the untyped version of the code. -The goal of Typed Scheme is to allow almost all definitions to be +The goal of Typed Racket is to allow almost all definitions to be typechecked without change. The typechecker verifies that the body of -the function has the type @scheme[Real], under the assumption that -@scheme[p] has the type @scheme[pt], taking these types from the +the function has the type @racket[Real], under the assumption that +@racket[p] has the type @racket[pt], taking these types from the earlier type declaration. Since the body does have this type, the program is accepted. @section{Datatypes and Unions} -Many data structures involve multiple variants. In Typed Scheme, we -represent these using @italic{union types}, written @scheme[(U t1 t2 ...)]. +Many data structures involve multiple variants. In Typed Racket, we +represent these using @italic{union types}, written @racket[(U t1 t2 ...)]. -@schememod[ -typed/scheme +@racketmod[ +typed/racket (define-type Tree (U leaf node)) (define-struct: leaf ([val : Number])) (define-struct: node ([left : Tree] [right : Tree])) @@ -87,36 +87,36 @@ typed/scheme (tree-sum (node-right t)))])) ] -In this module, we have defined two new datatypes: @scheme[leaf] and -@scheme[node]. We've also defined the type name @scheme[Tree] to be -@scheme[(U node leaf)], which represents a binary tree of numbers. In -essence, we are saying that the @scheme[tree-height] function accepts -a @scheme[Tree], which is either a @scheme[node] or a @scheme[leaf], +In this module, we have defined two new datatypes: @racket[leaf] and +@racket[node]. We've also defined the type name @racket[Tree] to be +@racket[(U node leaf)], which represents a binary tree of numbers. In +essence, we are saying that the @racket[tree-height] function accepts +a @racket[Tree], which is either a @racket[node] or a @racket[leaf], and produces a number. In order to calculate interesting facts about trees, we have to take them apart and get at their contents. But since accessors such as -@scheme[node-left] require a @scheme[node] as input, not a -@scheme[Tree], we have to determine which kind of input we +@racket[node-left] require a @racket[node] as input, not a +@racket[Tree], we have to determine which kind of input we were passed. For this purpose, we use the predicates that come with each defined -structure. For example, the @scheme[leaf?] predicate distinguishes -@scheme[leaf]s from all other Typed Scheme values. Therefore, in the -first branch of the @scheme[cond] clause in @scheme[tree-sum], we know -that @scheme[t] is a @scheme[leaf], and therefore we can get its value -with the @scheme[leaf-val] function. +structure. For example, the @racket[leaf?] predicate distinguishes +@racket[leaf]s from all other Typed Racket values. Therefore, in the +first branch of the @racket[cond] clause in @racket[tree-sum], we know +that @racket[t] is a @racket[leaf], and therefore we can get its value +with the @racket[leaf-val] function. -In the else clauses of both functions, we know that @scheme[t] is not -a @scheme[leaf], and since the type of @scheme[t] was @scheme[Tree] by -process of elimination we can determine that @scheme[t] must be a -@scheme[node]. Therefore, we can use accessors such as -@scheme[node-left] and @scheme[node-right] with @scheme[t] as input. +In the else clauses of both functions, we know that @racket[t] is not +a @racket[leaf], and since the type of @racket[t] was @racket[Tree] by +process of elimination we can determine that @racket[t] must be a +@racket[node]. Therefore, we can use accessors such as +@racket[node-left] and @racket[node-right] with @racket[t] as input. @section{Type Errors} -When Typed Scheme detects a type error in the module, it raises an +When Typed Racket detects a type error in the module, it raises an error before running the program. @examples[#:eval the-eval @@ -124,7 +124,7 @@ error before running the program. ] @;{ -Typed Scheme also attempts to detect more than one error in the module. +Typed Racket also attempts to detect more than one error in the module. @examples[#:eval the-eval (string-append "a string" (add1 "not a number")) diff --git a/collects/typed-scheme/scribblings/more.scrbl b/collects/typed-scheme/scribblings/more.scrbl index 77eebf1c4b..7ec1958f56 100644 --- a/collects/typed-scheme/scribblings/more.scrbl +++ b/collects/typed-scheme/scribblings/more.scrbl @@ -2,109 +2,109 @@ @begin[(require "utils.ss" scribble/core scribble/eval - (for-label (only-meta-in 0 typed/scheme) mzlib/etc))] + (for-label (only-meta-in 0 typed/racket) mzlib/etc))] @title[#:tag "more"]{Specifying Types} @(define the-eval (make-base-eval)) -@(the-eval '(require typed/scheme)) +@(the-eval '(require typed/racket)) -The previous section introduced the basics of the Typed Scheme type +The previous section introduced the basics of the Typed Racket type system. In this section, we will see several new features of the language, allowing types to be specified and used. @section{Type Annotation and Binding Forms} -In general, variables in Typed Scheme must be annotated with their +In general, variables in Typed Racket must be annotated with their type. @subsection{Annotating Definitions} -We have already seen the @scheme[:] type annotation form. This is +We have already seen the @racket[:] type annotation form. This is useful for definitions, at both the top level of a module -@schemeblock[ +@racketblock[ (: x Number) (define x 7)] and in an internal definition -@schemeblock[ +@racketblock[ (let () (: x Number) (define x 7) (add1 x)) ] -In addition to the @scheme[:] form, almost all binding forms from -@schememodname[scheme] have counterparts which allow the specification -of types. The @scheme[define:] form allows the definition of variables +In addition to the @racket[:] form, almost all binding forms from +@racketmodname[racket] have counterparts which allow the specification +of types. The @racket[define:] form allows the definition of variables in both top-level and internal contexts. -@schemeblock[ +@racketblock[ (define: x : Number 7) (define: (id [z : Number]) z)] -Here, @scheme[x] has the type @scheme[Number], and @scheme[id] has the -type @scheme[(Number -> Number)]. In the body of @scheme[id], -@scheme[z] has the type @scheme[Number]. +Here, @racket[x] has the type @racket[Number], and @racket[id] has the +type @racket[(Number -> Number)]. In the body of @racket[id], +@racket[z] has the type @racket[Number]. @subsection{Annotating Local Binding} -@schemeblock[ +@racketblock[ (let: ([x : Number 7]) (add1 x)) ] -The @scheme[let:] form is exactly like @scheme[let], but type -annotations are provided for each variable bound. Here, @scheme[x] is -given the type @scheme[Number]. The @scheme[let*:] and -@scheme[letrec:] are similar. +The @racket[let:] form is exactly like @racket[let], but type +annotations are provided for each variable bound. Here, @racket[x] is +given the type @racket[Number]. The @racket[let*:] and +@racket[letrec:] are similar. -@schemeblock[ +@racketblock[ (let-values: ([([x : Number] [y : String]) (values 7 "hello")]) (+ x (string-length y))) ] -The @scheme[let*-values:] and @scheme[letrec-values:] forms are similar. +The @racket[let*-values:] and @racket[letrec-values:] forms are similar. @subsection{Annotating Functions} Function expressions also bind variables, which can be annotated with -types. This function expects two arguments, a @scheme[Number] and a -@scheme[String]: +types. This function expects two arguments, a @racket[Number] and a +@racket[String]: -@schemeblock[(lambda: ([x : Number] [y : String]) (+ x 5))] +@racketblock[(lambda: ([x : Number] [y : String]) (+ x 5))] -This function accepts at least one @scheme[String], followed by -arbitrarily many @scheme[Number]s. In the body, @scheme[y] is a list -of @scheme[Number]s. +This function accepts at least one @racket[String], followed by +arbitrarily many @racket[Number]s. In the body, @racket[y] is a list +of @racket[Number]s. -@schemeblock[(lambda: ([x : String] (unsyntax @tt["."]) [y : Number #,**]) (apply + y))] +@racketblock[(lambda: ([x : String] (unsyntax @tt["."]) [y : Number #,**]) (apply + y))] -This function has the type @scheme[(String Number #,** -> Number)]. +This function has the type @racket[(String Number #,** -> Number)]. Functions defined by cases may also be annotated: -@schemeblock[(case-lambda: [() 0] +@racketblock[(case-lambda: [() 0] [([x : Number]) x])] This function has the type -@scheme[(case-lambda (-> Number) (Number -> Number))]. +@racket[(case-lambda (-> Number) (Number -> Number))]. @subsection{Annotating Single Variables} When a single variable binding needs annotation, the annotation can be applied to a single variable using a reader extension: -@schemeblock[ +@racketblock[ (let ([#,(annvar x Number) 7]) (add1 x))] -This is equivalent to the earlier use of @scheme[let:]. This is +This is equivalent to the earlier use of @racket[let:]. This is especially useful for binding forms which do not have counterparts -provided by Typed Scheme, such as @scheme[let+]: +provided by Typed Racket, such as @racket[let+]: -@schemeblock[ +@racketblock[ (let+ ([val #,(annvar x Number) (+ 6 1)]) (* x x))] @@ -113,10 +113,10 @@ provided by Typed Scheme, such as @scheme[let+]: It is also possible to provide an expected type for a particular expression. -@schemeblock[(ann (+ 7 1) Number)] +@racketblock[(ann (+ 7 1) Number)] -This ensures that the expression, here @scheme[(+ 7 1)], has the -desired type, here @scheme[Number]. Otherwise, the type checker +This ensures that the expression, here @racket[(+ 7 1)], has the +desired type, here @racket[Number]. Otherwise, the type checker signals an error. For example: @interaction[#:eval the-eval @@ -124,37 +124,37 @@ signals an error. For example: @section{Type Inference} -In many cases, type annotations can be avoided where Typed Scheme can +In many cases, type annotations can be avoided where Typed Racket can infer them. For example, the types of all local bindings using -@scheme[let] and @scheme[let*] can be inferred. +@racket[let] and @racket[let*] can be inferred. -@schemeblock[(let ([x 7]) (add1 x))] +@racketblock[(let ([x 7]) (add1 x))] -In this example, @scheme[x] has the type -@scheme[Exact-Positive-Integer]. +In this example, @racket[x] has the type +@racket[Exact-Positive-Integer]. Similarly, top-level constant definitions do not require annotation: -@schemeblock[(define y "foo")] +@racketblock[(define y "foo")] -In this examples, @scheme[y] has the type @scheme[String]. +In this examples, @racket[y] has the type @racket[String]. Finally, the parameter types for loops are inferred from their initial values. -@schemeblock[ +@racketblock[ (let loop ([x 0] [y (list 1 2 3)]) (if (null? y) x (loop (+ x (car y)) (cdr y))))] -Here @scheme[x] has the inferred type @scheme[Integer], and @scheme[y] -has the inferred type @scheme[(Listof Integer)]. The @scheme[loop] -variable has type @scheme[(Integer (Listof Integer) -> Integer)]. +Here @racket[x] has the inferred type @racket[Integer], and @racket[y] +has the inferred type @racket[(Listof Integer)]. The @racket[loop] +variable has type @racket[(Integer (Listof Integer) -> Integer)]. @section{New Type Names} -Any type can be given a name with @scheme[define-type]. +Any type can be given a name with @racket[define-type]. -@schemeblock[(define-type NN (Number -> Number))] +@racketblock[(define-type NN (Number -> Number))] -Anywhere the name @scheme[NN] is used, it is expanded to -@scheme[(Number -> Number)]. Type names may not be recursive. \ No newline at end of file +Anywhere the name @racket[NN] is used, it is expanded to +@racket[(Number -> Number)]. Type names may not be recursive. \ No newline at end of file diff --git a/collects/typed-scheme/scribblings/quick.scrbl b/collects/typed-scheme/scribblings/quick.scrbl index b0b7c25c5e..b71aed5287 100644 --- a/collects/typed-scheme/scribblings/quick.scrbl +++ b/collects/typed-scheme/scribblings/quick.scrbl @@ -1,18 +1,18 @@ #lang scribble/manual -@(require "utils.ss" (for-label (only-meta-in 0 typed/scheme))) +@(require "utils.ss" (for-label (only-meta-in 0 typed/racket))) @(provide typed-mod) @title[#:tag "quick"]{Quick Start} -Given a module written in the @schememodname[scheme] language, using -Typed Scheme requires the following steps: +Given a module written in the @racketmodname[racket] language, using +Typed Racket requires the following steps: @itemize[#:style 'ordered - @item{Change the language to @schememodname[typed/scheme].} - @item{Change the uses of @scheme[(require mod)] to - @scheme[(require typed/mod)].} + @item{Change the language to @racketmodname[typed/racket].} + @item{Change the uses of @racket[(require mod)] to + @racket[(require typed/mod)].} @item{Annotate structure definitions and top-level definitions with their types.} ] @@ -20,12 +20,12 @@ Then, when the program is run, it will automatically be typechecked before any execution, and any type errors will be reported. If there are any type errors, the program will not run. -Here is an example program, written in the @schememodname[scheme] +Here is an example program, written in the @racketmodname[racket] language: @(define typed-mod -@schememod[ -typed/scheme +@racketmod[ +typed/racket (define-struct: pt ([x : Real] [y : Real])) (: mag (pt -> Number)) @@ -34,8 +34,8 @@ typed/scheme ] ) -@schememod[ -scheme +@racketmod[ +racket (define-struct pt (x y)) (code:contract mag : pt -> number) @@ -43,6 +43,6 @@ scheme (sqrt (+ (sqr (pt-x p)) (sqr (pt-y p))))) ] -Here is the same program, in @schememodname[typed/scheme]: +Here is the same program, in @racketmodname[typed/racket]: @|typed-mod| diff --git a/collects/typed-scheme/scribblings/ts-guide.scrbl b/collects/typed-scheme/scribblings/ts-guide.scrbl index 0d69e20ced..6268877706 100644 --- a/collects/typed-scheme/scribblings/ts-guide.scrbl +++ b/collects/typed-scheme/scribblings/ts-guide.scrbl @@ -1,17 +1,17 @@ #lang scribble/manual -@begin[(require "utils.ss" (for-label (only-meta-in 0 typed/scheme)))] +@begin[(require "utils.ss" (for-label (only-meta-in 0 typed/racket)))] -@title[#:tag "top"]{@bold{Typed Scheme}: Scheme with Static Types} +@title[#:tag "top"]{@bold{Typed Racket}: Racket with Static Types} @author["Sam Tobin-Hochstadt"] @section-index["typechecking" "typechecker" "typecheck"] -Typed Scheme is a family of languages, each of which enforce +Typed Racket is a family of languages, each of which enforce that programs written in the language obey a type system that ensures the absence of many common errors. This guide is intended for programmers familiar -with PLT Scheme. For an introduction to PLT Scheme, see the @(other-manual '(lib "scribblings/guide/guide.scrbl")). +with Racket. For an introduction to Racket, see the @(other-manual '(lib "scribblings/guide/guide.scrbl")). @local-table-of-contents[] @@ -22,278 +22,4 @@ with PLT Scheme. For an introduction to PLT Scheme, see the @(other-manual '(li @;@section{How the Type System Works} -@;@section{Integrating with Untyped Code} - -@;{ -@section{Starting with Typed Scheme} - -If you already know PLT Scheme, or even some other Scheme, it should be -easy to start using Typed Scheme. - -@subsection{A First Function} - -The following program defines the Fibonacci function in PLT Scheme: - -@schememod[ -scheme -(define (fib n) - (cond [(= 0 n) 1] - [(= 1 n) 1] - [else (+ (fib (- n 1)) (fib (- n 2)))])) -] - -This program defines the same program using Typed Scheme. - -@schememod[ -typed-scheme -(: fib (Number -> Number)) -(define (fib n) - (cond [(= 0 n) 1] - [(= 1 n) 1] - [else (+ (fib (- n 1)) (fib (- n 2)))])) -] - -There are two differences between these programs: - -@itemize[ - @item*[@elem{The Language}]{@schememodname[scheme] has been replaced by @schememodname[typed-scheme].} - - @item*[@elem{The Type Annotation}]{We have added a type annotation -for the @scheme[fib] function, using the @scheme[:] form.} ] - -In general, these are most of the changes that have to be made to a -PLT Scheme program to transform it into a Typed Scheme program. -@margin-note{Changes to uses of @scheme[require] may also be necessary -- these are described later.} - -@subsection[#:tag "complex"]{Adding more complexity} - -Other typed binding forms are also available. For example, we could have -rewritten our fibonacci program as follows: - -@schememod[ -typed-scheme -(: fib (Number -> Number)) -(define (fib n) - (let ([base? (or (= 0 n) (= 1 n))]) - (if base? - 1 - (+ (fib (- n 1)) (fib (- n 2)))))) -] - -This program uses the @scheme[let] binding form, but no new type -annotations are required. Typed Scheme infers the type of -@scheme[base?]. - -We can also define mutually-recursive functions: - -@schememod[ -typed-scheme -(: my-odd? (Number -> Boolean)) -(define (my-odd? n) - (if (= 0 n) #f - (my-even? (- n 1)))) - -(: my-even? (Number -> Boolean)) -(define (my-even? n) - (if (= 0 n) #t - (my-odd? (- n 1)))) - -(my-even? 12) -] - -As expected, this program prints @schemeresult[#t]. - - -@subsection{Defining New Datatypes} - -If our program requires anything more than atomic data, we must define -new datatypes. In Typed Scheme, structures can be defined, similarly -to PLT Scheme structures. The following program defines a date -structure and a function that formats a date as a string, using PLT -Scheme's built-in @scheme[format] function. - -@schememod[ -typed-scheme -(define-struct: Date ([day : Number] [month : String] [year : Number])) - -(: format-date (Date -> String)) -(define (format-date d) - (format "Today is day ~a of ~a in the year ~a" - (Date-day d) (Date-month d) (Date-year d))) - -(format-date (make-Date 28 "November" 2006)) -] - -Here we see the built-in type @scheme[String] as well as a definition -of the new user-defined type @scheme[Date]. To define -@scheme[Date], we provide all the information usually found in a -@scheme[define-struct], but added type annotations to the fields using -the @scheme[define-struct:] form. -Then we can use the functions that this declaration creates, just as -we would have with @scheme[define-struct]. - - -@subsection{Recursive Datatypes and Unions} - -Many data structures involve multiple variants. In Typed Scheme, we -represent these using @italic{union types}, written @scheme[(U t1 t2 ...)]. - -@schememod[ -typed-scheme -(define-type Tree (U leaf node)) -(define-struct: leaf ([val : Number])) -(define-struct: node ([left : Tree] [right : Tree])) - -(: tree-height (Tree -> Number)) -(define (tree-height t) - (cond [(leaf? t) 1] - [else (max (+ 1 (tree-height (node-left t))) - (+ 1 (tree-height (node-right t))))])) - -(: tree-sum (Tree -> Number)) -(define (tree-sum t) - (cond [(leaf? t) (leaf-val t)] - [else (+ (tree-sum (node-left t)) - (tree-sum (node-right t)))])) -] - -In this module, we have defined two new datatypes: @scheme[leaf] and -@scheme[node]. We've also defined the type name @scheme[Tree] to be -@scheme[(U node leaf)], which represents a binary tree of numbers. In -essence, we are saying that the @scheme[tree-height] function accepts -a @scheme[Tree], which is either a @scheme[node] or a @scheme[leaf], -and produces a number. - -In order to calculate interesting facts about trees, we have to take -them apart and get at their contents. But since accessors such as -@scheme[node-left] require a @scheme[node] as input, not a -@scheme[Tree], we have to determine which kind of input we -were passed. - -For this purpose, we use the predicates that come with each defined -structure. For example, the @scheme[leaf?] predicate distinguishes -@scheme[leaf]s from all other Typed Scheme values. Therefore, in the -first branch of the @scheme[cond] clause in @scheme[tree-sum], we know -that @scheme[t] is a @scheme[leaf], and therefore we can get its value -with the @scheme[leaf-val] function. - -In the else clauses of both functions, we know that @scheme[t] is not -a @scheme[leaf], and since the type of @scheme[t] was @scheme[Tree] by -process of elimination we can determine that @scheme[t] must be a -@scheme[node]. Therefore, we can use accessors such as -@scheme[node-left] and @scheme[node-right] with @scheme[t] as input. - -@section[#:tag "poly"]{Polymorphism} - -Typed Scheme offers abstraction over types as well as values. - -@subsection{Polymorphic Data Structures} - -Virtually every Scheme program uses lists and sexpressions. Fortunately, Typed -Scheme can handle these as well. A simple list processing program can be -written like this: - -@schememod[ -typed-scheme -(: sum-list ((Listof Number) -> Number)) -(define (sum-list l) - (cond [(null? l) 0] - [else (+ (car l) (sum-list (cdr l)))])) -] - -This looks similar to our earlier programs --- except for the type -of @scheme[l], which looks like a function application. In fact, it's -a use of the @italic{type constructor} @scheme[Listof], which takes -another type as its input, here @scheme[Number]. We can use -@scheme[Listof] to construct the type of any kind of list we might -want. - -We can define our own type constructors as well. For example, here is -an analog of the @tt{Maybe} type constructor from Haskell: - -@schememod[ -typed-scheme -(define-struct: Nothing ()) -(define-struct: (a) Just ([v : a])) - -(define-type (Maybe a) (U Nothing (Just a))) - -(: find (Number (Listof Number) -> (Maybe Number))) -(define (find v l) - (cond [(null? l) (make-Nothing)] - [(= v (car l)) (make-Just v)] - [else (find v (cdr l))])) -] - -The first @scheme[define-struct:] defines @scheme[Nothing] to be -a structure with no contents. - -The second definition - -@schemeblock[ -(define-struct: (a) Just ([v : a])) -] - -creates a parameterized type, @scheme[Just], which is a structure with -one element, whose type is that of the type argument to -@scheme[Just]. Here the type parameters (only one, @scheme[a], in -this case) are written before the type name, and can be referred to in -the types of the fields. - -The type definiton -@schemeblock[ - (define-type (Maybe a) (U Nothing (Just a))) -] -creates a parameterized type --- @scheme[Maybe] is a potential -container for whatever type is supplied. - -The @scheme[find] function takes a number @scheme[v] and list, and -produces @scheme[(make-Just v)] when the number is found in the list, -and @scheme[(make-Nothing)] otherwise. Therefore, it produces a -@scheme[(Maybe Number)], just as the annotation specified. - -@subsection{Polymorphic Functions} - -Sometimes functions over polymorphic data structures only concern -themselves with the form of the structure. For example, one might -write a function that takes the length of a list of numbers: - -@schememod[ -typed-scheme -(: list-number-length ((Listof Number) -> Integer)) -(define (list-number-length l) - (if (null? l) - 0 - (add1 (list-number-length (cdr l)))))] - -and also a function that takes the length of a list of strings: - -@schememod[ -typed-scheme -(: list-string-length ((Listof String) -> Integer)) -(define (list-string-length l) - (if (null? l) - 0 - (add1 (list-string-length (cdr l)))))] - -Notice that both of these functions have almost exactly the same -definition; the only difference is the name of the function. This -is because neither function uses the type of the elements in the -definition. - -We can abstract over the type of the element as follows: - -@schememod[ -typed-scheme -(: list-length (All (A) ((Listof A) -> Integer))) -(define (list-length l) - (if (null? l) - 0 - (add1 (list-length (cdr l)))))] - -The new type constructor @scheme[All] takes a list of type -variables and a body type. The type variables are allowed to -appear free in the body of the @scheme[All] form. - -} \ No newline at end of file +@;@section{Integrating with Untyped Code} \ No newline at end of file diff --git a/collects/typed-scheme/scribblings/ts-reference.scrbl b/collects/typed-scheme/scribblings/ts-reference.scrbl index de953b5799..28839350bb 100644 --- a/collects/typed-scheme/scribblings/ts-reference.scrbl +++ b/collects/typed-scheme/scribblings/ts-reference.scrbl @@ -1,19 +1,19 @@ #lang scribble/manual @begin[(require "utils.ss" scribble/eval - scheme/sandbox) - (require (for-label (only-meta-in 0 typed/scheme) - scheme/list srfi/14 + racket/sandbox) + (require (for-label (only-meta-in 0 typed/racket) + racket/list srfi/14 version/check))] @(define the-eval (make-base-eval)) -@(the-eval '(require (except-in typed/scheme #%top-interaction #%module-begin))) +@(the-eval '(require (except-in typed/racket #%top-interaction #%module-begin))) -@title[#:tag "top"]{The Typed Scheme Reference} +@title[#:tag "top"]{The Typed Racket Reference} @author["Sam Tobin-Hochstadt"] -@(defmodulelang* (typed/scheme/base typed/scheme) +@(defmodulelang* (typed/racket/base typed/racket) #:use-sources (typed-scheme/typed-scheme typed-scheme/private/prims)) @section[#:tag "type-ref"]{Type Reference} @@ -45,9 +45,9 @@ @defidform[EOF] @defidform[Continuation-Mark-Set] @defidform[Char])]{ -These types represent primitive Scheme data. Note that @scheme[Integer] represents exact integers.} +These types represent primitive Racket data. Note that @racket[Integer] represents exact integers.} -@defidform[Any]{Any Scheme value. All other types are subtypes of @scheme[Any].} +@defidform[Any]{Any Racket value. All other types are subtypes of @racket[Any].} @defidform[Nothing]{The empty type. No values inhabit this type, and any expression of this type will not evaluate to a value.} @@ -55,18 +55,18 @@ any expression of this type will not evaluate to a value.} The following base types are parameteric in their type arguments. -@defform[(Listof t)]{Homogenous @rtech{lists} of @scheme[t]} -@defform[(Boxof t)]{A @rtech{box} of @scheme[t]} -@defform[(Syntaxof t)]{A @rtech{syntax object} containing a @scheme[t]} -@defform[(Vectorof t)]{Homogenous @rtech{vectors} of @scheme[t]} -@defform[(Option t)]{Either @scheme[t] of @scheme[#f]} +@defform[(Listof t)]{Homogenous @rtech{lists} of @racket[t]} +@defform[(Boxof t)]{A @rtech{box} of @racket[t]} +@defform[(Syntaxof t)]{A @rtech{syntax object} containing a @racket[t]} +@defform[(Vectorof t)]{Homogenous @rtech{vectors} of @racket[t]} +@defform[(Option t)]{Either @racket[t] of @racket[#f]} @defform*[[(Parameter t) - (Parameter s t)]]{A @rtech{parameter} of @scheme[t]. If two type arguments are supplied, + (Parameter s t)]]{A @rtech{parameter} of @racket[t]. If two type arguments are supplied, the first is the type the parameter accepts, and the second is the type returned.} -@defform[(Pair s t)]{is the pair containing @scheme[s] as the @scheme[car] - and @scheme[t] as the @scheme[cdr]} +@defform[(Pair s t)]{is the pair containing @racket[s] as the @racket[car] + and @racket[t] as the @racket[cdr]} @defform[(HashTable k v)]{is the type of a @rtech{hash table} with key type - @scheme[k] and value type @scheme[v].} + @racket[k] and value type @racket[v].} @subsubsub*section{Type Constructors} @@ -75,62 +75,62 @@ The following base types are parameteric in their type arguments. (dom ... rest * -> rng) (dom ... rest ... bound -> rng) (dom -> rng : pred)]]{is the type of functions from the (possibly-empty) - sequence @scheme[dom ...] to the @scheme[rng] type. The second form - specifies a uniform rest argument of type @scheme[rest], and the + sequence @racket[dom ...] to the @racket[rng] type. The second form + specifies a uniform rest argument of type @racket[rest], and the third form specifies a non-uniform rest argument of type - @scheme[rest] with bound @scheme[bound]. In the third form, the - second occurrence of @scheme[...] is literal, and @scheme[bound] + @racket[rest] with bound @racket[bound]. In the third form, the + second occurrence of @racket[...] is literal, and @racket[bound] must be an identifier denoting a type variable. In the fourth form, - there must be only one @scheme[dom] and @scheme[pred] is the type + there must be only one @racket[dom] and @racket[pred] is the type checked by the predicate.} -@defform[(U t ...)]{is the union of the types @scheme[t ...]} +@defform[(U t ...)]{is the union of the types @racket[t ...]} @defform[(case-lambda fun-ty ...)]{is a function that behaves like all of - the @scheme[fun-ty]s. The @scheme[fun-ty]s must all be function - types constructed with @scheme[->].} + the @racket[fun-ty]s. The @racket[fun-ty]s must all be function + types constructed with @racket[->].} @defform/none[(t t1 t2 ...)]{is the instantiation of the parametric type - @scheme[t] at types @scheme[t1 t2 ...]} -@defform[(All (v ...) t)]{is a parameterization of type @scheme[t], with - type variables @scheme[v ...]} + @racket[t] at types @racket[t1 t2 ...]} +@defform[(All (v ...) t)]{is a parameterization of type @racket[t], with + type variables @racket[v ...]} @defform[(List t ...)]{is the type of the list with one element, in order, - for each type provided to the @scheme[List] type constructor.} + for each type provided to the @racket[List] type constructor.} @defform[(values t ...)]{is the type of a sequence of multiple values, with -types @scheme[t ...]. This can only appear as the return type of a +types @racket[t ...]. This can only appear as the return type of a function.} -@defform/none[v]{where @scheme[v] is a number, boolean or string, is the singleton type containing only that value} -@defform/none[(quote val)]{where @scheme[val] is a Scheme value, is the singleton type containing only that value} -@defform/none[i]{where @scheme[i] is an identifier can be a reference to a type +@defform/none[v]{where @racket[v] is a number, boolean or string, is the singleton type containing only that value} +@defform/none[(quote val)]{where @racket[val] is a Racket value, is the singleton type containing only that value} +@defform/none[i]{where @racket[i] is an identifier can be a reference to a type name or a type variable} -@defform[(Rec n t)]{is a recursive type where @scheme[n] is bound to the -recursive type in the body @scheme[t]} +@defform[(Rec n t)]{is a recursive type where @racket[n] is bound to the +recursive type in the body @racket[t]} Other types cannot be written by the programmer, but are used internally and may appear in error messages. @defform/none[(struct:n (t ...))]{is the type of structures named -@scheme[n] with field types @scheme[t]. There may be multiple such +@racket[n] with field types @racket[t]. There may be multiple such types with the same printed representation.} @defform/none[]{is the printed representation of a reference to the -type variable @scheme[n]} +type variable @racket[n]} @section[#:tag "special-forms"]{Special Form Reference} -Typed Scheme provides a variety of special forms above and beyond -those in PLT Scheme. They are used for annotating variables with types, +Typed Racket provides a variety of special forms above and beyond +those in Racket. They are used for annotating variables with types, creating new types, and annotating expressions. @subsection{Binding Forms} -@scheme[_loop], @scheme[_f], @scheme[_a], and @scheme[_v] are names, @scheme[_t] is a type. - @scheme[_e] is an expression and @scheme[_body] is a block. +@racket[_loop], @racket[_f], @racket[_a], and @racket[_v] are names, @racket[_t] is a type. + @racket[_e] is an expression and @racket[_body] is a block. @defform*[[ (let: ([v : t e] ...) . body) (let: loop : t0 ([v : t e] ...) . body)]]{ -Local bindings, like @scheme[let], each with -associated types. In the second form, @scheme[_t0] is the type of the -result of @scheme[_loop] (and thus the result of the entire +Local bindings, like @racket[let], each with +associated types. In the second form, @racket[_t0] is the type of the +result of @racket[_loop] (and thus the result of the entire expression as well as the final - expression in @scheme[body]).} + expression in @racket[body]).} @deftogether[[ @defform[(letrec: ([v : t e] ...) . body)] @defform[(let*: ([v : t e] ...) . body)] @@ -138,30 +138,30 @@ result of @scheme[_loop] (and thus the result of the entire @defform[(letrec-values: ([([v : t] ...) e] ...) . body)] @defform[(let*-values: ([([v : t] ...) e] ...) . body)]]]{ Type-annotated versions of -@scheme[letrec], @scheme[let*], @scheme[let-values], - @scheme[letrec-values], and @scheme[let*-values].} +@racket[letrec], @racket[let*], @racket[let-values], + @racket[letrec-values], and @racket[let*-values].} @deftogether[[ @defform[(let/cc: v : t . body)] @defform[(let/ec: v : t . body)]]]{Type-annotated versions of -@scheme[let/cc] and @scheme[let/ec].} +@racket[let/cc] and @racket[let/ec].} @subsection{Anonymous Functions} @defform/subs[(lambda: formals . body) ([formals ([v : t] ...) ([v : t] ... . [v : t])])]{ -A function of the formal arguments @scheme[v], where each formal +A function of the formal arguments @racket[v], where each formal argument has the associated type. If a rest argument is present, then -it has type @scheme[(Listof t)].} +it has type @racket[(Listof t)].} @defform[(λ: formals . body)]{ -An alias for the same form using @scheme[lambda:].} +An alias for the same form using @racket[lambda:].} @defform[(plambda: (a ...) formals . body)]{ A polymorphic function, abstracted over the type variables -@scheme[a]. The type variables @scheme[a] are bound in both the types -of the formal, and in any type expressions in the @scheme[body].} +@racket[a]. The type variables @racket[a] are bound in both the types +of the formal, and in any type expressions in the @racket[body].} @defform[(case-lambda: [formals body] ...)]{ -A function of multiple arities. Note that each @scheme[formals] must have a +A function of multiple arities. Note that each @racket[formals] must have a different arity.} @defform[(pcase-lambda: (a ...) [formals body] ...)]{ A polymorphic function of multiple arities.} @@ -173,8 +173,8 @@ A polymorphic function of multiple arities.} expr ...+) ([step-expr-maybe code:blank step-expr])]{ -Like @scheme[do], but each @scheme[id] having the associated type @scheme[t], and -the final body @scheme[expr] having the type @scheme[u]. +Like @racket[do], but each @racket[id] having the associated type @racket[t], and +the final body @racket[expr] having the type @racket[u]. } @@ -184,9 +184,9 @@ the final body @scheme[expr] having the type @scheme[u]. (define: (f . formals) : t . body) (define: (a ...) (f . formals) : t . body)]]{ These forms define variables, with annotated types. The first form -defines @scheme[v] with type @scheme[t] and value @scheme[e]. The -second and third forms defines a function @scheme[f] with appropriate -types. In most cases, use of @scheme[:] is preferred to use of @scheme[define:].} +defines @racket[v] with type @racket[t] and value @racket[e]. The +second and third forms defines a function @racket[f] with appropriate +types. In most cases, use of @racket[:] is preferred to use of @racket[define:].} @@ -195,63 +195,63 @@ types. In most cases, use of @scheme[:] is preferred to use of @scheme[define:] (define-struct: maybe-type-vars name-spec ([f : t] ...)) ([maybe-type-vars code:blank (v ...)] [name-spec name (name parent)])]{ - Defines a @rtech{structure} with the name @scheme[name], where the - fields @scheme[f] have types @scheme[t]. When @scheme[parent], the -structure is a substructure of @scheme[parent]. When -@scheme[maybe-type-vars] is present, the structure is polymorphic in the type - variables @scheme[v].} + Defines a @rtech{structure} with the name @racket[name], where the + fields @racket[f] have types @racket[t]. When @racket[parent], the +structure is a substructure of @racket[parent]. When +@racket[maybe-type-vars] is present, the structure is polymorphic in the type + variables @racket[v].} @defform/subs[ (define-struct/exec: name-spec ([f : t] ...) [e : proc-t]) ([name-spec name (name parent)])]{ - Like @scheme[define-struct:], but defines an procedural structure. - The procdure @scheme[e] is used as the value for @scheme[prop:procedure], and must have type @scheme[proc-t].} + Like @racket[define-struct:], but defines an procedural structure. + The procdure @racket[e] is used as the value for @racket[prop:procedure], and must have type @racket[proc-t].} @subsection{Names for Types} @defform*[[(define-type name t) (define-type (name v ...) t)]]{ -The first form defines @scheme[name] as type, with the same meaning as -@scheme[t]. The second form is equivalent to -@scheme[(define-type name (All (v ...) t))]. Type names may +The first form defines @racket[name] as type, with the same meaning as +@racket[t]. The second form is equivalent to +@racket[(define-type name (All (v ...) t))]. Type names may refer to other types defined in the same module, but cycles among them are prohibited.} @subsection{Generating Predicates Automatically} @defform[(define-predicate name t)]{ -Defines @scheme[name] as a predicate for the type @scheme[t]. -@scheme[name] has the type @scheme[(Any -> Boolean : t)]. -@scheme[t] may not contain function types.} +Defines @racket[name] as a predicate for the type @racket[t]. +@racket[name] has the type @racket[(Any -> Boolean : t)]. +@racket[t] may not contain function types.} @subsection{Type Annotation and Instantiation} -@defform[(: v t)]{This declares that @scheme[v] has type @scheme[t]. -The definition of @scheme[v] must appear after this declaration. This +@defform[(: v t)]{This declares that @racket[v] has type @racket[t]. +The definition of @racket[v] must appear after this declaration. This can be used anywhere a definition form may be used.} -@defform[(provide: [v t] ...)]{This declares that the @scheme[v]s have -the types @scheme[t], and also provides all of the @scheme[v]s.} +@defform[(provide: [v t] ...)]{This declares that the @racket[v]s have +the types @racket[t], and also provides all of the @racket[v]s.} -@litchar{#{v : t}} This declares that the variable @scheme[v] has type -@scheme[t]. This is legal only for binding occurences of @scheme[_v]. +@litchar{#{v : t}} This declares that the variable @racket[v] has type +@racket[t]. This is legal only for binding occurences of @racket[_v]. -@defform[(ann e t)]{Ensure that @scheme[e] has type @scheme[t], or -some subtype. The entire expression has type @scheme[t]. +@defform[(ann e t)]{Ensure that @racket[e] has type @racket[t], or +some subtype. The entire expression has type @racket[t]. This is legal only in expression contexts.} -@litchar{#{e :: t}} This is identical to @scheme[(ann e t)]. +@litchar{#{e :: t}} This is identical to @racket[(ann e t)]. -@defform[(inst e t ...)]{Instantiate the type of @scheme[e] with types -@scheme[t ...]. @scheme[e] must have a polymorphic type with the +@defform[(inst e t ...)]{Instantiate the type of @racket[e] with types +@racket[t ...]. @racket[e] must have a polymorphic type with the appropriate number of type variables. This is legal only in expression contexts.} -@litchar|{#{e @ t ...}}| This is identical to @scheme[(inst e t ...)]. +@litchar|{#{e @ t ...}}| This is identical to @racket[(inst e t ...)]. @subsection{Require} -Here, @scheme[_m] is a module spec, @scheme[_pred] is an identifier -naming a predicate, and @scheme[_r] is an optionally-renamed identifier. +Here, @racket[_m] is a module spec, @racket[_pred] is an identifier +naming a predicate, and @racket[_r] is an optionally-renamed identifier. @defform/subs[#:literals (struct opaque) (require/typed m rt-clause ...) @@ -259,54 +259,54 @@ naming a predicate, and @scheme[_r] is an optionally-renamed identifier. [struct name ([f : t] ...)] [struct (name parent) ([f : t] ...)] [opaque t pred]]) -]{This form requires identifiers from the module @scheme[m], giving +]{This form requires identifiers from the module @racket[m], giving them the specified types. -The first form requires @scheme[r], giving it type @scheme[t]. +The first form requires @racket[r], giving it type @racket[t]. -@index["struct"]{The second and third forms} require the struct with name @scheme[name] -with fields @scheme[f ...], where each field has type @scheme[t]. The -third form allows a @scheme[parent] structure type to be specified. +@index["struct"]{The second and third forms} require the struct with name @racket[name] +with fields @racket[f ...], where each field has type @racket[t]. The +third form allows a @racket[parent] structure type to be specified. The parent type must already be a structure type known to Typed -Scheme, either built-in or via @scheme[require/typed]. The -structure predicate has the appropriate Typed Scheme filter type so -that it may be used as a predicate in @scheme[if] expressions in Typed -Scheme. +Racket, either built-in or via @racket[require/typed]. The +structure predicate has the appropriate Typed Racket filter type so +that it may be used as a predicate in @racket[if] expressions in Typed +Racket. -@index["opaque"]{The fourth case} defines a new type @scheme[t]. @scheme[pred], imported from -module @scheme[m], is a predicate for this type. The type is defined -as precisely those values to which @scheme[pred] produces -@scheme[#t]. @scheme[pred] must have type @scheme[(Any -> Boolean)]. +@index["opaque"]{The fourth case} defines a new type @racket[t]. @racket[pred], imported from +module @racket[m], is a predicate for this type. The type is defined +as precisely those values to which @racket[pred] produces +@racket[#t]. @racket[pred] must have type @racket[(Any -> Boolean)]. Opaque types must be required lexically before they are used. In all cases, the identifiers are protected with @rtech{contracts} which enforce the specified types. If this contract fails, the module -@scheme[m] is blamed. +@racket[m] is blamed. -Some types, notably polymorphic types constructed with @scheme[All], +Some types, notably polymorphic types constructed with @racket[All], cannot be converted to contracts and raise a static error when used in -a @scheme[require/typed] form.} +a @racket[require/typed] form.} -@section{Libraries Provided With Typed Scheme} +@section{Libraries Provided With Typed Racket} -The @schememodname[typed/scheme] language corresponds to the -@schememodname[scheme] language---that is, any identifier provided -by @schememodname[scheme], such as @scheme[modulo] is available by default in -@schememodname[typed/scheme]. +The @racketmodname[typed/racket] language corresponds to the +@racketmodname[racket] language---that is, any identifier provided +by @racketmodname[racket], such as @racket[modulo] is available by default in +@racketmodname[typed/racket]. -@schememod[typed/scheme +@racketmod[typed/racket (modulo 12 2) ] -The @schememodname[typed/scheme/base] language corresponds to the -@schememodname[scheme/base] language. +The @racketmodname[typed/racket/base] language corresponds to the +@racketmodname[racket/base] language. -Some libraries have counterparts in the @schemeidfont{typed} +Some libraries have counterparts in the @racketidfont{typed} collection, which provide the same exports as the untyped versions. -Such libraries include @schememodname[srfi/14], -@schememodname[net/url], and many others. +Such libraries include @racketmodname[srfi/14], +@racketmodname[net/url], and many others. -@schememod[typed/scheme +@racketmod[typed/racket (require typed/srfi/14) (char-set= (string->char-set "hello") (string->char-set "olleh")) @@ -316,33 +316,33 @@ To participate in making more libraries available, please visit @link["http://www.ccs.neu.edu/home/samth/adapt/"]{here}. -Other libraries can be used with Typed Scheme via -@scheme[require/typed]. +Other libraries can be used with Typed Racket via +@racket[require/typed]. -@schememod[typed/scheme +@racketmod[typed/racket (require/typed version/check [check-version (-> (U Symbol (Listof Any)))]) (check-version) ] -@section{Typed Scheme Syntax Without Type Checking} +@section{Typed Racket Syntax Without Type Checking} @defmodulelang[typed-scheme/no-check] -On occasions where the Typed Scheme syntax is useful, but actual -typechecking is not desired, the @schememodname[typed-scheme/no-check] +On occasions where the Typed Racket syntax is useful, but actual +typechecking is not desired, the @racketmodname[typed-scheme/no-check] language is useful. It provides the same bindings and syntax as Typed -Scheme, but does no type checking. +Racket, but does no type checking. Examples: -@schememod[typed-scheme/no-check +@racketmod[typed-scheme/no-check (: x Number) (define x "not-a-number")] @section{Typed Regions} -The @scheme[with-type] for allows for localized Typed Scheme regions in otherwise untyped code. +The @racket[with-type] for allows for localized Typed Racket regions in otherwise untyped code. @defform*/subs[[(with-type result-spec fv-clause body ...+) (with-type export-spec fv-clause body ...+)] @@ -350,16 +350,16 @@ The @scheme[with-type] for allows for localized Typed Scheme regions in otherwis (code:line #:freevars ([id fv-type] ...))] [result-spec (code:line #:result type)] [export-spec ([export-id export-type] ...)])]{ -The first form, an expression, checks that @scheme[body ...+] has the type @scheme[type]. -If the last expression in @scheme[body ...+] returns multiple values, @scheme[type] must -be a type of the form @scheme[(values t ...)]. +The first form, an expression, checks that @racket[body ...+] has the type @racket[type]. +If the last expression in @racket[body ...+] returns multiple values, @racket[type] must +be a type of the form @racket[(values t ...)]. Uses of the result values are appropriately checked by contracts generated from -@scheme[type]. +@racket[type]. -The second form, which can be used as a definition, checks that each of the @scheme[export-id]s +The second form, which can be used as a definition, checks that each of the @racket[export-id]s has the specified type. These types are also enforced in the surrounding code with contracts. -The @scheme[id]s are assumed to +The @racket[id]s are assumed to have the types ascribed to them; these types are converted to contracts and checked dynamically. @examples[#:eval the-eval diff --git a/collects/typed-scheme/scribblings/types.scrbl b/collects/typed-scheme/scribblings/types.scrbl index 240055071b..00d0279941 100644 --- a/collects/typed-scheme/scribblings/types.scrbl +++ b/collects/typed-scheme/scribblings/types.scrbl @@ -2,21 +2,21 @@ @begin[(require "utils.ss" scribble/core scribble/eval - (for-label (only-meta-in 0 typed/scheme) mzlib/etc))] + (for-label (only-meta-in 0 typed/racket) mzlib/etc))] @(define the-eval (make-base-eval)) -@(the-eval '(require typed/scheme)) +@(the-eval '(require typed/racket)) -@title[#:tag "types"]{Types in Typed Scheme} +@title[#:tag "types"]{Types in Typed Racket} -Typed Scheme provides a rich variety of types to describe data. This +Typed Racket provides a rich variety of types to describe data. This section introduces them. @section{Basic Types} -The most basic types in Typed Scheme are those for primitive data, -such as @scheme[True] and @scheme[False] for booleans, @scheme[String] -for strings, and @scheme[Char] for characters. +The most basic types in Typed Racket are those for primitive data, +such as @racket[True] and @racket[False] for booleans, @racket[String] +for strings, and @racket[Char] for characters. @interaction[#:eval the-eval '"hello, world" @@ -25,13 +25,13 @@ for strings, and @scheme[Char] for characters. #f] Each symbol is given a unique type containing only that symbol. The -@scheme[Symbol] type includes all symbols. +@racket[Symbol] type includes all symbols. @interaction[#:eval the-eval 'foo 'bar] -Typed Scheme also provides a rich hierarchy for describing particular +Typed Racket also provides a rich hierarchy for describing particular kinds of numbers. @interaction[#:eval the-eval @@ -49,20 +49,20 @@ Finally, any value is itself a type: @section{Function Types} We have already seen some examples of function types. Function types -are constructed using @scheme[->], with the argument types before the +are constructed using @racket[->], with the argument types before the arrow and the result type after. Here are some example function types: -@schemeblock[ +@racketblock[ (Number -> Number) (String String -> Boolean) (Char -> (values String Natural)) ] -The first type requires a @scheme[Number] as input, and produces a -@scheme[Number]. The second requires two arguments. The third takes +The first type requires a @racket[Number] as input, and produces a +@racket[Number]. The second requires two arguments. The third takes one argument, and produces @rtech{multiple values}, of types -@scheme[String] and @scheme[Natural]. Here are example functions for +@racket[String] and @racket[Natural]. Here are example functions for each of these types. @interaction[#:eval the-eval @@ -74,7 +74,7 @@ each of these types. @section{Union Types} Sometimes a value can be one of several types. To specify this, we -can use a union type, written with the type constructor @scheme[U]. +can use a union type, written with the type constructor @racket[U]. @interaction[#:eval the-eval (let ([a-number 37]) @@ -85,7 +85,7 @@ can use a union type, written with the type constructor @scheme[U]. Any number of types can be combined together in a union, and nested unions are flattened. -@schemeblock[(U Number String Boolean Char)] +@racketblock[(U Number String Boolean Char)] @section{Recursive Types} @@ -93,34 +93,34 @@ unions are flattened. to describe an infinite family of data. For example, this is the type of binary trees of numbers. -@schemeblock[ +@racketblock[ (Rec BT (U Number (Pair BT BT)))] -The @scheme[Rec] type constructor specifies that the type @scheme[BT] +The @racket[Rec] type constructor specifies that the type @racket[BT] refers to the whole binary tree type within the body of the -@scheme[Rec] form. +@racket[Rec] form. @section{Structure Types} -Using @scheme[define-struct:] introduces new types, distinct from any +Using @racket[define-struct:] introduces new types, distinct from any previous type. -@schemeblock[(define-struct: point ([x : Real] [y : Real]))] +@racketblock[(define-struct: point ([x : Real] [y : Real]))] -Instances of this structure, such as @scheme[(make-point 7 12)], have type @scheme[point]. +Instances of this structure, such as @racket[(make-point 7 12)], have type @racket[point]. @section{Subtyping} -In Typed Scheme, all types are placed in a hierarchy, based on what +In Typed Racket, all types are placed in a hierarchy, based on what values are included in the type. When an element of a larger type is expected, an element of a smaller type may be provided. The smaller type is called a @deftech{subtype} of the larger type. The larger type is called a @deftech{supertype}. For example, -@scheme[Integer] is a subtype of @scheme[Real], since every integer is +@racket[Integer] is a subtype of @racket[Real], since every integer is a real number. Therefore, the following code is acceptable to the type checker: -@schemeblock[ +@racketblock[ (: f (Real -> Real)) (define (f x) (* x 0.75)) @@ -130,30 +130,30 @@ type checker: (f x) ] -All types are subtypes of the @scheme[Any] type. +All types are subtypes of the @racket[Any] type. The elements of a union type are individually subtypes of the whole -union, so @scheme[String] is a subtype of @scheme[(U String Number)]. +union, so @racket[String] is a subtype of @racket[(U String Number)]. One function type is a subtype of another if they have the same number of arguments, the subtype's arguments are more permissive (is a supertype), and the subtype's result type is less permissive (is a subtype). -For example, @scheme[(Any -> String)] is a subtype of @scheme[(Number +For example, @racket[(Any -> String)] is a subtype of @racket[(Number -> (U String #f))]. @;@section{Occurrence Typing} @section{Polymorphism} -Typed Scheme offers abstraction over types as well as values. +Typed Racket offers abstraction over types as well as values. @subsection{Polymorphic Data Structures} -Virtually every Scheme program uses lists and sexpressions. Fortunately, Typed -Scheme can handle these as well. A simple list processing program can be +Virtually every Racket program uses lists and sexpressions. Fortunately, Typed +Racket can handle these as well. A simple list processing program can be written like this: -@schememod[ -typed/scheme +@racketmod[ +typed/racket (: sum-list ((Listof Number) -> Number)) (define (sum-list l) (cond [(null? l) 0] @@ -161,17 +161,17 @@ typed/scheme ] This looks similar to our earlier programs --- except for the type -of @scheme[l], which looks like a function application. In fact, it's -a use of the @italic{type constructor} @scheme[Listof], which takes -another type as its input, here @scheme[Number]. We can use -@scheme[Listof] to construct the type of any kind of list we might +of @racket[l], which looks like a function application. In fact, it's +a use of the @italic{type constructor} @racket[Listof], which takes +another type as its input, here @racket[Number]. We can use +@racket[Listof] to construct the type of any kind of list we might want. We can define our own type constructors as well. For example, here is an analog of the @tt{Maybe} type constructor from Haskell: -@schememod[ -typed/scheme +@racketmod[ +typed/racket (define-struct: None ()) (define-struct: (a) Some ([v : a])) @@ -184,32 +184,32 @@ typed/scheme [else (find v (cdr l))])) ] -The first @scheme[define-struct:] defines @scheme[None] to be +The first @racket[define-struct:] defines @racket[None] to be a structure with no contents. The second definition -@schemeblock[ +@racketblock[ (define-struct: (a) Some ([v : a])) ] -creates a parameterized type, @scheme[Just], which is a structure with +creates a parameterized type, @racket[Just], which is a structure with one element, whose type is that of the type argument to -@scheme[Just]. Here the type parameters (only one, @scheme[a], in +@racket[Just]. Here the type parameters (only one, @racket[a], in this case) are written before the type name, and can be referred to in the types of the fields. The type definiton -@schemeblock[ +@racketblock[ (define-type (Opt a) (U None (Some a))) ] -creates a parameterized type --- @scheme[Opt] is a potential +creates a parameterized type --- @racket[Opt] is a potential container for whatever type is supplied. -The @scheme[find] function takes a number @scheme[v] and list, and -produces @scheme[(make-Some v)] when the number is found in the list, -and @scheme[(make-None)] otherwise. Therefore, it produces a -@scheme[(Opt Number)], just as the annotation specified. +The @racket[find] function takes a number @racket[v] and list, and +produces @racket[(make-Some v)] when the number is found in the list, +and @racket[(make-None)] otherwise. Therefore, it produces a +@racket[(Opt Number)], just as the annotation specified. @subsection{Polymorphic Functions} @@ -217,8 +217,8 @@ Sometimes functions over polymorphic data structures only concern themselves with the form of the structure. For example, one might write a function that takes the length of a list of numbers: -@schememod[ -typed/scheme +@racketmod[ +typed/racket (: list-number-length ((Listof Number) -> Integer)) (define (list-number-length l) (if (null? l) @@ -227,8 +227,8 @@ typed/scheme and also a function that takes the length of a list of strings: -@schememod[ -typed/scheme +@racketmod[ +typed/racket (: list-string-length ((Listof String) -> Integer)) (define (list-string-length l) (if (null? l) @@ -242,17 +242,17 @@ definition. We can abstract over the type of the element as follows: -@schememod[ -typed/scheme +@racketmod[ +typed/racket (: list-length (All (A) ((Listof A) -> Integer))) (define (list-length l) (if (null? l) 0 (add1 (list-length (cdr l)))))] -The new type constructor @scheme[All] takes a list of type +The new type constructor @racket[All] takes a list of type variables and a body type. The type variables are allowed to -appear free in the body of the @scheme[All] form. +appear free in the body of the @racket[All] form. @include-section["varargs.scrbl"] diff --git a/collects/typed-scheme/scribblings/varargs.scrbl b/collects/typed-scheme/scribblings/varargs.scrbl index 61b52b65de..cc67dd586f 100644 --- a/collects/typed-scheme/scribblings/varargs.scrbl +++ b/collects/typed-scheme/scribblings/varargs.scrbl @@ -1,18 +1,18 @@ #lang scribble/manual -@begin[(require "utils.ss" (for-label typed/scheme/base))] +@begin[(require "utils.ss" (for-label typed/racket/base))] @title[#:tag "varargs"]{Variable-Arity Functions: Programming with Rest Arguments} -Typed Scheme can handle some uses of rest arguments. +Typed Racket can handle some uses of rest arguments. @section{Uniform Variable-Arity Functions} -In Scheme, one can write a function that takes an arbitrary +In Racket, one can write a function that takes an arbitrary number of arguments as follows: -@schememod[ -scheme +@racketmod[ +racket (define (sum . xs) (if (null? xs) 0 @@ -25,12 +25,12 @@ scheme The arguments to the function that are in excess to the non-rest arguments are converted to a list which is assigned to the rest parameter. So the examples above evaluate to -@schemeresult[0], @schemeresult[10], and @schemeresult[4]. +@racketresult[0], @racketresult[10], and @racketresult[4]. -We can define such functions in Typed Scheme as well: +We can define such functions in Typed Racket as well: -@schememod[ -typed/scheme +@racketmod[ +typed/racket (: sum (Number * -> Number)) (define (sum . xs) (if (null? xs) @@ -43,10 +43,10 @@ of the rest parameter is used at the same type. @section{Non-Uniform Variable-Arity Functions} However, the rest argument may be used as a heterogeneous list. -Take this (simplified) definition of the Scheme function @scheme[map]: +Take this (simplified) definition of the Racket function @racket[map]: -@schememod[ -scheme +@racketmod[ +racket (define (map f as . bss) (if (or (null? as) (ormap null? bss)) @@ -58,21 +58,21 @@ scheme (map cons (list 1 2 3) (list (list 4) (list 5) (list 6))) (map + (list 1 2 3) (list 2 3 4) (list 3 4 5) (list 4 5 6))] -Here the different lists that make up the rest argument @scheme[bss] -can be of different types, but the type of each list in @scheme[bss] -corresponds to the type of the corresponding argument of @scheme[f]. +Here the different lists that make up the rest argument @racket[bss] +can be of different types, but the type of each list in @racket[bss] +corresponds to the type of the corresponding argument of @racket[f]. We also know that, in order to avoid arity errors, the length of -@scheme[bss] must be one less than the arity of @scheme[f] (as -@scheme[as] corresponds to the first argument of @scheme[f]). +@racket[bss] must be one less than the arity of @racket[f] (as +@racket[as] corresponds to the first argument of @racket[f]). -The example uses of @scheme[map] evaluate to @schemeresult[(list 2 3 4 5)], -@schemeresult[(list (list 1 4) (list 2 5) (list 3 6))], and -@schemeresult[(list 10 14 18)]. +The example uses of @racket[map] evaluate to @racketresult[(list 2 3 4 5)], +@racketresult[(list (list 1 4) (list 2 5) (list 3 6))], and +@racketresult[(list 10 14 18)]. -In Typed Scheme, we can define @scheme[map] as follows: +In Typed Racket, we can define @racket[map] as follows: -@schememod[ -typed/scheme +@racketmod[ +typed/racket (: map (All (C A B ...) ((A B ... B -> C) (Listof A) (Listof B) ... B @@ -85,21 +85,21 @@ typed/scheme (cons (apply f (car as) (map car bss)) (apply map f (cdr as) (map cdr bss)))))] -Note that the type variable @scheme[B] is followed by an +Note that the type variable @racket[B] is followed by an ellipsis. This denotes that B is a dotted type variable which corresponds to a list of types, much as a rest argument corresponds to a list of values. When the type -of @scheme[map] is instantiated at a list of types, then -each type @scheme[t] which is bound by @scheme[B] (notated by -the dotted pre-type @scheme[t ... B]) is expanded to a number -of copies of @scheme[t] equal to the length of the sequence -assigned to @scheme[B]. Then @scheme[B] in each copy is +of @racket[map] is instantiated at a list of types, then +each type @racket[t] which is bound by @racket[B] (notated by +the dotted pre-type @racket[t ... B]) is expanded to a number +of copies of @racket[t] equal to the length of the sequence +assigned to @racket[B]. Then @racket[B] in each copy is replaced with the corresponding type from the sequence. -So the type of @scheme[(inst map Integer Boolean String Number)] +So the type of @racket[(inst map Integer Boolean String Number)] is -@scheme[((Boolean String Number -> Integer) +@racket[((Boolean String Number -> Integer) (Listof Boolean) (Listof String) (Listof Number) -> (Listof Integer))]. diff --git a/collects/typed/racket.rkt b/collects/typed/racket.rkt new file mode 100644 index 0000000000..2f76257a81 --- /dev/null +++ b/collects/typed/racket.rkt @@ -0,0 +1,6 @@ +#lang racket/base + +(require typed/racket/base racket/require (subtract-in racket typed/racket/base racket/contract) + (for-syntax racket/base)) +(provide (all-from-out typed/racket/base racket) + (for-syntax (all-from-out racket/base))) \ No newline at end of file diff --git a/collects/typed/racket/base.rkt b/collects/typed/racket/base.rkt new file mode 100644 index 0000000000..8c71a40b2d --- /dev/null +++ b/collects/typed/racket/base.rkt @@ -0,0 +1,22 @@ +#lang s-exp typed-scheme/minimal + + + +(providing (libs (except racket/base #%module-begin #%top-interaction with-handlers lambda #%app) + (except typed-scheme/private/prims) + (except typed-scheme/private/base-types-new) + (except typed-scheme/private/base-types-extra)) + (basics #%module-begin + #%top-interaction + lambda + #%app)) +(require typed-scheme/private/base-env + typed-scheme/private/base-special-env + typed-scheme/private/base-env-numeric + typed-scheme/private/base-env-indexing + typed-scheme/private/extra-procs + (for-syntax typed-scheme/private/base-types-extra)) +(provide (rename-out [with-handlers: with-handlers] + [define-type-alias define-type]) + assert with-type + (for-syntax (all-from-out typed-scheme/private/base-types-extra))) diff --git a/collects/typed/racket/base/lang/reader.rkt b/collects/typed/racket/base/lang/reader.rkt new file mode 100644 index 0000000000..956259de88 --- /dev/null +++ b/collects/typed/racket/base/lang/reader.rkt @@ -0,0 +1,18 @@ +#lang s-exp syntax/module-reader + +typed/racket/base + +#:read r:read +#:read-syntax r:read-syntax +#:info make-info +#:language-info make-language-info + +(define (make-info key default use-default) + (case key + [else (use-default key default)])) + +(define make-language-info + `#(typed-scheme/language-info get-info ())) + + +(require (prefix-in r: typed-scheme/typed-reader)) diff --git a/collects/typed/racket/lang/reader.rkt b/collects/typed/racket/lang/reader.rkt new file mode 100644 index 0000000000..35c0f81dea --- /dev/null +++ b/collects/typed/racket/lang/reader.rkt @@ -0,0 +1,18 @@ +#lang s-exp syntax/module-reader + +typed/racket + +#:read r:read +#:read-syntax r:read-syntax +#:info make-info +#:language-info make-language-info + +(define (make-info key default use-default) + (case key + [else (use-default key default)])) + +(define make-language-info + `#(typed-scheme/language-info get-info ())) + + +(require (prefix-in r: typed-scheme/typed-reader)) diff --git a/collects/typed/racket/system.rkt b/collects/typed/racket/system.rkt new file mode 100644 index 0000000000..ccdf327a89 --- /dev/null +++ b/collects/typed/racket/system.rkt @@ -0,0 +1 @@ +#lang s-exp typed/private/wrap racket/system \ No newline at end of file diff --git a/src/foreign/README b/src/foreign/README index 1c8cbcae9a..c1f4e1645d 100644 --- a/src/foreign/README +++ b/src/foreign/README @@ -13,7 +13,7 @@ under the MIT License. The directory is synced from the GCC repository, revision 140226. -Our copy of libffi for PLT Scheme has been changed in a few small +Our copy of libffi for Racket has been changed in a few small ways: Local changes: diff --git a/src/worksp/README b/src/worksp/README index b824f8880f..7f408b9003 100644 --- a/src/worksp/README +++ b/src/worksp/README @@ -1,280 +1,280 @@ -This directory contains - - - solution files and project files for building Racket and GRacket - with Microsoft Visual Studio 8.0 and up (which work with the - Express 2005 version of Visual Studio); - - - mzconfig.h which is a manual version of information that is - gathered automatically when using the "configure" script; - - - scripts for building 3m variants of Racket and GRacket using - Visual Studio command-line tools; and - - - solution files and project files for building MzCOM and MysterX - with Microsoft Visual Studio 8.0 (not Express, which doesn't - support ATL and MFC). - -Visual Studio Express is available for free from Microsoft; it can be -used to build Racket and GRacket, but not MzCOM and MysterX. - -Racket and GRacket also compile with Cygwin gcc (a free compiler from -GNU and Cygnus Solutions), but the result is a Unix-style -installation, not a Window-style installation. To compile with gcc, -follow the instructions in racket\src\README (which contains a short -Windows-specific section). - -With an MSVC-built Racket, compatible extensions can be built with -other compilers. Build with Cygwin and copy the installed racket\lib\gcc -to a MSVC-based build to support Cygwin-built extensions. To support -Borland-built extensions, cd to racket\src\racket\dynsrc and run -mkbordyn.bat (which requires bcc23.exe, of course). - -As always, please report bugs via one of the following: - - DrRacket's "submit bug report" menu (preferred) - - http://bugs.racket-lang.org/ - - the mailing list (racket@list.cs.brown.edu) (last resort) - --PLT - racket@racket-lang.org - ----------------------------------------------------------------------- -Building Racket and GRacket ----------------------------------------------------------------------- - -If you're using MSVC 8.0 (not Express), and if `devenv.exe' is in your -path, then you can just run - racket\src\worksp\build.bat -from its own directory to perform all steps up to "Versioning", -including the MzCOM and MysterX steps. - -The CGC variants of Racket, MzCOM, GRacket, and MysterX can be built -via Visual Studio projects. The 3m variants are built by a Racket -script that runs the MSVC command-line tools. (See "CGC versus 3m" -in racket\src\README if you don't know about the two variants.) - -The 3m build requires some parts of the CGC build: - racket\src\worksp\racket - racket\src\worksp\wxutils - racket\src\worksp\jpeg - racket\src\worksp\png - racket\src\worksp\zlib -It's simplest to just build the main CGC solutions, which -automatically build all of the above projects, and then build -3m. - -Building RacketCGC and GRacketCGC --------------------------------- - -The CGC source code for RacketCGC and GRacketCGC is split into several -projects that are grouped into a few solutions. To build the `X' -solution with Visual Studio, open the file racket\src\worksp\X\X.sln. - -To build RacketCGC, build the Racket solution in - racket\src\worksp\racket - makes racket\RacketCGC.exe - - [When you open the solution, it may default to "Debug" - configuration. Switch to "Release" before building.] - -To build GRacketCGC, build the GRacket solution: - racket\src\worksp\gracket - makes racket\GRacketCGC.exe - - [Again, switch to the "Release" configuration if necessary.] - -The build processes for RacketCGC automatically builds - libmzgc - makes racket\lib\libmzgcxxxxxxx.dll and - racket\src\worksp\libmzgc\Release\libmzgcxxxxxxx.lib - libracket - makes racket\lib\libracketxxxxxxx.dll and - racket\src\worksp\mzsrc\Release\mzsrcxxxxxxx.lib - -The build process for GRacketCGC automatically builds - libmzgc - as above - libracket - as above - libgracket - makes racket\lib\libgracketxxxxxxx.dll and - racket\src\worksp\libgracket\Release\libgracketxxxxxxx.lib - wxutils - makes racket\src\worksp\wxutils\Release\wxutils.lib - wxwin - makes racket\src\worksp\wxwin\Release\wxwin.lib - wxs - makes racket\src\worksp\wxs\Release\wxs.lib - wxme - makes racket\src\worksp\wxme\Release\wxme.lib - jpeg - makes racket\src\worksp\jpeg\Release\jpeg.lib - png - makes racket\src\worksp\jpeg\Release\png.lib - zlib - makes racket\src\worksp\jpeg\Release\zlib.lib - -In addition, building RacketCGC executes - racket\src\racket\dynsrc\mkmzdyn.bat -which copies .exp, .obj, and .lib files into racket\lib\, and also copies -DLLs from the "extradlls" directory to to racket\lib\. - -Building Racket3m and GRacket3m ------------------------------- - -After RacketCGC and GRacketCGC are built, you can can build 3m -binaries: - - 1. Ensure that the Visual Studio command-line tools are in your - path. You may need to run "vsvars32.bat" from your Visual Studio - installation, so that PATH and other environment variables are set. - - 2. Change directories to racket\src\worksp\gc2 and run - - ..\..\..\racketcgc.exe -c make.rkt - -The resulting Racket.exe and GRacket.exe will appear in the top-level -"racket" directory, along with DLLs libracket3mxxxxxxx.dll and -libgracket3mxxxxxxx.dll in racket/lib. (There is no corresponding -libmzgc3mxxxxxxx.dll. Instead, it is merged with -libracket3mxxxxxxx.dll.) - -Building Collections and Other Executables ------------------------------------------- - -If you're building from scratch, you'll also want the starter programs -used by the launcher collection to create "raco.exe". Build the -following solutions: - - racket\src\worksp\mzstart - makes racket\collects\launcher\mzstart.exe - racket\src\worksp\mrstart - makes racket\collects\launcher\mrstart.exe - - [The "mzstart" and "mrstart" programs have no CGC versus 3m - distinction.] - -Then, set up all the other executables (besides GRacket[CGC].exe and -Racket[CGC].exe) by running - - racket.exe -l- setup - -This last step makes the .zo files, too. To skip compiling .zos, add --n to the end of the above command. - -If you've already built before, then this step can be simplied: just -re-run `raco setup', where "raco.exe" was created the first time. - -Versioning ----------- - -[If you're going to build MzCOM and/or MysterX, do that before running - the version-changing script. See instructions below.] - -The obnoxious "xxxxxxx" in the DLL names is a placeholder for a -version number. Embedding a version number in a DLL name appears to -be the simplest and surest way to avoid version confusion. - -For local testing, you can use the "xxxxxxx" libraries directly. For -any binaries that will be distributed, however, the placeholder should -be replaced with a specific version. - -To replace the "xxxxxxx" with a specific version, run - - racket -l setup/winvers - -in a shell. - -The "winvers.rkt" program will have to make a temporary copy of -racket.exe and the "lib" sub-directory (into the temporary -directory), and it will re-launch Racket a couple of times. Every -".exe", ".dll", ".lib", ".def", ".exp", and ".pdb" file within the -"racket" tree is updated to replace "xxxxxxxx" with a specific version -number. - ----------------------------------------------------------------------- -Building MzCOM and MysterX ----------------------------------------------------------------------- - -Beware that MzCOM and MysterX do not build with Express versions of -Visual Studio. Otherwise, building MzCOMCGC and MysterXCGC is similar -to building RacketCGC. Building the 3m variants is a little -different. - -Building MzCOM --------------- - -To build MzCOMCGC, make the MzCOM solution in - racket\src\worksp\mzcom - makes racket\MzCOMCGC.exe - -Use the "Release" configuration. - -After building MzCOMCGC, you can build the 3m variant by - - 1. Change directories to racket\src\worksp\mzcom and run - - ..\..\..\racketcgc.exe -cu xform.rkt - - 2. Switch to the "3m" configuration in the MzCOM solution - (in Visual Studio). - - 3. Build (in Visual Studio). - -The result is racket\MzCOM.exe. - -Building MysterX ----------------- - -To build MysterXCGC, make the MysterX solution in - racket\src\worksp\libmysterx - makes racket\lib\myssink.dll, - racket\lib\myspage.dll, and mxmain.dll in - collects\mysterx\private\compiled\native\win32\i386 - -Use the "Release" configuration. - -After building MysterXCGC, you can build the 3m variant by - - 1. Change directories to racket\src\worksp\libmysterx and run - - ..\..\..\racketcgc.exe -cu xform.rkt - - 2. Switch to the "3m" configuration in the libmysterx solution - (in Visual Studio). - - 3. Build (in Visual Studio). - -The result is mxmain.dll (no 3m suffix) in - collects\mysterx\private\compiled\native\win32\i386\3m - ----------------------------------------------------------------------- -Finding DLLs ----------------------------------------------------------------------- - -Since the DLLs libracket3mxxxxxxx.dll (or libmzgcxxxxxxx.dll and -libracketxxxxxxx.dll) and libgracket3mxxxxxxx.dll (or -libgracketxxxxxxx.dll) are installed into racket\lib\ instead of just -racket\, the normal search path for DLLs would not find them when running -"Racket.exe" or "GRacket.exe". To find the DLLs, the executables are -"delayload" linked with the DLLs, and the executables explicitly load -the DLLs from racket\lib\ on start-up. - -The relative DLL path is embedded in each executable, and it can be -replaced with a path of up to 512 characters. The path is stored in -the executable in wide-character format, and it is stored immediately -after the wide-character tag "dLl dIRECTORy:" with a wide NUL -terminator. The path can be either absolute or relative; in the latter -case, the relative path is resolved with respect to the -executable. Replacing the first character of the path with "<" -disables the explicit DLL load, so that the DLLs must appear in the -normal DLL search path. - -See also ..\README for information on the embedded "collects" path in -the executables. - ----------------------------------------------------------------------- -Embedding Racket ----------------------------------------------------------------------- - -The Racket DLLs can be used within an embedding application. - -The libraries - - racket\lib\win32\msvc\libracket3mxxxxxxx.lib - racket\lib\win32\msvc\libracketxxxxxxx.lib - racket\lib\win32\msvc\libmzgcxxxxxxx.lib - -which are created by the mzsrc and gc projects, provide linking -information for using the libracket3mxxxxxxx.dll, -libracketxxxxxxx.dll, and libmzgcxxxxxxx.dll DLLs. The versioning -script adjusts the names, as described above. - -See the "Inside Racket" manual for more information about using -these libraries to embed Racket in an application. - - -If you need Racket to link to a DLL-based C library (instead of -statically linking to the C library within the Racket DLL), then -compile Racket with the /MD flag. +This directory contains + + - solution files and project files for building Racket and GRacket + with Microsoft Visual Studio 8.0 and up (which work with the + Express 2005 version of Visual Studio); + + - mzconfig.h which is a manual version of information that is + gathered automatically when using the "configure" script; + + - scripts for building 3m variants of Racket and GRacket using + Visual Studio command-line tools; and + + - solution files and project files for building MzCOM and MysterX + with Microsoft Visual Studio 8.0 (not Express, which doesn't + support ATL and MFC). + +Visual Studio Express is available for free from Microsoft; it can be +used to build Racket and GRacket, but not MzCOM and MysterX. + +Racket and GRacket also compile with Cygwin gcc (a free compiler from +GNU and Cygnus Solutions), but the result is a Unix-style +installation, not a Window-style installation. To compile with gcc, +follow the instructions in racket\src\README (which contains a short +Windows-specific section). + +With an MSVC-built Racket, compatible extensions can be built with +other compilers. Build with Cygwin and copy the installed racket\lib\gcc +to a MSVC-based build to support Cygwin-built extensions. To support +Borland-built extensions, cd to racket\src\racket\dynsrc and run +mkbordyn.bat (which requires bcc23.exe, of course). + +As always, please report bugs via one of the following: + - DrRacket's "submit bug report" menu (preferred) + - http://bugs.racket-lang.org/ + - the mailing list (racket@list.cs.brown.edu) (last resort) + +-PLT + racket@racket-lang.org + +---------------------------------------------------------------------- +Building Racket and GRacket +---------------------------------------------------------------------- + +If you're using MSVC 8.0 (not Express), and if `devenv.exe' is in your +path, then you can just run + racket\src\worksp\build.bat +from its own directory to perform all steps up to "Versioning", +including the MzCOM and MysterX steps. + +The CGC variants of Racket, MzCOM, GRacket, and MysterX can be built +via Visual Studio projects. The 3m variants are built by a Racket +script that runs the MSVC command-line tools. (See "CGC versus 3m" +in racket\src\README if you don't know about the two variants.) + +The 3m build requires some parts of the CGC build: + racket\src\worksp\racket + racket\src\worksp\wxutils + racket\src\worksp\jpeg + racket\src\worksp\png + racket\src\worksp\zlib +It's simplest to just build the main CGC solutions, which +automatically build all of the above projects, and then build +3m. + +Building RacketCGC and GRacketCGC +-------------------------------- + +The CGC source code for RacketCGC and GRacketCGC is split into several +projects that are grouped into a few solutions. To build the `X' +solution with Visual Studio, open the file racket\src\worksp\X\X.sln. + +To build RacketCGC, build the Racket solution in + racket\src\worksp\racket - makes racket\RacketCGC.exe + + [When you open the solution, it may default to "Debug" + configuration. Switch to "Release" before building.] + +To build GRacketCGC, build the GRacket solution: + racket\src\worksp\gracket - makes racket\GRacketCGC.exe + + [Again, switch to the "Release" configuration if necessary.] + +The build processes for RacketCGC automatically builds + libmzgc - makes racket\lib\libmzgcxxxxxxx.dll and + racket\src\worksp\libmzgc\Release\libmzgcxxxxxxx.lib + libracket - makes racket\lib\libracketxxxxxxx.dll and + racket\src\worksp\mzsrc\Release\mzsrcxxxxxxx.lib + +The build process for GRacketCGC automatically builds + libmzgc - as above + libracket - as above + libgracket - makes racket\lib\libgracketxxxxxxx.dll and + racket\src\worksp\libgracket\Release\libgracketxxxxxxx.lib + wxutils - makes racket\src\worksp\wxutils\Release\wxutils.lib + wxwin - makes racket\src\worksp\wxwin\Release\wxwin.lib + wxs - makes racket\src\worksp\wxs\Release\wxs.lib + wxme - makes racket\src\worksp\wxme\Release\wxme.lib + jpeg - makes racket\src\worksp\jpeg\Release\jpeg.lib + png - makes racket\src\worksp\jpeg\Release\png.lib + zlib - makes racket\src\worksp\jpeg\Release\zlib.lib + +In addition, building RacketCGC executes + racket\src\racket\dynsrc\mkmzdyn.bat +which copies .exp, .obj, and .lib files into racket\lib\, and also copies +DLLs from the "extradlls" directory to to racket\lib\. + +Building Racket3m and GRacket3m +------------------------------ + +After RacketCGC and GRacketCGC are built, you can can build 3m +binaries: + + 1. Ensure that the Visual Studio command-line tools are in your + path. You may need to run "vsvars32.bat" from your Visual Studio + installation, so that PATH and other environment variables are set. + + 2. Change directories to racket\src\worksp\gc2 and run + + ..\..\..\racketcgc.exe -c make.rkt + +The resulting Racket.exe and GRacket.exe will appear in the top-level +"racket" directory, along with DLLs libracket3mxxxxxxx.dll and +libgracket3mxxxxxxx.dll in racket/lib. (There is no corresponding +libmzgc3mxxxxxxx.dll. Instead, it is merged with +libracket3mxxxxxxx.dll.) + +Building Collections and Other Executables +------------------------------------------ + +If you're building from scratch, you'll also want the starter programs +used by the launcher collection to create "raco.exe". Build the +following solutions: + + racket\src\worksp\mzstart - makes racket\collects\launcher\mzstart.exe + racket\src\worksp\mrstart - makes racket\collects\launcher\mrstart.exe + + [The "mzstart" and "mrstart" programs have no CGC versus 3m + distinction.] + +Then, set up all the other executables (besides GRacket[CGC].exe and +Racket[CGC].exe) by running + + racket.exe -l- setup + +This last step makes the .zo files, too. To skip compiling .zos, add +-n to the end of the above command. + +If you've already built before, then this step can be simplied: just +re-run `raco setup', where "raco.exe" was created the first time. + +Versioning +---------- + +[If you're going to build MzCOM and/or MysterX, do that before running + the version-changing script. See instructions below.] + +The obnoxious "xxxxxxx" in the DLL names is a placeholder for a +version number. Embedding a version number in a DLL name appears to +be the simplest and surest way to avoid version confusion. + +For local testing, you can use the "xxxxxxx" libraries directly. For +any binaries that will be distributed, however, the placeholder should +be replaced with a specific version. + +To replace the "xxxxxxx" with a specific version, run + + racket -l setup/winvers + +in a shell. + +The "winvers.rkt" program will have to make a temporary copy of +racket.exe and the "lib" sub-directory (into the temporary +directory), and it will re-launch Racket a couple of times. Every +".exe", ".dll", ".lib", ".def", ".exp", and ".pdb" file within the +"racket" tree is updated to replace "xxxxxxxx" with a specific version +number. + +---------------------------------------------------------------------- +Building MzCOM and MysterX +---------------------------------------------------------------------- + +Beware that MzCOM and MysterX do not build with Express versions of +Visual Studio. Otherwise, building MzCOMCGC and MysterXCGC is similar +to building RacketCGC. Building the 3m variants is a little +different. + +Building MzCOM +-------------- + +To build MzCOMCGC, make the MzCOM solution in + racket\src\worksp\mzcom - makes racket\MzCOMCGC.exe + +Use the "Release" configuration. + +After building MzCOMCGC, you can build the 3m variant by + + 1. Change directories to racket\src\worksp\mzcom and run + + ..\..\..\racketcgc.exe -cu xform.rkt + + 2. Switch to the "3m" configuration in the MzCOM solution + (in Visual Studio). + + 3. Build (in Visual Studio). + +The result is racket\MzCOM.exe. + +Building MysterX +---------------- + +To build MysterXCGC, make the MysterX solution in + racket\src\worksp\libmysterx - makes racket\lib\myssink.dll, + racket\lib\myspage.dll, and mxmain.dll in + collects\mysterx\private\compiled\native\win32\i386 + +Use the "Release" configuration. + +After building MysterXCGC, you can build the 3m variant by + + 1. Change directories to racket\src\worksp\libmysterx and run + + ..\..\..\racketcgc.exe -cu xform.rkt + + 2. Switch to the "3m" configuration in the libmysterx solution + (in Visual Studio). + + 3. Build (in Visual Studio). + +The result is mxmain.dll (no 3m suffix) in + collects\mysterx\private\compiled\native\win32\i386\3m + +---------------------------------------------------------------------- +Finding DLLs +---------------------------------------------------------------------- + +Since the DLLs libracket3mxxxxxxx.dll (or libmzgcxxxxxxx.dll and +libracketxxxxxxx.dll) and libgracket3mxxxxxxx.dll (or +libgracketxxxxxxx.dll) are installed into racket\lib\ instead of just +racket\, the normal search path for DLLs would not find them when running +"Racket.exe" or "GRacket.exe". To find the DLLs, the executables are +"delayload" linked with the DLLs, and the executables explicitly load +the DLLs from racket\lib\ on start-up. + +The relative DLL path is embedded in each executable, and it can be +replaced with a path of up to 512 characters. The path is stored in +the executable in wide-character format, and it is stored immediately +after the wide-character tag "dLl dIRECTORy:" with a wide NUL +terminator. The path can be either absolute or relative; in the latter +case, the relative path is resolved with respect to the +executable. Replacing the first character of the path with "<" +disables the explicit DLL load, so that the DLLs must appear in the +normal DLL search path. + +See also ..\README for information on the embedded "collects" path in +the executables. + +---------------------------------------------------------------------- +Embedding Racket +---------------------------------------------------------------------- + +The Racket DLLs can be used within an embedding application. + +The libraries + + racket\lib\win32\msvc\libracket3mxxxxxxx.lib + racket\lib\win32\msvc\libracketxxxxxxx.lib + racket\lib\win32\msvc\libmzgcxxxxxxx.lib + +which are created by the mzsrc and gc projects, provide linking +information for using the libracket3mxxxxxxx.dll, +libracketxxxxxxx.dll, and libmzgcxxxxxxx.dll DLLs. The versioning +script adjusts the names, as described above. + +See the "Inside Racket" manual for more information about using +these libraries to embed Racket in an application. + + +If you need Racket to link to a DLL-based C library (instead of +statically linking to the C library within the Racket DLL), then +compile Racket with the /MD flag. diff --git a/src/worksp/extradlls/README.TXT b/src/worksp/extradlls/README.TXT index 8e14a8aeec..4fb6fe3e95 100644 --- a/src/worksp/extradlls/README.TXT +++ b/src/worksp/extradlls/README.TXT @@ -1,4 +1,4 @@ -This directory contains extra DLLs that are needed for running -Racket. The DLL files are moved into the Racket/lib folder by - plt/src/racket/dynsrc/mkmzdyn.bat -which is, in turn, called by the MSVC projects. +This directory contains extra DLLs that are needed for running +Racket. The DLL files are moved into the Racket/lib folder by + plt/src/racket/dynsrc/mkmzdyn.bat +which is, in turn, called by the MSVC projects. diff --git a/src/worksp/gc2/make.rkt b/src/worksp/gc2/make.rkt index e6de379690..cc05b6d8d0 100644 --- a/src/worksp/gc2/make.rkt +++ b/src/worksp/gc2/make.rkt @@ -1,505 +1,505 @@ - -#lang scheme/base - -(use-compiled-file-paths null) - -(require mzlib/restart - mzlib/process) - -(define (system- s) - (fprintf (current-error-port) "~a~n" s) - (system s)) - -(define accounting-gc? #t) -(define backtrace-gc? #f) -(define opt-flags "/O2 /Oy-") -(define re:only #f) - -(unless (find-executable-path "cl.exe" #f) - (error (string-append - "Cannot find executable \"cl.exe\".\n" - "You may need to find and run \"vsvars32.bat\"."))) - -(unless (directory-exists? "xsrc") - (make-directory "xsrc")) - -(define srcs - '("salloc" - "bignum" - "bool" - "builtin" - "char" - "complex" - "dynext" - "env" - "error" - "eval" - "file" - "future" - "fun" - "hash" - "jit" - "list" - "module" - "mzrt" - "network" - "numarith" - "number" - "numcomp" - "numstr" - "places" - "port" - "portfun" - "print" - "rational" - "read" - "regexp" - "sema" - "setjmpup" - "string" - "struct" - "symbol" - "syntax" - "stxobj" - "thread" - "type" - "vector")) - -(define common-cpp-defs " /D _CRT_SECURE_NO_DEPRECATE /D _USE_DECLSPECS_FOR_SAL=0 /D _USE_ATTRIBUTES_FOR_SAL=0 ") - -(define (check-timestamp t2 dep) - (when (t2 . > . (current-seconds)) - (fprintf (current-error-port) - "WARNING: timestamp is in the future: ~e\n" - dep))) - -(define (try src deps dest objdest includes use-precomp extra-compile-flags expand-extra-flags msvc-pch indirect?) - (when (or (not re:only) (regexp-match re:only dest)) - (unless (and (file-exists? dest) - (let ([t (file-or-directory-modify-seconds dest)]) - (andmap - (lambda (dep) - (let ([dep (cond - [(bytes? dep) (bytes->path dep)] - [else dep])]) - (let ([t2 (file-or-directory-modify-seconds dep)]) - (check-timestamp t2 dep) - (> t t2)))) - (append deps - (if use-precomp (list use-precomp) null) - (let ([deps (path-replace-suffix dest #".sdep")]) - (if (file-exists? deps) - (with-input-from-file deps read) - null)))))) - (unless (parameterize - ([use-compiled-file-paths (list "compiled")]) - (restart-mzscheme #() (lambda (x) x) - (list->vector - (append - (list "-u" - "../../racket/gc2/xform.rkt" - "--setup" - ".") - (if objdest - (if use-precomp - (list "--precompiled" use-precomp) - null) - (list "--precompile")) - (if indirect? - '("--indirect") - null) - (list - "--depends" - "--cpp" - (format "cl.exe /MT /E ~a ~a ~a" - common-cpp-defs - expand-extra-flags - includes) - "-o" - dest - src))) - void)) - (when (file-exists? dest) - (delete-file dest)) - (error "error xforming"))) - (when objdest - (c-compile dest objdest null (string-append - extra-compile-flags - common-cpp-defs - (if msvc-pch - (format " /Fp~a" msvc-pch) - "")))))) - -(define (c-compile c o deps flags) - (unless (and (file-exists? o) - (let ([t (file-or-directory-modify-seconds o)]) - (and (>= t (file-or-directory-modify-seconds c)) - (andmap - (lambda (f) - (let ([t2 (file-or-directory-modify-seconds f)]) - (check-timestamp t2 f) - (>= t t2))) - deps)))) - (unless (system- (format "cl.exe ~a /MT /Zi ~a /c ~a /Fdxsrc/ /Fo~a" flags opt-flags c o)) - (error "failed compile")))) - -(define common-deps (list "../../racket/gc2/xform.rkt" - "../../racket/gc2/xform-mod.rkt")) - -(define (find-obj f d) (format "../~a/release/~a.obj" d f)) - -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define mz-inc "/I ../../racket/include /I .. ") - -(try "precomp.c" (list* "../../racket/src/schvers.h" - common-deps) - "xsrc/precomp.h" #f - (string-append mz-inc "/I ../../racket/src") - #f "" "" #f #f) - -(for-each - (lambda (x) - (try (format "../../racket/src/~a.c" x) - (list* (format "../../racket/src/~a.c" x) - common-deps) - (format "xsrc/~a.c" x) - (format "xsrc/~a.obj" x) - mz-inc - "xsrc/precomp.h" - "" - (string-append "/D LIBMZ_EXPORTS " - (if accounting-gc? - "/D NEWGC_BTC_ACCOUNT " - "") - (if backtrace-gc? - "/D MZ_GC_BACKTRACE " - "")) - "mz.pch" - #f)) - srcs) - -(try "../../racket/main.c" - (list* "../../racket/main.c" - common-deps) - "xsrc/main.c" - "xsrc/main.obj" - mz-inc - #f - "" - "" - #f - #t) - -(try "../../foreign/foreign.c" - (list* "../../foreign/foreign.c" - common-deps) - "xsrc/foreign.c" - "xsrc/foreign.obj" - (string-append - mz-inc - "/I../../foreign/libffi_msvc " - "/I../../racket/src ") - #f - "" - "" - #f - #f) - -(c-compile "../../racket/gc2/gc2.c" "xsrc/gc2.obj" - (append - (list "../mzconfig.h") - (map (lambda (f) (build-path "../../racket/" f)) - '("include/scheme.h" - "include/schthread.h" - "src/schpriv.h" - "src/stypes.h")) - (map (lambda (f) (build-path "../../racket/gc2/" f)) - '("gc2.c" - "newgc.c" - "vm_win.c" - "sighand.c" - "msgprint.c" - "gc2.h" - "gc2_obj.h"))) - (string-append - "/D GC2_AS_EXPORT " - "/D NEWGC_BTC_ACCOUNT " - (if backtrace-gc? - "/D MZ_GC_BACKTRACE " - "") - mz-inc)) -(c-compile "../../racket/src/mzsj86.c" "xsrc/mzsj86.obj" '() mz-inc) - -(define dll "../../../lib/libracket3mxxxxxxx.dll") -(define exe "../../../Racket.exe") - -(define libs "kernel32.lib user32.lib ws2_32.lib shell32.lib advapi32.lib") - -(define (link-dll objs delayloads sys-libs dll link-options exe?) - (let ([ms (if (file-exists? dll) - (file-or-directory-modify-seconds dll) - 0)]) - (when (ormap - (lambda (f) - (> (file-or-directory-modify-seconds f) - ms)) - objs) - (unless (system- (format "cl.exe ~a /MT /Zi /Fe~a unicows.lib ~a ~a /link ~a~a~a" - (if exe? "" "/LD /DLL") - dll - (let loop ([objs (append objs sys-libs)]) - (if (null? objs) - "" - (string-append - (car objs) - " " - (loop (cdr objs))))) - libs - (let loop ([delayloads delayloads]) - (if (null? delayloads) - "" - (string-append - " /DELAYLOAD:" - (car delayloads) - " " - (loop (cdr delayloads))))) - link-options - (let ([s (regexp-match "^(.*)/([a-z0-9]*)[.]dll$" dll)]) - (if s - (format " /IMPLIB:~a/msvc/~a.lib" - (cadr s) (caddr s)) - "")))) - (error 'winmake "~a link failed" (if exe? "EXE" "DLL")))))) - -(c-compile "../racket/uniplt.c" - "xsrc/uniplt.obj" - null - " -Dwx_msw") - -(let ([objs (list* - "../libracket/Release/uniplt.obj" - "xsrc/gc2.obj" - "xsrc/mzsj86.obj" - "xsrc/foreign.obj" - (find-obj "gmp" "libracket") - (find-obj "ffi" "libracket") - (find-obj "win32" "libracket") - (find-obj "prep_cif" "libracket") - (find-obj "types" "libracket") - (map - (lambda (n) - (format "xsrc/~a.obj" n)) - srcs))]) - (link-dll objs null null dll "" #f)) - -(define (check-rc res rc) - (unless (and (file-exists? res) - (>= (file-or-directory-modify-seconds res) - (file-or-directory-modify-seconds rc))) - (system- (string-append - "rc /l 0x409 /I ../../wxwindow/include/msw /I ../../wxwindow/contrib/fafa " - (format "/fo~a ~a" res rc))))) - -(check-rc "racket.res" "../racket/racket.rc") - -(let ([objs (list - "racket.res" - "xsrc/main.obj" - "xsrc/uniplt.obj" - "../../../lib/msvc/libracket3mxxxxxxx.lib")]) - (link-dll objs - '("libracket3mxxxxxxx.dll") - '("delayimp.lib") - exe "" #t)) - -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define wx-inc (string-append "/I ../../racket/include " - "/I .. " - "/I ../../racket/gc2 " - "/I ../../wxwindow/include/msw " - "/I ../../wxwindow/include/base " - "/I ../../gracket/wxme " - "/I ../../wxwindow/contrib/wxxpm/libxpm.34b/lib " - "/I ../../wxWindow/contrib/fafa " - "/I ../../wxcommon/jpeg /I ../jpeg /I ../../wxcommon/zlib ")) -(try "wxprecomp.cxx" (list* "../../racket/src/schvers.h" common-deps) - "xsrc/wxprecomp.h" #f wx-inc #f "" "-DGC2_AS_IMPORT" #f #f) - -(define (wx-try base proj x use-precomp? suffix indirect?) - (let ([cxx-file (format "../../~a/~a.~a" base x suffix)]) - (try cxx-file - (list* cxx-file - common-deps) - (format "xsrc/~a.~a" x suffix) - (format "xsrc/~a.obj" x) - wx-inc - (and use-precomp? "xsrc/wxprecomp.h") - "-DGC2_JUST_MACROS /FI../../../racket/gc2/gc2.h" - (string-append "-DGC2_AS_IMPORT" - (if backtrace-gc? - " /D MZ_GC_BACKTRACE" - "")) - "wx.pch" - indirect?))) - -(define wxwin-base-srcs - '("wb_canvs" - "wb_cmdlg" - "wb_data" - "wb_dc" - "wb_dialg" - "wb_frame" - "wb_gdi" - "wb_hash" - "wb_item" - "wb_list" - "wb_main" - "wb_obj" - "wb_panel" - "wb_print" - "wb_ps" - "wb_stdev" - "wb_sysev" - "wb_timer" - "wb_types" - "wb_utils" - "wb_win")) - -(for-each (lambda (x) - (wx-try "wxwindow/src/base" "wxwin" x #t "cxx" #f)) - wxwin-base-srcs) - -(define wxwin-msw-srcs - '("wx_buttn" - "wx_canvs" - "wx_check" - "wx_choic" - "wx_clipb" - "wx_cmdlg" - "wx_dc" - "wx_dialg" - "wx_frame" - "wx_gauge" - "wx_gbox" - "wx_gdi" - "wx_graph_glue" - "wx_item" - "wx_lbox" - "wx_main" - "wx_menu" - "wx_messg" - "wx_panel" - "wx_pdf" - "wx_rbox" - "wx_slidr" - "wx_tabc" - "wx_timer" - "wx_utils" - "wx_win" - "wximgfil")) - -(for-each (lambda (x) - (wx-try "wxwindow/src/msw" "wxwin" x #t "cxx" #f)) - wxwin-msw-srcs) - -(define wxs-srcs - '("wxs_bmap" - "wxs_butn" - "wxs_chce" - "wxs_ckbx" - "wxs_cnvs" - "wxs_dc" - "wxs_evnt" - "wxs_fram" - "wxs_gage" - "wxs_gdi" - "wxs_glob" - "wxs_item" - "wxs_lbox" - "wxs_menu" - "wxs_misc" - "wxs_obj" - "wxs_panl" - "wxs_rado" - "wxs_slid" - "wxs_tabc" - "wxs_win" - "wxscheme")) - -(for-each (lambda (x) - (wx-try "gracket/wxs" "wxs" x #t "cxx" #f)) - wxs-srcs) - -(define gracket-srcs - '("gracket" - "gracketmsw")) - -(for-each (lambda (x) - (wx-try "gracket" "libgracket" x #t "cxx" #f)) - gracket-srcs) - -(wx-try "wxcommon" "wxme" "wxJPEG" #t "cxx" #f) -(wx-try "racket/utils" "wxme" "xcglue" #f "c" #f) -(c-compile "../../wxcommon/wxGC.cxx" - "xsrc/wxGC.obj" - null - (string-append wx-inc " -DMZ_PRECISE_GC -DGC2_AS_IMPORT -Dwx_msw")) - -(let ([objs (append (list - "xsrc/uniplt.obj" - "xsrc/wxGC.obj" - "xsrc/wxJPEG.obj" - "xsrc/xcglue.obj") - (map - (lambda (n) - (format "xsrc/~a.obj" n)) - (append wxwin-base-srcs - wxwin-msw-srcs - wxs-srcs - gracket-srcs)))] - [libs (list - "../../../lib/msvc/libracket3mxxxxxxx.lib" - "../wxutils/Release/wxutils.lib" - "../jpeg/Release/jpeg.lib" - "../png/Release/png.lib" - "../zlib/Release/zlib.lib")] - [win-libs (list - "comctl32.lib" "glu32.lib" "opengl32.lib" - "gdi32.lib" "comdlg32.lib" "advapi32.lib" - "shell32.lib" "ole32.lib" "oleaut32.lib" - "winmm.lib")]) - (link-dll (append objs libs) null win-libs "../../../lib/libgracket3mxxxxxxx.dll" "" #f)) - -(wx-try "gracket" "gracket" "grmain" #f "cxx" #t) - -(check-rc "gracket.res" "../gracket/gracket.rc") - -(let ([objs (list - "gracket.res" - "xsrc/grmain.obj" - "xsrc/uniplt.obj" - "../../../lib/msvc/libracket3mxxxxxxx.lib" - "../../../lib/msvc/libgracket3mxxxxxxx.lib")]) - (link-dll objs - '("libracket3mxxxxxxx.dll" - "libgracket3mxxxxxxx.dll") - '("advapi32.lib" - "delayimp.lib") - "../../../GRacket.exe" " /subsystem:windows" #t)) - -(system- "cl.exe /MT /O2 /DMZ_PRECISE_GC /I../../racket/include /I.. /c ../../racket/dynsrc/mzdyn.c /Fomzdyn3m.obj") -(system- "lib.exe -def:../../racket/dynsrc/mzdyn.def -out:mzdyn3m.lib") - -(define (copy-file/diff src dest) - (unless (and (file-exists? dest) - (string=? (with-input-from-file src (lambda () (read-string (file-size src)))) - (with-input-from-file dest (lambda () (read-string (file-size dest)))))) - (printf "Updating ~a~n" dest) - (when (file-exists? dest) (delete-file dest)) - (copy-file src dest))) - -(copy-file/diff "mzdyn3m.exp" "../../../lib/msvc/mzdyn3m.exp") -(copy-file/diff "mzdyn3m.obj" "../../../lib/msvc/mzdyn3m.obj") - + +#lang scheme/base + +(use-compiled-file-paths null) + +(require mzlib/restart + mzlib/process) + +(define (system- s) + (fprintf (current-error-port) "~a~n" s) + (system s)) + +(define accounting-gc? #t) +(define backtrace-gc? #f) +(define opt-flags "/O2 /Oy-") +(define re:only #f) + +(unless (find-executable-path "cl.exe" #f) + (error (string-append + "Cannot find executable \"cl.exe\".\n" + "You may need to find and run \"vsvars32.bat\"."))) + +(unless (directory-exists? "xsrc") + (make-directory "xsrc")) + +(define srcs + '("salloc" + "bignum" + "bool" + "builtin" + "char" + "complex" + "dynext" + "env" + "error" + "eval" + "file" + "future" + "fun" + "hash" + "jit" + "list" + "module" + "mzrt" + "network" + "numarith" + "number" + "numcomp" + "numstr" + "places" + "port" + "portfun" + "print" + "rational" + "read" + "regexp" + "sema" + "setjmpup" + "string" + "struct" + "symbol" + "syntax" + "stxobj" + "thread" + "type" + "vector")) + +(define common-cpp-defs " /D _CRT_SECURE_NO_DEPRECATE /D _USE_DECLSPECS_FOR_SAL=0 /D _USE_ATTRIBUTES_FOR_SAL=0 ") + +(define (check-timestamp t2 dep) + (when (t2 . > . (current-seconds)) + (fprintf (current-error-port) + "WARNING: timestamp is in the future: ~e\n" + dep))) + +(define (try src deps dest objdest includes use-precomp extra-compile-flags expand-extra-flags msvc-pch indirect?) + (when (or (not re:only) (regexp-match re:only dest)) + (unless (and (file-exists? dest) + (let ([t (file-or-directory-modify-seconds dest)]) + (andmap + (lambda (dep) + (let ([dep (cond + [(bytes? dep) (bytes->path dep)] + [else dep])]) + (let ([t2 (file-or-directory-modify-seconds dep)]) + (check-timestamp t2 dep) + (> t t2)))) + (append deps + (if use-precomp (list use-precomp) null) + (let ([deps (path-replace-suffix dest #".sdep")]) + (if (file-exists? deps) + (with-input-from-file deps read) + null)))))) + (unless (parameterize + ([use-compiled-file-paths (list "compiled")]) + (restart-mzscheme #() (lambda (x) x) + (list->vector + (append + (list "-u" + "../../racket/gc2/xform.rkt" + "--setup" + ".") + (if objdest + (if use-precomp + (list "--precompiled" use-precomp) + null) + (list "--precompile")) + (if indirect? + '("--indirect") + null) + (list + "--depends" + "--cpp" + (format "cl.exe /MT /E ~a ~a ~a" + common-cpp-defs + expand-extra-flags + includes) + "-o" + dest + src))) + void)) + (when (file-exists? dest) + (delete-file dest)) + (error "error xforming"))) + (when objdest + (c-compile dest objdest null (string-append + extra-compile-flags + common-cpp-defs + (if msvc-pch + (format " /Fp~a" msvc-pch) + "")))))) + +(define (c-compile c o deps flags) + (unless (and (file-exists? o) + (let ([t (file-or-directory-modify-seconds o)]) + (and (>= t (file-or-directory-modify-seconds c)) + (andmap + (lambda (f) + (let ([t2 (file-or-directory-modify-seconds f)]) + (check-timestamp t2 f) + (>= t t2))) + deps)))) + (unless (system- (format "cl.exe ~a /MT /Zi ~a /c ~a /Fdxsrc/ /Fo~a" flags opt-flags c o)) + (error "failed compile")))) + +(define common-deps (list "../../racket/gc2/xform.rkt" + "../../racket/gc2/xform-mod.rkt")) + +(define (find-obj f d) (format "../~a/release/~a.obj" d f)) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define mz-inc "/I ../../racket/include /I .. ") + +(try "precomp.c" (list* "../../racket/src/schvers.h" + common-deps) + "xsrc/precomp.h" #f + (string-append mz-inc "/I ../../racket/src") + #f "" "" #f #f) + +(for-each + (lambda (x) + (try (format "../../racket/src/~a.c" x) + (list* (format "../../racket/src/~a.c" x) + common-deps) + (format "xsrc/~a.c" x) + (format "xsrc/~a.obj" x) + mz-inc + "xsrc/precomp.h" + "" + (string-append "/D LIBMZ_EXPORTS " + (if accounting-gc? + "/D NEWGC_BTC_ACCOUNT " + "") + (if backtrace-gc? + "/D MZ_GC_BACKTRACE " + "")) + "mz.pch" + #f)) + srcs) + +(try "../../racket/main.c" + (list* "../../racket/main.c" + common-deps) + "xsrc/main.c" + "xsrc/main.obj" + mz-inc + #f + "" + "" + #f + #t) + +(try "../../foreign/foreign.c" + (list* "../../foreign/foreign.c" + common-deps) + "xsrc/foreign.c" + "xsrc/foreign.obj" + (string-append + mz-inc + "/I../../foreign/libffi_msvc " + "/I../../racket/src ") + #f + "" + "" + #f + #f) + +(c-compile "../../racket/gc2/gc2.c" "xsrc/gc2.obj" + (append + (list "../mzconfig.h") + (map (lambda (f) (build-path "../../racket/" f)) + '("include/scheme.h" + "include/schthread.h" + "src/schpriv.h" + "src/stypes.h")) + (map (lambda (f) (build-path "../../racket/gc2/" f)) + '("gc2.c" + "newgc.c" + "vm_win.c" + "sighand.c" + "msgprint.c" + "gc2.h" + "gc2_obj.h"))) + (string-append + "/D GC2_AS_EXPORT " + "/D NEWGC_BTC_ACCOUNT " + (if backtrace-gc? + "/D MZ_GC_BACKTRACE " + "") + mz-inc)) +(c-compile "../../racket/src/mzsj86.c" "xsrc/mzsj86.obj" '() mz-inc) + +(define dll "../../../lib/libracket3mxxxxxxx.dll") +(define exe "../../../Racket.exe") + +(define libs "kernel32.lib user32.lib ws2_32.lib shell32.lib advapi32.lib") + +(define (link-dll objs delayloads sys-libs dll link-options exe?) + (let ([ms (if (file-exists? dll) + (file-or-directory-modify-seconds dll) + 0)]) + (when (ormap + (lambda (f) + (> (file-or-directory-modify-seconds f) + ms)) + objs) + (unless (system- (format "cl.exe ~a /MT /Zi /Fe~a unicows.lib ~a ~a /link ~a~a~a" + (if exe? "" "/LD /DLL") + dll + (let loop ([objs (append objs sys-libs)]) + (if (null? objs) + "" + (string-append + (car objs) + " " + (loop (cdr objs))))) + libs + (let loop ([delayloads delayloads]) + (if (null? delayloads) + "" + (string-append + " /DELAYLOAD:" + (car delayloads) + " " + (loop (cdr delayloads))))) + link-options + (let ([s (regexp-match "^(.*)/([a-z0-9]*)[.]dll$" dll)]) + (if s + (format " /IMPLIB:~a/msvc/~a.lib" + (cadr s) (caddr s)) + "")))) + (error 'winmake "~a link failed" (if exe? "EXE" "DLL")))))) + +(c-compile "../racket/uniplt.c" + "xsrc/uniplt.obj" + null + " -Dwx_msw") + +(let ([objs (list* + "../libracket/Release/uniplt.obj" + "xsrc/gc2.obj" + "xsrc/mzsj86.obj" + "xsrc/foreign.obj" + (find-obj "gmp" "libracket") + (find-obj "ffi" "libracket") + (find-obj "win32" "libracket") + (find-obj "prep_cif" "libracket") + (find-obj "types" "libracket") + (map + (lambda (n) + (format "xsrc/~a.obj" n)) + srcs))]) + (link-dll objs null null dll "" #f)) + +(define (check-rc res rc) + (unless (and (file-exists? res) + (>= (file-or-directory-modify-seconds res) + (file-or-directory-modify-seconds rc))) + (system- (string-append + "rc /l 0x409 /I ../../wxwindow/include/msw /I ../../wxwindow/contrib/fafa " + (format "/fo~a ~a" res rc))))) + +(check-rc "racket.res" "../racket/racket.rc") + +(let ([objs (list + "racket.res" + "xsrc/main.obj" + "xsrc/uniplt.obj" + "../../../lib/msvc/libracket3mxxxxxxx.lib")]) + (link-dll objs + '("libracket3mxxxxxxx.dll") + '("delayimp.lib") + exe "" #t)) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define wx-inc (string-append "/I ../../racket/include " + "/I .. " + "/I ../../racket/gc2 " + "/I ../../wxwindow/include/msw " + "/I ../../wxwindow/include/base " + "/I ../../gracket/wxme " + "/I ../../wxwindow/contrib/wxxpm/libxpm.34b/lib " + "/I ../../wxWindow/contrib/fafa " + "/I ../../wxcommon/jpeg /I ../jpeg /I ../../wxcommon/zlib ")) +(try "wxprecomp.cxx" (list* "../../racket/src/schvers.h" common-deps) + "xsrc/wxprecomp.h" #f wx-inc #f "" "-DGC2_AS_IMPORT" #f #f) + +(define (wx-try base proj x use-precomp? suffix indirect?) + (let ([cxx-file (format "../../~a/~a.~a" base x suffix)]) + (try cxx-file + (list* cxx-file + common-deps) + (format "xsrc/~a.~a" x suffix) + (format "xsrc/~a.obj" x) + wx-inc + (and use-precomp? "xsrc/wxprecomp.h") + "-DGC2_JUST_MACROS /FI../../../racket/gc2/gc2.h" + (string-append "-DGC2_AS_IMPORT" + (if backtrace-gc? + " /D MZ_GC_BACKTRACE" + "")) + "wx.pch" + indirect?))) + +(define wxwin-base-srcs + '("wb_canvs" + "wb_cmdlg" + "wb_data" + "wb_dc" + "wb_dialg" + "wb_frame" + "wb_gdi" + "wb_hash" + "wb_item" + "wb_list" + "wb_main" + "wb_obj" + "wb_panel" + "wb_print" + "wb_ps" + "wb_stdev" + "wb_sysev" + "wb_timer" + "wb_types" + "wb_utils" + "wb_win")) + +(for-each (lambda (x) + (wx-try "wxwindow/src/base" "wxwin" x #t "cxx" #f)) + wxwin-base-srcs) + +(define wxwin-msw-srcs + '("wx_buttn" + "wx_canvs" + "wx_check" + "wx_choic" + "wx_clipb" + "wx_cmdlg" + "wx_dc" + "wx_dialg" + "wx_frame" + "wx_gauge" + "wx_gbox" + "wx_gdi" + "wx_graph_glue" + "wx_item" + "wx_lbox" + "wx_main" + "wx_menu" + "wx_messg" + "wx_panel" + "wx_pdf" + "wx_rbox" + "wx_slidr" + "wx_tabc" + "wx_timer" + "wx_utils" + "wx_win" + "wximgfil")) + +(for-each (lambda (x) + (wx-try "wxwindow/src/msw" "wxwin" x #t "cxx" #f)) + wxwin-msw-srcs) + +(define wxs-srcs + '("wxs_bmap" + "wxs_butn" + "wxs_chce" + "wxs_ckbx" + "wxs_cnvs" + "wxs_dc" + "wxs_evnt" + "wxs_fram" + "wxs_gage" + "wxs_gdi" + "wxs_glob" + "wxs_item" + "wxs_lbox" + "wxs_menu" + "wxs_misc" + "wxs_obj" + "wxs_panl" + "wxs_rado" + "wxs_slid" + "wxs_tabc" + "wxs_win" + "wxscheme")) + +(for-each (lambda (x) + (wx-try "gracket/wxs" "wxs" x #t "cxx" #f)) + wxs-srcs) + +(define gracket-srcs + '("gracket" + "gracketmsw")) + +(for-each (lambda (x) + (wx-try "gracket" "libgracket" x #t "cxx" #f)) + gracket-srcs) + +(wx-try "wxcommon" "wxme" "wxJPEG" #t "cxx" #f) +(wx-try "racket/utils" "wxme" "xcglue" #f "c" #f) +(c-compile "../../wxcommon/wxGC.cxx" + "xsrc/wxGC.obj" + null + (string-append wx-inc " -DMZ_PRECISE_GC -DGC2_AS_IMPORT -Dwx_msw")) + +(let ([objs (append (list + "xsrc/uniplt.obj" + "xsrc/wxGC.obj" + "xsrc/wxJPEG.obj" + "xsrc/xcglue.obj") + (map + (lambda (n) + (format "xsrc/~a.obj" n)) + (append wxwin-base-srcs + wxwin-msw-srcs + wxs-srcs + gracket-srcs)))] + [libs (list + "../../../lib/msvc/libracket3mxxxxxxx.lib" + "../wxutils/Release/wxutils.lib" + "../jpeg/Release/jpeg.lib" + "../png/Release/png.lib" + "../zlib/Release/zlib.lib")] + [win-libs (list + "comctl32.lib" "glu32.lib" "opengl32.lib" + "gdi32.lib" "comdlg32.lib" "advapi32.lib" + "shell32.lib" "ole32.lib" "oleaut32.lib" + "winmm.lib")]) + (link-dll (append objs libs) null win-libs "../../../lib/libgracket3mxxxxxxx.dll" "" #f)) + +(wx-try "gracket" "gracket" "grmain" #f "cxx" #t) + +(check-rc "gracket.res" "../gracket/gracket.rc") + +(let ([objs (list + "gracket.res" + "xsrc/grmain.obj" + "xsrc/uniplt.obj" + "../../../lib/msvc/libracket3mxxxxxxx.lib" + "../../../lib/msvc/libgracket3mxxxxxxx.lib")]) + (link-dll objs + '("libracket3mxxxxxxx.dll" + "libgracket3mxxxxxxx.dll") + '("advapi32.lib" + "delayimp.lib") + "../../../GRacket.exe" " /subsystem:windows" #t)) + +(system- "cl.exe /MT /O2 /DMZ_PRECISE_GC /I../../racket/include /I.. /c ../../racket/dynsrc/mzdyn.c /Fomzdyn3m.obj") +(system- "lib.exe -def:../../racket/dynsrc/mzdyn.def -out:mzdyn3m.lib") + +(define (copy-file/diff src dest) + (unless (and (file-exists? dest) + (string=? (with-input-from-file src (lambda () (read-string (file-size src)))) + (with-input-from-file dest (lambda () (read-string (file-size dest)))))) + (printf "Updating ~a~n" dest) + (when (file-exists? dest) (delete-file dest)) + (copy-file src dest))) + +(copy-file/diff "mzdyn3m.exp" "../../../lib/msvc/mzdyn3m.exp") +(copy-file/diff "mzdyn3m.obj" "../../../lib/msvc/mzdyn3m.obj") + diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index ecbc012109..fd8783245a 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,22 +1,22 @@ - - - -GRacket - Graphical Racket. - - - - - - + + + +GRacket - Graphical Racket. + + + + + + diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index 2e7aeb2802..d73b9b154b 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -1,55 +1,55 @@ -//Microsoft Developer Studio generated resource script. -// -#include "wx.rc" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -WXSTD_FRAME ICON DISCARDABLE "gracket.ico" -WXSTD_MDICHILDFRAME ICON DISCARDABLE "gracket.ico" -WXSTD_MDIPARENTFRAME ICON DISCARDABLE "gracket.ico" -APPLICATION ICON DISCARDABLE "gracket.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,2,5,10 - PRODUCTVERSION 4,2,5,10 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "PLT Scheme Inc.\0" - VALUE "FileDescription", "Racket GUI application\0" - VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "4, 2, 5, 10\0" - VALUE "LegalCopyright", "Copyright 1995-2010\0" - VALUE "OriginalFilename", "GRacket.exe\0" - VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "4, 2, 5, 10\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gracket.manifest" +//Microsoft Developer Studio generated resource script. +// +#include "wx.rc" + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +WXSTD_FRAME ICON DISCARDABLE "gracket.ico" +WXSTD_MDICHILDFRAME ICON DISCARDABLE "gracket.ico" +WXSTD_MDIPARENTFRAME ICON DISCARDABLE "gracket.ico" +APPLICATION ICON DISCARDABLE "gracket.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 4,2,5,14 + PRODUCTVERSION 4,2,5,14 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "PLT Scheme Inc.\0" + VALUE "FileDescription", "Racket GUI application\0" + VALUE "InternalName", "GRacket\0" + VALUE "FileVersion", "4, 2, 5, 14\0" + VALUE "LegalCopyright", "Copyright 1995-2010\0" + VALUE "OriginalFilename", "GRacket.exe\0" + VALUE "ProductName", "Racket\0" + VALUE "ProductVersion", "4, 2, 5, 14\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gracket.manifest" diff --git a/src/worksp/gracket/gracket.sln b/src/worksp/gracket/gracket.sln index 00ffad4470..258cc729a5 100644 --- a/src/worksp/gracket/gracket.sln +++ b/src/worksp/gracket/gracket.sln @@ -1,98 +1,98 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GRacket", "gracket.vcproj", "{D59A2B28-330B-41F5-8261-F5BC1019E163}" - ProjectSection(ProjectDependencies) = postProject - {81BD2D42-F150-493D-94BA-88585B202789} = {81BD2D42-F150-493D-94BA-88585B202789} - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} = {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgracket", "..\libgracket\libgracket.vcproj", "{81BD2D42-F150-493D-94BA-88585B202789}" - ProjectSection(ProjectDependencies) = postProject - {B9FC613A-B427-4DB5-B1E3-7673D384ECE3} = {B9FC613A-B427-4DB5-B1E3-7673D384ECE3} - {5386B148-05B4-483B-B144-C3E2A6E15C78} = {5386B148-05B4-483B-B144-C3E2A6E15C78} - {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3} = {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3} - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} = {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} - {8CE7DC81-695B-436B-AA96-2D753846AFE5} = {8CE7DC81-695B-436B-AA96-2D753846AFE5} - {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA} = {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA} - {1549C7C5-AF41-43BE-B905-BA6374FE6BEC} = {1549C7C5-AF41-43BE-B905-BA6374FE6BEC} - {31231DD7-4B8F-4E46-A747-81E41AFE04B5} = {31231DD7-4B8F-4E46-A747-81E41AFE04B5} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libracket", "..\libracket\libracket.vcproj", "{A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}" - ProjectSection(ProjectDependencies) = postProject - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmzgc", "..\libmzgc\libmzgc.vcproj", "{66548E7B-294E-40EF-B7C0-C8D6D7E6234F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\jpeg\jpeg.vcproj", "{1549C7C5-AF41-43BE-B905-BA6374FE6BEC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\png\png.vcproj", "{85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxme", "..\wxme\wxme.vcproj", "{1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxs", "..\wxs\wxs.vcproj", "{B9FC613A-B427-4DB5-B1E3-7673D384ECE3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxutils", "..\wxutils\wxutils.vcproj", "{31231DD7-4B8F-4E46-A747-81E41AFE04B5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxwin", "..\wxwin\wxwin.vcproj", "{5386B148-05B4-483B-B144-C3E2A6E15C78}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\zlib\zlib.vcproj", "{8CE7DC81-695B-436B-AA96-2D753846AFE5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release|Win32 = Release|Win32 - Debug|Win32 = Debug|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D59A2B28-330B-41F5-8261-F5BC1019E163}.Debug|Win32.ActiveCfg = Debug|Win32 - {D59A2B28-330B-41F5-8261-F5BC1019E163}.Debug|Win32.Build.0 = Debug|Win32 - {D59A2B28-330B-41F5-8261-F5BC1019E163}.Release|Win32.ActiveCfg = Release|Win32 - {D59A2B28-330B-41F5-8261-F5BC1019E163}.Release|Win32.Build.0 = Release|Win32 - {81BD2D42-F150-493D-94BA-88585B202789}.Debug|Win32.ActiveCfg = Debug|Win32 - {81BD2D42-F150-493D-94BA-88585B202789}.Debug|Win32.Build.0 = Debug|Win32 - {81BD2D42-F150-493D-94BA-88585B202789}.Release|Win32.ActiveCfg = Release|Win32 - {81BD2D42-F150-493D-94BA-88585B202789}.Release|Win32.Build.0 = Release|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.ActiveCfg = Debug|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.Build.0 = Debug|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.ActiveCfg = Release|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.Build.0 = Release|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.ActiveCfg = Debug|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.Build.0 = Debug|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.ActiveCfg = Release|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.Build.0 = Release|Win32 - {1549C7C5-AF41-43BE-B905-BA6374FE6BEC}.Debug|Win32.ActiveCfg = Debug|Win32 - {1549C7C5-AF41-43BE-B905-BA6374FE6BEC}.Debug|Win32.Build.0 = Debug|Win32 - {1549C7C5-AF41-43BE-B905-BA6374FE6BEC}.Release|Win32.ActiveCfg = Release|Win32 - {1549C7C5-AF41-43BE-B905-BA6374FE6BEC}.Release|Win32.Build.0 = Release|Win32 - {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}.Debug|Win32.Build.0 = Debug|Win32 - {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}.Release|Win32.ActiveCfg = Release|Win32 - {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}.Release|Win32.Build.0 = Release|Win32 - {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}.Debug|Win32.ActiveCfg = Debug|Win32 - {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}.Debug|Win32.Build.0 = Debug|Win32 - {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}.Release|Win32.ActiveCfg = Release|Win32 - {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}.Release|Win32.Build.0 = Release|Win32 - {B9FC613A-B427-4DB5-B1E3-7673D384ECE3}.Debug|Win32.ActiveCfg = Debug|Win32 - {B9FC613A-B427-4DB5-B1E3-7673D384ECE3}.Debug|Win32.Build.0 = Debug|Win32 - {B9FC613A-B427-4DB5-B1E3-7673D384ECE3}.Release|Win32.ActiveCfg = Release|Win32 - {B9FC613A-B427-4DB5-B1E3-7673D384ECE3}.Release|Win32.Build.0 = Release|Win32 - {31231DD7-4B8F-4E46-A747-81E41AFE04B5}.Debug|Win32.ActiveCfg = Debug|Win32 - {31231DD7-4B8F-4E46-A747-81E41AFE04B5}.Debug|Win32.Build.0 = Debug|Win32 - {31231DD7-4B8F-4E46-A747-81E41AFE04B5}.Release|Win32.ActiveCfg = Release|Win32 - {31231DD7-4B8F-4E46-A747-81E41AFE04B5}.Release|Win32.Build.0 = Release|Win32 - {5386B148-05B4-483B-B144-C3E2A6E15C78}.Debug|Win32.ActiveCfg = Debug|Win32 - {5386B148-05B4-483B-B144-C3E2A6E15C78}.Debug|Win32.Build.0 = Debug|Win32 - {5386B148-05B4-483B-B144-C3E2A6E15C78}.Release|Win32.ActiveCfg = Release|Win32 - {5386B148-05B4-483B-B144-C3E2A6E15C78}.Release|Win32.Build.0 = Release|Win32 - {8CE7DC81-695B-436B-AA96-2D753846AFE5}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CE7DC81-695B-436B-AA96-2D753846AFE5}.Debug|Win32.Build.0 = Debug|Win32 - {8CE7DC81-695B-436B-AA96-2D753846AFE5}.Release|Win32.ActiveCfg = Release|Win32 - {8CE7DC81-695B-436B-AA96-2D753846AFE5}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GRacket", "gracket.vcproj", "{D59A2B28-330B-41F5-8261-F5BC1019E163}" + ProjectSection(ProjectDependencies) = postProject + {81BD2D42-F150-493D-94BA-88585B202789} = {81BD2D42-F150-493D-94BA-88585B202789} + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} = {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgracket", "..\libgracket\libgracket.vcproj", "{81BD2D42-F150-493D-94BA-88585B202789}" + ProjectSection(ProjectDependencies) = postProject + {B9FC613A-B427-4DB5-B1E3-7673D384ECE3} = {B9FC613A-B427-4DB5-B1E3-7673D384ECE3} + {5386B148-05B4-483B-B144-C3E2A6E15C78} = {5386B148-05B4-483B-B144-C3E2A6E15C78} + {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3} = {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3} + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} = {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} + {8CE7DC81-695B-436B-AA96-2D753846AFE5} = {8CE7DC81-695B-436B-AA96-2D753846AFE5} + {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA} = {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA} + {1549C7C5-AF41-43BE-B905-BA6374FE6BEC} = {1549C7C5-AF41-43BE-B905-BA6374FE6BEC} + {31231DD7-4B8F-4E46-A747-81E41AFE04B5} = {31231DD7-4B8F-4E46-A747-81E41AFE04B5} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libracket", "..\libracket\libracket.vcproj", "{A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}" + ProjectSection(ProjectDependencies) = postProject + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmzgc", "..\libmzgc\libmzgc.vcproj", "{66548E7B-294E-40EF-B7C0-C8D6D7E6234F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "..\jpeg\jpeg.vcproj", "{1549C7C5-AF41-43BE-B905-BA6374FE6BEC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "png", "..\png\png.vcproj", "{85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxme", "..\wxme\wxme.vcproj", "{1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxs", "..\wxs\wxs.vcproj", "{B9FC613A-B427-4DB5-B1E3-7673D384ECE3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxutils", "..\wxutils\wxutils.vcproj", "{31231DD7-4B8F-4E46-A747-81E41AFE04B5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxwin", "..\wxwin\wxwin.vcproj", "{5386B148-05B4-483B-B144-C3E2A6E15C78}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\zlib\zlib.vcproj", "{8CE7DC81-695B-436B-AA96-2D753846AFE5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|Win32 = Release|Win32 + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D59A2B28-330B-41F5-8261-F5BC1019E163}.Debug|Win32.ActiveCfg = Debug|Win32 + {D59A2B28-330B-41F5-8261-F5BC1019E163}.Debug|Win32.Build.0 = Debug|Win32 + {D59A2B28-330B-41F5-8261-F5BC1019E163}.Release|Win32.ActiveCfg = Release|Win32 + {D59A2B28-330B-41F5-8261-F5BC1019E163}.Release|Win32.Build.0 = Release|Win32 + {81BD2D42-F150-493D-94BA-88585B202789}.Debug|Win32.ActiveCfg = Debug|Win32 + {81BD2D42-F150-493D-94BA-88585B202789}.Debug|Win32.Build.0 = Debug|Win32 + {81BD2D42-F150-493D-94BA-88585B202789}.Release|Win32.ActiveCfg = Release|Win32 + {81BD2D42-F150-493D-94BA-88585B202789}.Release|Win32.Build.0 = Release|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.ActiveCfg = Debug|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.Build.0 = Debug|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.ActiveCfg = Release|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.Build.0 = Release|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.ActiveCfg = Debug|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.Build.0 = Debug|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.ActiveCfg = Release|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.Build.0 = Release|Win32 + {1549C7C5-AF41-43BE-B905-BA6374FE6BEC}.Debug|Win32.ActiveCfg = Debug|Win32 + {1549C7C5-AF41-43BE-B905-BA6374FE6BEC}.Debug|Win32.Build.0 = Debug|Win32 + {1549C7C5-AF41-43BE-B905-BA6374FE6BEC}.Release|Win32.ActiveCfg = Release|Win32 + {1549C7C5-AF41-43BE-B905-BA6374FE6BEC}.Release|Win32.Build.0 = Release|Win32 + {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}.Debug|Win32.ActiveCfg = Debug|Win32 + {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}.Debug|Win32.Build.0 = Debug|Win32 + {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}.Release|Win32.ActiveCfg = Release|Win32 + {85CFDF8A-E7A2-4B6D-A0D2-1C75835B6AEA}.Release|Win32.Build.0 = Release|Win32 + {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}.Debug|Win32.Build.0 = Debug|Win32 + {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}.Release|Win32.ActiveCfg = Release|Win32 + {1C9F9C4D-FA97-4A56-8E7F-CA1EC99C35E3}.Release|Win32.Build.0 = Release|Win32 + {B9FC613A-B427-4DB5-B1E3-7673D384ECE3}.Debug|Win32.ActiveCfg = Debug|Win32 + {B9FC613A-B427-4DB5-B1E3-7673D384ECE3}.Debug|Win32.Build.0 = Debug|Win32 + {B9FC613A-B427-4DB5-B1E3-7673D384ECE3}.Release|Win32.ActiveCfg = Release|Win32 + {B9FC613A-B427-4DB5-B1E3-7673D384ECE3}.Release|Win32.Build.0 = Release|Win32 + {31231DD7-4B8F-4E46-A747-81E41AFE04B5}.Debug|Win32.ActiveCfg = Debug|Win32 + {31231DD7-4B8F-4E46-A747-81E41AFE04B5}.Debug|Win32.Build.0 = Debug|Win32 + {31231DD7-4B8F-4E46-A747-81E41AFE04B5}.Release|Win32.ActiveCfg = Release|Win32 + {31231DD7-4B8F-4E46-A747-81E41AFE04B5}.Release|Win32.Build.0 = Release|Win32 + {5386B148-05B4-483B-B144-C3E2A6E15C78}.Debug|Win32.ActiveCfg = Debug|Win32 + {5386B148-05B4-483B-B144-C3E2A6E15C78}.Debug|Win32.Build.0 = Debug|Win32 + {5386B148-05B4-483B-B144-C3E2A6E15C78}.Release|Win32.ActiveCfg = Release|Win32 + {5386B148-05B4-483B-B144-C3E2A6E15C78}.Release|Win32.Build.0 = Release|Win32 + {8CE7DC81-695B-436B-AA96-2D753846AFE5}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CE7DC81-695B-436B-AA96-2D753846AFE5}.Debug|Win32.Build.0 = Debug|Win32 + {8CE7DC81-695B-436B-AA96-2D753846AFE5}.Release|Win32.ActiveCfg = Release|Win32 + {8CE7DC81-695B-436B-AA96-2D753846AFE5}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/worksp/gracket/gracket.vcproj b/src/worksp/gracket/gracket.vcproj index 3510c2c0ae..a854ce0274 100644 --- a/src/worksp/gracket/gracket.vcproj +++ b/src/worksp/gracket/gracket.vcproj @@ -1,265 +1,265 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/libgracket/libgracket.vcproj b/src/worksp/libgracket/libgracket.vcproj index 4bc8145729..e89b6b005d 100644 --- a/src/worksp/libgracket/libgracket.vcproj +++ b/src/worksp/libgracket/libgracket.vcproj @@ -1,216 +1,216 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/libmysterx/libmysterx.vcproj b/src/worksp/libmysterx/libmysterx.vcproj index 3295150226..f5957e83c1 100644 --- a/src/worksp/libmysterx/libmysterx.vcproj +++ b/src/worksp/libmysterx/libmysterx.vcproj @@ -1,447 +1,447 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/libmysterx/myspage/myspage.vcproj b/src/worksp/libmysterx/myspage/myspage.vcproj index 8aafb0dd05..2a103ae895 100644 --- a/src/worksp/libmysterx/myspage/myspage.vcproj +++ b/src/worksp/libmysterx/myspage/myspage.vcproj @@ -1,404 +1,404 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/libmzgc/libmzgc.vcproj b/src/worksp/libmzgc/libmzgc.vcproj index 504659dcac..3cf3aad956 100644 --- a/src/worksp/libmzgc/libmzgc.vcproj +++ b/src/worksp/libmzgc/libmzgc.vcproj @@ -1,279 +1,279 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/libracket/libracket.vcproj b/src/worksp/libracket/libracket.vcproj index 6fe5af5027..fc52216d3e 100644 --- a/src/worksp/libracket/libracket.vcproj +++ b/src/worksp/libracket/libracket.vcproj @@ -1,403 +1,403 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/mrstart/mrstart.vcproj b/src/worksp/mrstart/mrstart.vcproj index 4283edfd7d..1e1c2db150 100644 --- a/src/worksp/mrstart/mrstart.vcproj +++ b/src/worksp/mrstart/mrstart.vcproj @@ -1,136 +1,136 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/mzcom/MzCOM.vcproj b/src/worksp/mzcom/MzCOM.vcproj index 9408b8772b..ad3cb7e2b1 100644 --- a/src/worksp/mzcom/MzCOM.vcproj +++ b/src/worksp/mzcom/MzCOM.vcproj @@ -1,352 +1,352 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index dad8657695..c63f7f38cb 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,2,5,10 - PRODUCTVERSION 4,2,5,10 + FILEVERSION 4,2,5,14 + PRODUCTVERSION 4,2,5,14 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "4, 2, 5, 10" + VALUE "FileVersion", "4, 2, 5, 14" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2010 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "4, 2, 5, 10" + VALUE "ProductVersion", "4, 2, 5, 14" END END BLOCK "VarFileInfo" @@ -108,7 +108,7 @@ BEGIN CTEXT "MzCOM v. 4.2",IDC_STATIC,71,8,61,8 CTEXT "Copyright (c) 2000-2010 PLT (Paul Steckler)",IDC_STATIC, 41,20,146,9 - CTEXT "MzScheme v. 4.2",IDC_STATIC,64,35,75,8 + CTEXT "Racket v. 4.2",IDC_STATIC,64,35,75,8 CTEXT "Copyright (c) 1995-2010 PLT Inc.",IDC_STATIC, 30,47,143,8 ICON MZICON,IDC_STATIC,11,16,20,20 diff --git a/src/worksp/mzcom/mzcom.sln b/src/worksp/mzcom/mzcom.sln index 642b0e5754..abc62caf45 100644 --- a/src/worksp/mzcom/mzcom.sln +++ b/src/worksp/mzcom/mzcom.sln @@ -1,45 +1,45 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MzCOM", "MzCOM.vcproj", "{36F31050-55C6-41A3-A23E-3008EBFC1273}" - ProjectSection(ProjectDependencies) = postProject - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} = {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libracket", "..\libracket\libracket.vcproj", "{A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}" - ProjectSection(ProjectDependencies) = postProject - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmzgc", "..\libmzgc\libmzgc.vcproj", "{66548E7B-294E-40EF-B7C0-C8D6D7E6234F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release|Win32 = Release|Win32 - Debug|Win32 = Debug|Win32 - 3m|Win32 = 3m|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {36F31050-55C6-41A3-A23E-3008EBFC1273}.3m|Win32.ActiveCfg = 3m|Win32 - {36F31050-55C6-41A3-A23E-3008EBFC1273}.3m|Win32.Build.0 = 3m|Win32 - {36F31050-55C6-41A3-A23E-3008EBFC1273}.Debug|Win32.ActiveCfg = Debug|Win32 - {36F31050-55C6-41A3-A23E-3008EBFC1273}.Debug|Win32.Build.0 = Debug|Win32 - {36F31050-55C6-41A3-A23E-3008EBFC1273}.Release|Win32.ActiveCfg = Release|Win32 - {36F31050-55C6-41A3-A23E-3008EBFC1273}.Release|Win32.Build.0 = Release|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.3m|Win32.ActiveCfg = Release|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.3m|Win32.Build.0 = Release|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.ActiveCfg = Debug|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.Build.0 = Debug|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.ActiveCfg = Release|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.Build.0 = Release|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.3m|Win32.ActiveCfg = Release|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.3m|Win32.Build.0 = Release|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.ActiveCfg = Debug|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.Build.0 = Debug|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.ActiveCfg = Release|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MzCOM", "MzCOM.vcproj", "{36F31050-55C6-41A3-A23E-3008EBFC1273}" + ProjectSection(ProjectDependencies) = postProject + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} = {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libracket", "..\libracket\libracket.vcproj", "{A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}" + ProjectSection(ProjectDependencies) = postProject + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmzgc", "..\libmzgc\libmzgc.vcproj", "{66548E7B-294E-40EF-B7C0-C8D6D7E6234F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|Win32 = Release|Win32 + Debug|Win32 = Debug|Win32 + 3m|Win32 = 3m|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {36F31050-55C6-41A3-A23E-3008EBFC1273}.3m|Win32.ActiveCfg = 3m|Win32 + {36F31050-55C6-41A3-A23E-3008EBFC1273}.3m|Win32.Build.0 = 3m|Win32 + {36F31050-55C6-41A3-A23E-3008EBFC1273}.Debug|Win32.ActiveCfg = Debug|Win32 + {36F31050-55C6-41A3-A23E-3008EBFC1273}.Debug|Win32.Build.0 = Debug|Win32 + {36F31050-55C6-41A3-A23E-3008EBFC1273}.Release|Win32.ActiveCfg = Release|Win32 + {36F31050-55C6-41A3-A23E-3008EBFC1273}.Release|Win32.Build.0 = Release|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.3m|Win32.ActiveCfg = Release|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.3m|Win32.Build.0 = Release|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.ActiveCfg = Debug|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.Build.0 = Debug|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.ActiveCfg = Release|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.Build.0 = Release|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.3m|Win32.ActiveCfg = Release|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.3m|Win32.Build.0 = Release|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.ActiveCfg = Debug|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.Build.0 = Debug|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.ActiveCfg = Release|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index daf33bfb4e..99cd7b3412 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.4.2.5.10 = s 'MzObj Class' + MzCOM.MzObj.4.2.5.14 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.4.2.5.10' + CurVer = s 'MzCOM.MzObj.4.2.5.14' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.4.2.5.10' + ProgID = s 'MzCOM.MzObj.4.2.5.14' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/mzstart/mzstart.vcproj b/src/worksp/mzstart/mzstart.vcproj index c1e015637f..b427c7888d 100644 --- a/src/worksp/mzstart/mzstart.vcproj +++ b/src/worksp/mzstart/mzstart.vcproj @@ -1,130 +1,130 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index 5ddbac625c..0ffbf21202 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -1,62 +1,62 @@ -//Microsoft Developer Studio generated resource script. - -// - -#include "resource.h" - - - -///////////////////////////////////////////////////////////////////////////// - -// - -// Icon - -// - - - -// Icon with lowest ID value placed first to ensure application icon - -// remains consistent on all systems. - -APPLICATION ICON DISCARDABLE "racket.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,2,5,10 - PRODUCTVERSION 4,2,5,10 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "PLT Scheme Inc.\0" - VALUE "FileDescription", "Racket application\0" - VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "4, 2, 5, 10\0" - VALUE "LegalCopyright", "Copyright 1995-2010\0" - VALUE "OriginalFilename", "racket.exe\0" - VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "4, 2, 5, 10\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END +//Microsoft Developer Studio generated resource script. + +// + +#include "resource.h" + + + +///////////////////////////////////////////////////////////////////////////// + +// + +// Icon + +// + + + +// Icon with lowest ID value placed first to ensure application icon + +// remains consistent on all systems. + +APPLICATION ICON DISCARDABLE "racket.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 4,2,5,14 + PRODUCTVERSION 4,2,5,14 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "PLT Scheme Inc.\0" + VALUE "FileDescription", "Racket application\0" + VALUE "InternalName", "Racket\0" + VALUE "FileVersion", "4, 2, 5, 14\0" + VALUE "LegalCopyright", "Copyright 1995-2010\0" + VALUE "OriginalFilename", "racket.exe\0" + VALUE "ProductName", "Racket\0" + VALUE "ProductVersion", "4, 2, 5, 14\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/src/worksp/racket/racket.sln b/src/worksp/racket/racket.sln index aff5826c0f..e9e5669f95 100644 --- a/src/worksp/racket/racket.sln +++ b/src/worksp/racket/racket.sln @@ -1,38 +1,38 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Racket", "racket.vcproj", "{EB7023C8-6D72-4DE4-ADFC-3913C4C70991}" - ProjectSection(ProjectDependencies) = postProject - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} = {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libracket", "..\libracket\libracket.vcproj", "{A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}" - ProjectSection(ProjectDependencies) = postProject - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmzgc", "..\libmzgc\libmzgc.vcproj", "{66548E7B-294E-40EF-B7C0-C8D6D7E6234F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release|Win32 = Release|Win32 - Debug|Win32 = Debug|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EB7023C8-6D72-4DE4-ADFC-3913C4C70991}.Debug|Win32.ActiveCfg = Debug|Win32 - {EB7023C8-6D72-4DE4-ADFC-3913C4C70991}.Debug|Win32.Build.0 = Debug|Win32 - {EB7023C8-6D72-4DE4-ADFC-3913C4C70991}.Release|Win32.ActiveCfg = Release|Win32 - {EB7023C8-6D72-4DE4-ADFC-3913C4C70991}.Release|Win32.Build.0 = Release|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.ActiveCfg = Debug|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.Build.0 = Debug|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.ActiveCfg = Release|Win32 - {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.Build.0 = Release|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.ActiveCfg = Debug|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.Build.0 = Debug|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.ActiveCfg = Release|Win32 - {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Racket", "racket.vcproj", "{EB7023C8-6D72-4DE4-ADFC-3913C4C70991}" + ProjectSection(ProjectDependencies) = postProject + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} = {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90} + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libracket", "..\libracket\libracket.vcproj", "{A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}" + ProjectSection(ProjectDependencies) = postProject + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} = {66548E7B-294E-40EF-B7C0-C8D6D7E6234F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmzgc", "..\libmzgc\libmzgc.vcproj", "{66548E7B-294E-40EF-B7C0-C8D6D7E6234F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|Win32 = Release|Win32 + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EB7023C8-6D72-4DE4-ADFC-3913C4C70991}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB7023C8-6D72-4DE4-ADFC-3913C4C70991}.Debug|Win32.Build.0 = Debug|Win32 + {EB7023C8-6D72-4DE4-ADFC-3913C4C70991}.Release|Win32.ActiveCfg = Release|Win32 + {EB7023C8-6D72-4DE4-ADFC-3913C4C70991}.Release|Win32.Build.0 = Release|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.ActiveCfg = Debug|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Debug|Win32.Build.0 = Debug|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.ActiveCfg = Release|Win32 + {A6713577-7DFB-48F8-B8C1-7DB2D7C51F90}.Release|Win32.Build.0 = Release|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.ActiveCfg = Debug|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Debug|Win32.Build.0 = Debug|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.ActiveCfg = Release|Win32 + {66548E7B-294E-40EF-B7C0-C8D6D7E6234F}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/worksp/racket/racket.vcproj b/src/worksp/racket/racket.vcproj index 1a64abee76..42ac06d76b 100644 --- a/src/worksp/racket/racket.vcproj +++ b/src/worksp/racket/racket.vcproj @@ -1,232 +1,232 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/racket/resource.h b/src/worksp/racket/resource.h index 77537c5d84..26d79893bd 100644 --- a/src/worksp/racket/resource.h +++ b/src/worksp/racket/resource.h @@ -1,16 +1,16 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by racket.rc -// -#define APPLICATION 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by racket.rc +// +#define APPLICATION 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/src/worksp/racket/uniplt.c b/src/worksp/racket/uniplt.c index 6b04d51280..1ad5e8bfc0 100644 --- a/src/worksp/racket/uniplt.c +++ b/src/worksp/racket/uniplt.c @@ -1,40 +1,40 @@ - -#include - -static int warned; - -HMODULE LoadUnicowsProc(void) -{ - /* We can't use Unicode functions, so we can't - use the library path as returned by scheme_get_dll_path(). - Instead, just search for UnicoWS.dll in the standard - place. */ - HMODULE h; - char *name; - int i; - - h = LoadLibrary("UnicoWS.dll"); - if (h) return h; - - name = (char *)GlobalAlloc(GMEM_FIXED, 1050); - GetModuleFileName(NULL, name, 1024); - name[1023] = 0; - for (i = 0; name[i]; i++) { } - --i; - while (i && (name[i] != '\\')) { - --i; - } - memcpy(name + i, "\\lib\\UnicoWS.dll", 17); - - h = LoadLibrary(name); - if (h) return h; - - if (!warned) { - warned = 1; - MessageBox(NULL, name, "Can't load UnicoWS", MB_OK); - } - - return NULL; -} - -extern FARPROC _PfnLoadUnicows = (FARPROC) &LoadUnicowsProc; + +#include + +static int warned; + +HMODULE LoadUnicowsProc(void) +{ + /* We can't use Unicode functions, so we can't + use the library path as returned by scheme_get_dll_path(). + Instead, just search for UnicoWS.dll in the standard + place. */ + HMODULE h; + char *name; + int i; + + h = LoadLibrary("UnicoWS.dll"); + if (h) return h; + + name = (char *)GlobalAlloc(GMEM_FIXED, 1050); + GetModuleFileName(NULL, name, 1024); + name[1023] = 0; + for (i = 0; name[i]; i++) { } + --i; + while (i && (name[i] != '\\')) { + --i; + } + memcpy(name + i, "\\lib\\UnicoWS.dll", 17); + + h = LoadLibrary(name); + if (h) return h; + + if (!warned) { + warned = 1; + MessageBox(NULL, name, "Can't load UnicoWS", MB_OK); + } + + return NULL; +} + +extern FARPROC _PfnLoadUnicows = (FARPROC) &LoadUnicowsProc; diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index e6b4bf810e..704b2cb0fe 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -1,70 +1,70 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -#ifdef MRSTART -APPLICATION ICON DISCARDABLE "mrstart.ico" -#endif -#ifdef MZSTART -APPLICATION ICON DISCARDABLE "mzstart.ico" -#endif - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,2,5,10 - PRODUCTVERSION 4,2,5,10 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "PLT Scheme Inc.\0" -#ifdef MRSTART - VALUE "FileDescription", "Racket GUI Launcher\0" -#endif -#ifdef MZSTART - VALUE "FileDescription", "Racket Launcher\0" -#endif - VALUE "FileVersion", "4, 2, 5, 10\0" -#ifdef MRSTART - VALUE "InternalName", "mrstart\0" -#endif -#ifdef MZSTART - VALUE "InternalName", "mzstart\0" -#endif - VALUE "LegalCopyright", "Copyright 1996-2010\0" -#ifdef MRSTART - VALUE "OriginalFilename", "MrStart.exe\0" -#endif -#ifdef MZSTART - VALUE "OriginalFilename", "MzStart.exe\0" -#endif - VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "4, 2, 5, 10\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +#ifdef MRSTART +APPLICATION ICON DISCARDABLE "mrstart.ico" +#endif +#ifdef MZSTART +APPLICATION ICON DISCARDABLE "mzstart.ico" +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 4,2,5,14 + PRODUCTVERSION 4,2,5,14 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "PLT Scheme Inc.\0" +#ifdef MRSTART + VALUE "FileDescription", "Racket GUI Launcher\0" +#endif +#ifdef MZSTART + VALUE "FileDescription", "Racket Launcher\0" +#endif + VALUE "FileVersion", "4, 2, 5, 14\0" +#ifdef MRSTART + VALUE "InternalName", "mrstart\0" +#endif +#ifdef MZSTART + VALUE "InternalName", "mzstart\0" +#endif + VALUE "LegalCopyright", "Copyright 1996-2010\0" +#ifdef MRSTART + VALUE "OriginalFilename", "MrStart.exe\0" +#endif +#ifdef MZSTART + VALUE "OriginalFilename", "MzStart.exe\0" +#endif + VALUE "ProductName", "Racket\0" + VALUE "ProductVersion", "4, 2, 5, 14\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/src/worksp/wxme/wxme.vcproj b/src/worksp/wxme/wxme.vcproj index 643c48ce44..9486b80450 100644 --- a/src/worksp/wxme/wxme.vcproj +++ b/src/worksp/wxme/wxme.vcproj @@ -1,185 +1,185 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/wxs/wxs.vcproj b/src/worksp/wxs/wxs.vcproj index 8684119592..7cffdf6495 100644 --- a/src/worksp/wxs/wxs.vcproj +++ b/src/worksp/wxs/wxs.vcproj @@ -1,350 +1,350 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/wxutils/wxutils.vcproj b/src/worksp/wxutils/wxutils.vcproj index 4992eca2db..aa3436a37d 100644 --- a/src/worksp/wxutils/wxutils.vcproj +++ b/src/worksp/wxutils/wxutils.vcproj @@ -1,312 +1,312 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/worksp/wxwin/wxwin.vcproj b/src/worksp/wxwin/wxwin.vcproj index 883d1d8a4f..92b2e4b884 100644 --- a/src/worksp/wxwin/wxwin.vcproj +++ b/src/worksp/wxwin/wxwin.vcproj @@ -1,378 +1,378 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +