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/algol60/algol60.scrbl b/collects/algol60/algol60.scrbl index 6288839564..1f9dea2ba5 100644 --- a/collects/algol60/algol60.scrbl +++ b/collects/algol60/algol60.scrbl @@ -6,13 +6,13 @@ @section{Implementation} -The ``Algol 60'' language for DrScheme implements the language defined +The ``Algol 60'' language for DrRacket implements the language defined by the ``Revised Report on the Algorithmic Language Algol 60,'' edited by Peter Naur. @section{Including Algol 60 Programs} -Although Algol 60 is mainly provided as a DrScheme language, +Although Algol 60 is mainly provided as a DrRacket language, @scheme[include-algol] supports limited use of Algol 60 programs in larger programs. @@ -21,14 +21,14 @@ larger programs. @defform[(include-algol path-string)]{ Includes the Algol 60 program indicated by @scheme[path-string] as an -expression in a Scheme program. The included Algol 60 program is +expression in a Racket program. The included Algol 60 program is closed (i.e., it doesn't see any bindings in the included context), and the result is always @|void-const|.} @section{Language} -The DrScheme and @scheme[include-algol] implementation departs from +The DrRacket and @scheme[include-algol] implementation departs from the Algol 60 specification in the following minor ways: @(itemize (item "Strings are not permitted to contain nested quotes.") @@ -66,6 +66,6 @@ are supported: printn(E) prints the number E printnln(E) prints the number E followed by a newline") -A prompt in DrScheme's Interactions window accepts whole programs only +A prompt in DrRacket's interactions area accepts whole programs only for the Algol 60 language. diff --git a/collects/algol60/tool.rkt b/collects/algol60/tool.rkt index f465abe8bf..8f72cbc44a 100644 --- a/collects/algol60/tool.rkt +++ b/collects/algol60/tool.rkt @@ -118,6 +118,6 @@ `(module m algol60/base ,code)) (list "-mvqe" "(require m)")))))) - (define/public (get-one-line-summary) "Algol 60 (not Scheme at all!)") + (define/public (get-one-line-summary) "Of historic interest") (super-instantiate ())))))) diff --git a/collects/browser/browser.scrbl b/collects/browser/browser.scrbl index aacb2bb56a..f1f7fd52b4 100644 --- a/collects/browser/browser.scrbl +++ b/collects/browser/browser.scrbl @@ -7,52 +7,52 @@ browser/htmltext browser/external browser/tool - scheme/base - scheme/contract - scheme/class - scheme/gui/base + racket/base + racket/contract + racket/class + racket/gui/base net/url framework/framework)) @(define-syntax-rule (def-ext id) (begin (require (for-label net/sendurl)) - (define id (scheme send-url)))) + (define id (racket send-url)))) @(def-ext net-send-url) @title{@bold{Browser}: Simple HTML Rendering} -The @schememodname[browser] library provides the following procedures +The @racketmodname[browser] library provides the following procedures and classes for parsing and viewing HTML files. The -@schememodname[browser/htmltext] library provides a simplified interface -for rendering to a subclass of the MrEd @scheme[text%] class. The -@schememodname[browser/external] library provides utilities for +@racketmodname[browser/htmltext] library provides a simplified interface +for rendering to a subclass of the GRacket @racket[text%] class. The +@racketmodname[browser/external] library provides utilities for launching an external browser (such as Firefox). @section[#:tag "browser"]{Browser} @defmodule[browser] -The browser supports basic HTML commands, plus special Scheme hyperlinks +The browser supports basic HTML commands, plus special Racket hyperlinks of the form @litchar{...}. When the user clicks -on such a link, the string @scheme[sexpr] is parsed as a Scheme program -and evaluated. Since @scheme[sexpr] is likely to contain Scheme +on such a link, the string @racket[sexpr] is parsed as a Racket program +and evaluated. Since @racket[sexpr] is likely to contain Racket strings, and since escape characters are difficult for people to read, a -@litchar{|} character in @scheme[sexpr] is converted to a @litchar{"} +@litchar{|} character in @racket[sexpr] is converted to a @litchar{"} character before it is parsed. Thus, @verbatim[#:indent 2]{ Nowhere } -creates a ``Nowhere'' hyperlink, which executes the Scheme program +creates a ``Nowhere'' hyperlink, which executes the Racket program -@schemeblock[ +@racketblock[ "This goes nowhere." ] -The value of that program is a string. When a Scheme hyperlink returns +The value of that program is a string. When a Racket hyperlink returns a string, it is parsed as a new HTML document. Thus, where the use clicks on ``Nowhere,'' the result is a new page that says ``This goes nowhere.'' @@ -75,16 +75,16 @@ of a string, it replaces the comment in the document. Other types of return values are ignored. If the html file is being accessed as a @litchar{file:} url, the -@scheme[current-load-relative-directory] parameter is set to the -directory during the evaluation of the mzscheme code (in both -examples). The Scheme code is executed through @scheme[eval]. +@racket[current-load-relative-directory] parameter is set to the +directory during the evaluation of the mzracket code (in both +examples). The Racket code is executed through @racket[eval]. The @litchar{MZSCHEME} forms are disabled unless the web page is a -@litchar{file:} url that points into the @scheme[doc] collection. +@litchar{file:} url that points into the @racket[doc] collection. @defproc[(open-url [url (or/c url? string? input-port?)]) (is-a?/c hyper-frame%)]{ Opens the given url in a vanilla browser frame and returns the - frame. The frame is an instance of @scheme[hyper-frame%]. + frame. The frame is an instance of @racket[hyper-frame%]. } @defboolparam[html-img-ok ok?]{ @@ -102,13 +102,13 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmixin[hyper-frame-mixin (frame%) ()]{ @defconstructor/auto-super[([url (or/c url? string? input-port?)])]{ - Shows the frame and visits @scheme[url]. + Shows the frame and visits @racket[url]. } @defmethod[(get-hyper-panel%) (subclass?/c panel%)]{ Returns the class that is instantiated when the frame is created. Must be a panel with hyper-panel-mixin mixed in. Defaults to just - returning @scheme[hyper-panel%]. + returning @racket[hyper-panel%]. } @defmethod[(get-hyper-panel) (is-a?/c panel%)]{ @@ -125,7 +125,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @; ---------------------------------------------------------------------- @defmixin[hyper-no-show-frame-mixin (frame%) ()]{ - The same as the @scheme[hyper-frame-mixin], except that it doesn't + The same as the @racket[hyper-frame-mixin], except that it doesn't show the frame and the initialization arguments are unchanged. } @@ -139,21 +139,21 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmixin[hyper-text-mixin (text%) ()]{ - An instance of a @scheme[hyper-text-mixin]-extended class should be + An instance of a @racket[hyper-text-mixin]-extended class should be displayed only in an instance of a class created with - @scheme[hyper-canvas-mixin]. + @racket[hyper-canvas-mixin]. @defconstructor/auto-super[([url (or/c url? string? input-port?)] [status-frame (or/c (is-a?/c top-level-window<%>) false/c)] [post-data (or/c false/c bytes?)])]{ - The @scheme[url] is loaded into the @scheme[text%] object (using the + The @racket[url] is loaded into the @racket[text%] object (using the @method[hyper-text-mixin reload] method), a top-level window for status messages and dialogs, a progress procedure used as for - @scheme[get-url], and either @scheme[#f] or a post string to be sent + @racket[get-url], and either @racket[#f] or a post string to be sent to a web server (technically changing the GET to a POST). - Sets the autowrap-bitmap to @scheme[#f]. + Sets the autowrap-bitmap to @racket[#f]. } @defmethod[(map-shift-style [start exact-nonnegative-integer?] @@ -170,7 +170,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a } @defmethod[(get-url) (or/c url? string? input-port? false/c)]{ - Returns the URL displayed by the editor, or @scheme[#f] if there is + Returns the URL displayed by the editor, or @racket[#f] if there is none. } @@ -194,9 +194,9 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a (or/c exact-nonnegative-integer? false/c)]{ Finds the location of a tag in the buffer (where tags are installed in HTML with @litchar{}) and returns its position. - If @scheme[name] is a number, the number is returned (assumed to be + If @racket[name] is a number, the number is returned (assumed to be an offset rather than a tag). Otherwise, if the tag is not found, - @scheme[#f] is returned. + @racket[#f] is returned. } @defmethod[(remove-tag [name string?]) void?]{ @@ -215,11 +215,11 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a Installs a hyperlink. } - @defmethod[(add-scheme-callback [start exact-nonnegative-integer?] + @defmethod[(add-racket-callback [start exact-nonnegative-integer?] [end exact-nonnegative-integer?] - [scheme-expr string?]) + [racket-expr string?]) void?]{ - Installs a Scheme evaluation hyperlink. + Installs a Racket evaluation hyperlink. } @defmethod[(add-thunk-callback [start exact-nonnegative-integer?] @@ -229,7 +229,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a Installs a thunk-based hyperlink. } - @defmethod[(eval-scheme-string [str string?]) any]{ + @defmethod[(eval-racket-string [str string?]) any]{ Called to handle the @litchar{...} tag and @litchar{} comments (see above). Evaluates the string; if the result is a string, it is opened as an HTML page. @@ -239,13 +239,13 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a Reloads the current page. The text defaultly uses the basic style named - @scheme["Html Standard"] in the editor (if it exists). + @racket["Html Standard"] in the editor (if it exists). } @defmethod[(remap-url [url (or/c url? string?)]) (or/c url? string?)]{ When visiting a new page, this method is called to remap the url. The remapped url is used in place of the original url. If this - method returns @scheme[#f], the page doesn't go anywhere. + method returns @racket[#f], the page doesn't go anywhere. This method may be killed (if the user clicks the ``stop'' button). } @@ -261,7 +261,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defclass[hyper-text% (hyper-text-mixin text:keymap%) ()]{ - Extends the @scheme[text:keymap%] class to support standard key + Extends the @racket[text:keymap%] class to support standard key bindings in the browser window. } @@ -270,8 +270,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmixin[hyper-canvas-mixin (editor-canvas%) ()]{ - A @scheme[hyper-can-mixin]-extended canvas's parent should be an - instance of a class derived with @scheme[hyper-panel-mixin]. + A @racket[hyper-can-mixin]-extended canvas's parent should be an + instance of a class derived with @racket[hyper-panel-mixin]. @defconstructor/auto-super[()]{ } @@ -279,8 +279,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmethod[(get-editor%) (subclass?/c text%)]{ Returns the class used to implement the editor in the browser - window. It should be derived from @scheme[hyper-text%] and should - pass on the initialization arguments to @scheme[hyper-text%]. + window. It should be derived from @racket[hyper-text%] and should + pass on the initialization arguments to @racket[hyper-text%]. The dynamic extent of the initialization of this editor is called on a thread that may be killed (via a custodian shutdown). In that @@ -299,30 +299,30 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a [post-data (or/c bytes? false/c) #f]) void?]{ Changes to the given url, loading it by calling the - @scheme[make-editor] method. If @scheme[relative-to-url] is not - @scheme[#f], it must be a URL for resolving @scheme[url] as a - relative URL. @scheme[url] may also be a port, in which case, - @scheme[relative-to-url] must be @scheme[#f]. + @racket[make-editor] method. If @racket[relative-to-url] is not + @racket[#f], it must be a URL for resolving @racket[url] as a + relative URL. @racket[url] may also be a port, in which case, + @racket[relative-to-url] must be @racket[#f]. - The @scheme[progress-proc] procedure is called with a boolean at the + The @racket[progress-proc] procedure is called with a boolean at the point where the URL has been resolved and enough progress has been made to dismiss any message that the URL is being resolved. The - procedure is called with @scheme[#t] if the URL will be loaded into - a browser window, @scheme[#f] otherwise (e.g., the user will save + procedure is called with @racket[#t] if the URL will be loaded into + a browser window, @racket[#f] otherwise (e.g., the user will save the URL content to a file). - If @scheme[post-data-bytes] is a byte string instead of false, the + If @racket[post-data-bytes] is a byte string instead of false, the URL GET is changed to a POST with the given data. } @defmethod[(set-page [page any/c] [notify? any/c]) void?]{ - Changes to the given page. If @scheme[notify?] is not @scheme[#f], + Changes to the given page. If @racket[notify?] is not @racket[#f], the canvas's parent is notified about the change by calling its - @scheme[leaving-page] method. + @racket[leaving-page] method. } @defmethod[(after-set-page) void?]{ - Called during @scheme[set-page]. Defaultly does nothing. + Called during @racket[set-page]. Defaultly does nothing. } } @@ -334,28 +334,28 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a Creates controls and a hyper text canvas. The controls permit a user to move back and forth in the hypertext history. - The @scheme[info-line?] argument indicates whether the browser + The @racket[info-line?] argument indicates whether the browser should contain a line to display special @litchar{DOCNOTE} tags in a page. Such tags are used primarily by the PLT documentation. } @defmethod[(make-canvas [container (is-a?/c area-container<%>)]) void?]{ Creates the panel's hypertext canvas, an instance of a class derived - using @scheme[hyper-canvas-mixin]. This method is called during + using @racket[hyper-canvas-mixin]. This method is called during initialization. } @defmethod[(get-canvas%) (subclass?/c editor-canvas%)]{ Returns the class instantiated by make-canvas. It must be derived - from @scheme[hyper-canvas-mixin]. + from @racket[hyper-canvas-mixin]. } @defmethod[(make-control-bar-panel [container (is-a?/c area-container<%>)]) any/c]{ Creates the panel's sub-container for the control bar containing the - navigation buttons. If @scheme[#f] is returned, the panel will have + navigation buttons. If @racket[#f] is returned, the panel will have no control bar. The default method instantiates - @scheme[horizontal-panel%]. + @racket[horizontal-panel%]. } @defmethod[(rewind) void?]{ @@ -373,15 +373,15 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmethod[(on-navigate) void?]{ Callback that is invoked any time the displayed hypertext page changes (either by clicking on a link in the canvas or by - @scheme[rewind] or @scheme[forward] calls). + @racket[rewind] or @racket[forward] calls). } @defmethod[(leaving-page [page any/c] [new-page any/c]) any]{ This method is called by the hypertext canvas to notify the panel - that the hypertext page changed. The @scheme[page] is @scheme[#f] - if @scheme[new-page] is the first page for the canvas. See also - @scheme[page->editor]. + that the hypertext page changed. The @racket[page] is @racket[#f] + if @racket[new-page] is the first page for the canvas. See also + @racket[page->editor]. } @defmethod[(filter-notes [notes (listof string?)]) @@ -391,7 +391,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a } @defmethod[(reload) void?]{ - Reloads the currently visible page by calling the @scheme[reload] + Reloads the currently visible page by calling the @racket[reload] method of the currently displayed hyper-text. } } @@ -404,7 +404,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defproc[(editor->page [editor (is-a?/c text%)]) any/c]{ Creates a page record for the given editor, suitable for use with the - @scheme[set-page] method of @scheme[hyper-canvas-mixin]. + @racket[set-page] method of @racket[hyper-canvas-mixin]. } @defproc[(page->editor [page any/c]) (is-a?/c text%)]{ @@ -416,7 +416,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a } @defclass[image-map-snip% snip% ()]{ - Instances of this class behave like @scheme[image-snip%] objects, + Instances of this class behave like @racket[image-snip%] objects, except they have a @litchar{ ... } associated with them and when clicking on them (in the map) they will cause their init arg text to follow the corresponding link. @@ -425,7 +425,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a } @defmethod[(set-key [key string?]) void?]{ - Sets the key for the image map (eg, @scheme["#key"]). + Sets the key for the image map (eg, @racket["#key"]). } @defmethod[(get-key) string?]{ @@ -436,8 +436,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a [region (listof number?)] [href string?]) void?]{ - Registers the shape named by @scheme[shape] whose coordinates are - specified by @scheme[region] to go to @scheme[href] when that region + Registers the shape named by @racket[shape] whose coordinates are + specified by @racket[region] to go to @racket[href] when that region of the image is clicked on. } } @@ -449,8 +449,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmodule[browser/browser-unit] @defthing[browser@ unit?]{ - Imports @scheme[mred^], @scheme[tcp^], and @scheme[url^], and exports - @scheme[browser^]. + Imports @racket[mred^], @racket[tcp^], and @racket[url^], and exports + @racket[browser^]. } @; ---------------------------------------------------------------------- @@ -460,7 +460,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmodule[browser/browser-sig] @defsignature[browser^ ()]{ - Includes all of the bindings of the @schememodname[browser] library. + Includes all of the bindings of the @racketmodname[browser] library. } @; ---------------------------------------------------------------------- @@ -472,12 +472,12 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @definterface[html-text<%> (text%)]{ @defmethod[(get-url) (or/c url? string? false/c)]{ - Returns a base URL used for building relative URLs, or @scheme[#f] + Returns a base URL used for building relative URLs, or @racket[#f] if no base is available. } @defmethod[(set-title [str string?]) void?]{ - Registers the title @scheme[str] for the rendered page. + Registers the title @racket[str] for the rendered page. } @defmethod[(add-link [start exact-nonnegative-integer?] @@ -497,11 +497,11 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a Changes the style for the given range to the link style. } - @defmethod[(add-scheme-callback [start exact-nonnegative-integer?] + @defmethod[(add-racket-callback [start exact-nonnegative-integer?] [end exact-nonnegative-integer?] - [scheme-expr string?]) + [racket-expr string?]) void?]{ - Installs a Scheme evaluation hyperlink. + Installs a Racket evaluation hyperlink. } @defmethod[(add-thunk-callback [start exact-nonnegative-integer?] @@ -519,9 +519,9 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmixin[html-text-mixin (text%) ()]{ - Extends the given @scheme[text%] class with implementations of the - @scheme[html-text<%>] methods. Hyperlinks are attached to clickbacks - that use @net-send-url from @schememodname[net/sendurl]. + Extends the given @racket[text%] class with implementations of the + @racket[html-text<%>] methods. Hyperlinks are attached to clickbacks + that use @net-send-url from @racketmodname[net/sendurl]. } @defproc[(render-html-to-text [in input-port?] @@ -529,12 +529,12 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a [load-img? any/c] [eval-mz? any/c]) void?]{ - Reads HTML from @scheme[in] and renders it to @scheme[dest]. If - @scheme[load-img?] is @scheme[#f], then images are rendered as Xed-out - boxes. If @scheme[eval-mz?] is @scheme[#f], then @litchar{MZSCHEME} + Reads HTML from @racket[in] and renders it to @racket[dest]. If + @racket[load-img?] is @racket[#f], then images are rendered as Xed-out + boxes. If @racket[eval-mz?] is @racket[#f], then @litchar{MZSCHEME} hyperlink expressions and comments are not evaluated. - Uses the style named @scheme["Html Standard"] in the editor's + Uses the style named @racket["Html Standard"] in the editor's style-list (if it exists) for all of the inserted text's default style. } @@ -546,21 +546,21 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defmodule[browser/external] @defproc[(send-url [str null] [separate-window? void #t]) null]{ - Like @net-send-url from @scheme[net/sendurl], but under Unix, the user + Like @net-send-url from @racket[net/sendurl], but under Unix, the user is prompted for a browser to use if none is recorded in the preferences file. } @defproc[(browser-preference? [v any/c]) boolean?]{ - Returns @scheme[#t] if @scheme[v] is a valid browser preference. + Returns @racket[#t] if @racket[v] is a valid browser preference. } @defproc[(update-browser-preference [url (or/c string? false/c)]) void?]{ Under Unix, prompts the user for a browser preference and records the user choice as a framework preference (even if one is already - recorded). If @scheme[url] is not @scheme[#f], it is used in the - dialog to explain which URL is to be opened; if it is @scheme[#f], the - @scheme['internal] will be one of the options for the user. + recorded). If @racket[url] is not @racket[#f], it is used in the + dialog to explain which URL is to be opened; if it is @racket[#f], the + @racket['internal] will be one of the options for the user. } @defproc[(install-help-browser-preference-panel) void?]{ @@ -569,19 +569,19 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a @defproc[(add-to-browser-prefs-panel [proc ((is-a?/c panel%) . -> . any)]) void?]{ - The @scheme[proc] is called when the ``Browser'' panel is constructed - for preferences. The supplied argument is the panel, so @scheme[proc] + The @racket[proc] is called when the ``Browser'' panel is constructed + for preferences. The supplied argument is the panel, so @racket[proc] can add additional option controls. If the panel is already created, - @scheme[proc] is called immediately. + @racket[proc] is called immediately. } @; ---------------------------------------------------------------------- -@section[#:tag "tool"]{DrScheme Browser Preference Panel} +@section[#:tag "tool"]{DrRacket Browser Preference Panel} @defmodule[browser/tool] @defthing[tool@ unit?]{ - A unit that implements a DrScheme tool to add the ``Browser'' + A unit that implements a DrRacket tool to add the ``Browser'' preference panel. } diff --git a/collects/compiler/cffi.scrbl b/collects/compiler/cffi.scrbl index b7ff3a7c1c..4f54528079 100644 --- a/collects/compiler/cffi.scrbl +++ b/collects/compiler/cffi.scrbl @@ -5,7 +5,7 @@ compiler/cffi mzlib/include)) -@(define mzc (exec "mzc")) +@(define ctool (exec "raco ctool")) @(define cpp tt) @(define inside @other-manual['(lib "scribblings/inside/inside.scrbl")]) @@ -23,53 +23,53 @@ @(define (argtype scm desc c . cases) (item (apply lines scm - @elem{Scheme range: @|desc|} + @elem{Racket range: @|desc|} @elem{C type: @|c|} cases))) @(define (toC . content) - (apply elem "Scheme to C conversion: " content)) -@(define (toScheme . content) - (apply elem "C to Scheme conversion: " content)) + (apply elem "Racket to C conversion: " content)) +@(define (toRacket . content) + (apply elem "C to Racket conversion: " content)) @(define tosObvious (elem "conversions: (obvious and precise)")) @(define goesto 'rarr) -@title{@scheme[c-lambda]: C FFI via @exec{mzc}} +@title{@scheme[c-lambda]: C FFI via @exec{raco ctool}} @defmodule[compiler/cffi]{ The @schememodname[compiler/cffi] module relies on a C compiler to statically construct an interface to C code through directives -embedded in a Scheme program. The library implements a subset of +embedded in a Racket program. The library implements a subset of @as-index{Gambit-C}'s foreign-function interface @cite["Feeley98"].} -The @schememodname[scheme/foreign] library is a better interface for +The @racketmodname[ffi/unsafe] library is a better interface for most tasks; see @other-manual['(lib "scribblings/foreign/foreign.scrbl")] for more information on -@schememodname[scheme/foreign]. See also @|inside|, which describes -PLT Scheme's C-level API for extending the run-time system. +@racketmodname[ffi/unsafe]. See also @|inside|, which describes +Racket's C-level API for extending the run-time system. -The @schememodname[compiler/cffi] library defines three forms: -@scheme[c-lambda], @scheme[c-declare], and @scheme[c-include]. When -interpreted directly or compiled to byte code, @scheme[c-lambda] -produces a function that always raises @scheme[exn:fail], and -@scheme[c-declare] and @scheme[c-include] raise -@scheme[exn:fail]. When compiled by @exec{mzc --extension}, the forms -provide access to C. Thus, @schememodname[compiler/cffi] is normally -required by a module to be compiled via @|mzc|. In addition, the -@|mzc| compiler implicitly imports @schememodname[compiler/cffi] into -the top-level environment for non-@scheme[module] compilation. +The @racketmodname[compiler/cffi] library defines three forms: +@racket[c-lambda], @racket[c-declare], and @racket[c-include]. When +interpreted directly or compiled to byte code, @racket[c-lambda] +produces a function that always raises @racket[exn:fail], and +@racket[c-declare] and @racket[c-include] raise +@racket[exn:fail]. When compiled by @exec{raco ctool --extension}, the forms +provide access to C. Thus, @racketmodname[compiler/cffi] is normally +required by a module to be compiled via @|ctool|. In addition, the +@|ctool| compiler implicitly imports @racketmodname[compiler/cffi] into +the top-level environment for non-@racket[module] compilation. -The @scheme[c-lambda] form creates a Scheme procedure whose body is +The @racket[c-lambda] form creates a Racket procedure whose body is implemented in C. Instead of declaring argument names, a -@scheme[c-lambda] form declares argument types, as well as a return +@racket[c-lambda] form declares argument types, as well as a return type. The implementation can be simply the name of a C function, as in -the following definition of @scheme[fmod]: +the following definition of @racket[fmod]: -@schemeblock[ +@racketblock[ (define fmod (c-lambda (double double) double "fmod")) ] @@ -78,199 +78,199 @@ of a function, where the arguments are bound to @cpp{___arg1} (three underscores), etc., and the result is installed into @cpp{___result} (three underscores): -@schemeblock[ +@racketblock[ (define machine-string->float (c-lambda (char-string) float "___result = *(float *)___arg1;")) ] -The @scheme[c-lambda] form provides only limited conversions between C -and Scheme data. For example, the following function does not reliably +The @racket[c-lambda] form provides only limited conversions between C +and Racket data. For example, the following function does not reliably produce a string of four characters: -@schemeblock[ +@racketblock[ (define broken-machine-float->string (c-lambda (float) char-string "char b[5]; *(float *)b = ___arg1; b[4] = 0; ___result = b;")) ] because the representation of a @cpp{float} can contain null bytes, -which terminate the string. However, the full MzScheme API, which is +which terminate the string. However, the full Racket API, which is described in @|inside|, can be used in a function body: -@schemeblock[ +@racketblock[ (define machine-float->string - (c-lambda (float) scheme-object + (c-lambda (float) racket-object "char b[4];" "*(float *)b = ___arg1;" - "___result = scheme_make_sized_byte_string(b, 4, 1);")) + "___result = racket_make_sized_byte_string(b, 4, 1);")) ] -The @scheme[c-declare] form declares arbitrary C code to appear after +The @racket[c-declare] form declares arbitrary C code to appear after @filepath{escheme.h} or @filepath{scheme.h} is included, but before any other code in the compilation environment of the declaration. It is often used to declare C header file inclusions. For example, a -proper definition of @scheme[fmod] needs the @filepath{math.h} header +proper definition of @racket[fmod] needs the @filepath{math.h} header file: -@schemeblock[ +@racketblock[ (c-declare "#include ") (define fmod (c-lambda (double double) double "fmod")) ] -The @scheme[c-declare] form can also be used to define helper C -functions to be called through @scheme[c-lambda]. +The @racket[c-declare] form can also be used to define helper C +functions to be called through @racket[c-lambda]. -The @scheme[c-include] form expands to a @scheme[c-declare] form using -the content of a specified file. Use @scheme[(c-include _file)] instead -of @scheme[(c-declare "#include file")] when it's easier to -have MzScheme resolve the file path than to have the C compiler +The @racket[c-include] form expands to a @racket[c-declare] form using +the content of a specified file. Use @racket[(c-include _file)] instead +of @racket[(c-declare "#include file")] when it's easier to +have Racket resolve the file path than to have the C compiler resolve it. -The @filepath{plt/collects/mzscheme/examples} directory in the PLT +The @filepath{collects/mzscheme/examples} directory in the Racket distribution contains additional examples. -When compiling for MzScheme3m (see @|inside|), C code inserted by -@scheme[c-lambda], @scheme[c-declare], and @scheme[c-include] will be -transformed in the same was as @|mzc|'s @DFlag{xform} mode (which may -or may not be enough to make the code work correctly in MzScheme3m; +When compiling for Racket 3m (see @|inside|), C code inserted by +@racket[c-lambda], @racket[c-declare], and @racket[c-include] will be +transformed in the same was as @|ctool|'s @DFlag{xform} mode (which may +or may not be enough to make the code work correctly in Racket 3m; see @|inside| for more information). @defform[(c-lambda (argument-type ...) return-type impl-string ...+)]{ -Creates a Scheme procedure whose body is implemented in C. The +Creates a Racket procedure whose body is implemented in C. The procedure takes as many arguments as the supplied -@scheme[argument-type]s, and it returns one value. If -@scheme[return-type] is @schemeidfont{void}, the procedure's result is -always void. The @scheme[impl-string] is either the name of a C +@racket[argument-type]s, and it returns one value. If +@racket[return-type] is @racketidfont{void}, the procedure's result is +always void. The @racket[impl-string] is either the name of a C function (or macro) or the body of a C function. -If a single @scheme[impl-string] is provided, and if it is a +If a single @racket[impl-string] is provided, and if it is a string containing only alphanumeric characters and @litchar{_}, -then the created Scheme procedure passes all of its arguments to +then the created Racket procedure passes all of its arguments to the named C function (or macro) and returns the function's -result. Each argument to the Scheme procedure is converted -according to the corresponding @scheme[argument-type] (as +result. Each argument to the Racket procedure is converted +according to the corresponding @racket[argument-type] (as described below) to produce an argument to the C function. Unless -@scheme[return-type] is @schemeidfont{void}, the C function's result is -converted according to @scheme[return-type] for the Scheme +@racket[return-type] is @racketidfont{void}, the C function's result is +converted according to @racket[return-type] for the Racket procedure's result. -If more than @scheme[impl-string] is provided, or if it contains more +If more than @racket[impl-string] is provided, or if it contains more than alphanumeric characters and @litchar{_}, then the concatenated -@scheme[impl-string]s must contain C code to implement the function +@racket[impl-string]s must contain C code to implement the function body. The converted arguments for the function will be in variables @cpp{___arg1}, @cpp{___arg2}, ... (with three underscores in each -name) in the context where the @scheme[impl-string]s are placed for -compilation. Unless @scheme[return-type] is @schemeidfont{void}, the -@scheme[impl-string]s code should assign a result to the variable +name) in the context where the @racket[impl-string]s are placed for +compilation. Unless @racket[return-type] is @racketidfont{void}, the +@racket[impl-string]s code should assign a result to the variable @cpp{___result} (three underscores), which will be declared but not -initialized. The @scheme[impl-string]s code should not return +initialized. The @racket[impl-string]s code should not return explicitly; control should always reach the end of the body. If the -@scheme[impl-string]s code defines the pre-processor macro +@racket[impl-string]s code defines the pre-processor macro @cpp{___AT_END} (with three leading underscores), then the macro's value should be C code to execute after the value @cpp{___result} is -converted to a Scheme result, but before the result is returned, all +converted to a Racket result, but before the result is returned, all in the same block; defining @cpp{___AT_END} is primarily useful for deallocating a string in @cpp{___result} that has been copied by -conversion. The @scheme[impl-string]s code will start on a new line at +conversion. The @racket[impl-string]s code will start on a new line at the beginning of a block in its compilation context, and @cpp{___AT_END} will be undefined after the code. In addition to @cpp{___arg1}, etc., the variable @cpp{argc} is bound -in @scheme[impl-string]s to the number of arguments supplied to -the function, and @cpp{argv} is bound to a @cpp{Scheme_Object*} array -of length @cpp{argc} containing the function arguments as Scheme +in @racket[impl-string]s to the number of arguments supplied to +the function, and @cpp{argv} is bound to a @cpp{Racket_Object*} array +of length @cpp{argc} containing the function arguments as Racket values. The @cpp{argv} and @cpp{argc} variables are mainly useful for -error reporting (e.g., with @cpp{scheme_wrong_type}). +error reporting (e.g., with @cpp{racket_wrong_type}). -Each @scheme[argument-type] must be one of the following, which are +Each @racket[argument-type] must be one of the following, which are recognized symbolically: @itemize[ - @argtype[@scheme[bool] "any value" @cpp{int} - @toC{@scheme[#f] @|goesto| 0, anything else @|goesto| 1} - @toScheme{0 @|goesto| @scheme[#f], anything else @|goesto| @scheme[#t]}] + @argtype[@racket[bool] "any value" @cpp{int} + @toC{@racket[#f] @|goesto| 0, anything else @|goesto| 1} + @toRacket{0 @|goesto| @racket[#f], anything else @|goesto| @racket[#t]}] - @argtype[@scheme[char] "character" @cpp{char} + @argtype[@racket[char] "character" @cpp{char} @toC{character's Latin-1 value cast to signed byte} - @toScheme{Latin-1 value from unsigned cast mapped to character}] + @toRacket{Latin-1 value from unsigned cast mapped to character}] - @argtype[@scheme[unsigned-char] "character" @cpp{unsigned char} + @argtype[@racket[unsigned-char] "character" @cpp{unsigned char} @toC{character's Latin-1 value} - @toScheme{Latin-1 value mapped to character}] + @toRacket{Latin-1 value mapped to character}] - @argtype[@scheme[signed-char] "character" @cpp{signed char} + @argtype[@racket[signed-char] "character" @cpp{signed char} @toC{character's Latin-1 value cast to signed byte} - @toScheme{Latin-1 value from unsigned cast mapped to character}] + @toRacket{Latin-1 value from unsigned cast mapped to character}] - @argtype[@scheme[int] @elem{exact integer that fits into an @cpp{int}} @cpp{int} + @argtype[@racket[int] @elem{exact integer that fits into an @cpp{int}} @cpp{int} @tosObvious] - @argtype[@scheme[unsigned-int] @elem{exact integer that fits into an @cpp{unsigned int}} @cpp{unsigned int} + @argtype[@racket[unsigned-int] @elem{exact integer that fits into an @cpp{unsigned int}} @cpp{unsigned int} @tosObvious] - @argtype[@scheme[long] @elem{exact integer that fits into a @cpp{long}} @cpp{long} + @argtype[@racket[long] @elem{exact integer that fits into a @cpp{long}} @cpp{long} @tosObvious] - @argtype[@scheme[unsigned-long] @elem{exact integer that fits into an @cpp{unsigned long}} @cpp{unsigned long} + @argtype[@racket[unsigned-long] @elem{exact integer that fits into an @cpp{unsigned long}} @cpp{unsigned long} @tosObvious] - @argtype[@scheme[short] @elem{exact integer that fits into a @cpp{short}} @cpp{short} + @argtype[@racket[short] @elem{exact integer that fits into a @cpp{short}} @cpp{short} @tosObvious] - @argtype[@scheme[unsigned-short] @elem{exact integer that fits into an @cpp{unsigned short}} @cpp{unsigned short} + @argtype[@racket[unsigned-short] @elem{exact integer that fits into an @cpp{unsigned short}} @cpp{unsigned short} @tosObvious] - @argtype[@scheme[float] "real number" @cpp{float} + @argtype[@racket[float] "real number" @cpp{float} @toC{number converted to inexact and cast to @cpp{float}} - @toScheme{cast to @cpp{double} and encapsulated as an inexact number}] + @toRacket{cast to @cpp{double} and encapsulated as an inexact number}] - @argtype[@scheme[double] "real number" @cpp{double} + @argtype[@racket[double] "real number" @cpp{double} @toC{number converted to inexact} - @toScheme{encapsulated as an inexact number}] + @toRacket{encapsulated as an inexact number}] - @argtype[@scheme[char-string] @elem{byte string or @scheme[#f]} @cpp{char*} - @toC{string @|goesto| contained byte-array pointer, @scheme[#f] @|goesto| @cpp{NULL}} - @toScheme{@cpp{NULL} @|goesto| @scheme[#f], anything else @|goesto| new byte string created by copying the string}] + @argtype[@racket[char-string] @elem{byte string or @racket[#f]} @cpp{char*} + @toC{string @|goesto| contained byte-array pointer, @racket[#f] @|goesto| @cpp{NULL}} + @toRacket{@cpp{NULL} @|goesto| @racket[#f], anything else @|goesto| new byte string created by copying the string}] - @argtype[@scheme[nonnull-char-string] "byte string" @cpp{char*} + @argtype[@racket[nonnull-char-string] "byte string" @cpp{char*} @toC{byte string's contained byte-array pointer} - @toScheme{new byte string created by copying the string}] + @toRacket{new byte string created by copying the string}] - @argtype[@scheme[scheme-object] "any value" @cpp{Scheme_Object*} + @argtype[@racket[racket-object] "any value" @cpp{Racket_Object*} @toC{no conversion} - @toScheme{no conversion}] + @toRacket{no conversion}] - @argtype[@scheme[(pointer _bstr)] @elem{an opaque c-pointer value, identified as type @scheme[bstr], or @scheme[#f]} @cpp{@scheme[_bstr]*} - @toC{@scheme[#f] @|goesto| @cpp{NULL}, c-pointer @|goesto| contained pointer cast to @cpp{@scheme[_bstr]*}} - @toScheme{@cpp{NULL} @|goesto| @scheme[#f], anything else @|goesto| new c-pointer containing the pointer - and identified as type @scheme[_bstr]}] + @argtype[@racket[(pointer _bstr)] @elem{an opaque c-pointer value, identified as type @racket[bstr], or @racket[#f]} @cpp{@racket[_bstr]*} + @toC{@racket[#f] @|goesto| @cpp{NULL}, c-pointer @|goesto| contained pointer cast to @cpp{@racket[_bstr]*}} + @toRacket{@cpp{NULL} @|goesto| @racket[#f], anything else @|goesto| new c-pointer containing the pointer + and identified as type @racket[_bstr]}] ] -The @scheme[return-type] must be @schemeidfont{void} or one of the -@scheme[arg-type] keywords.} +The @racket[return-type] must be @racketidfont{void} or one of the +@racket[arg-type] keywords.} @defform[(c-declare code-string)]{ Declares arbitrary C code to appear after @filepath{escheme.h} or @filepath{scheme.h} is included, but before any other code in the -compilation environment of the declaration. A @scheme[c-declare] form +compilation environment of the declaration. A @racket[c-declare] form can appear only at the top-level or within a module's top-level sequence. -The @scheme[code] code will appear on a new line in the file for C -compilation. Multiple @scheme[c-include] declarations are concatenated +The @racket[code] code will appear on a new line in the file for C +compilation. Multiple @racket[c-include] declarations are concatenated (with newlines) in order to produces a sequence of declarations.} @defform[(c-include path-spec)]{ -Expands to a use of @scheme[c-declare] with the content of -@scheme[path-spec]. The @scheme[path-spec] has the same form as for -@schememodname[mzlib/include]'s @scheme[include].} +Expands to a use of @racket[c-declare] with the content of +@racket[path-spec]. The @racket[path-spec] has the same form as for +@racketmodname[mzlib/include]'s @racket[include].} @(bibliography (bib-entry 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 fa46011bca..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)) @@ -660,7 +675,7 @@ (define base-rb (and (boolean? show-base) (instantiate radio-box% () (label (string-constant executable-base)) - (choices (list "MzScheme" "MrEd")) + (choices (list "Racket" "GRacket")) (parent base-panel) (callback (lambda (rb e) (reset-filename-suffix)))))) @@ -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 992434d25f..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 MzScheme'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 ``Scheme'')} - @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 MrEd or MzScheme - 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/dynext/dynext.scrbl b/collects/dynext/dynext.scrbl index 9d312a05c6..7324250053 100644 --- a/collects/dynext/dynext.scrbl +++ b/collects/dynext/dynext.scrbl @@ -35,7 +35,7 @@ Compiles the given input file (C source) to the given output file (a compiled-object file). The @scheme[quiet?] argument indicates whether command should be echoed to the current output port. The @scheme[include-dirs] argument is a list of directories to search for -include files; the PLT Scheme installation's @filepath{include} +include files; the Racket installation's @filepath{include} directories are added automatically.} @@ -358,20 +358,20 @@ Appends the platform-standard dynamic-extension file suffix to (program any/c #f)) (or/c path? false/c)]{ -Strips the Scheme file suffix from @scheme[s] and returns a stripped +Strips the Racket file suffix from @scheme[s] and returns a stripped path. Unlike the other functions below, when @scheme[program] is not @scheme[#f], then any suffix (including no suffix) is allowed. If -@scheme[s] is not a Scheme file and @scheme[program] is @scheme[#f], +@scheme[s] is not a Racket file and @scheme[program] is @scheme[#f], @scheme[#f] is returned.} @defproc[(extract-base-filename/c (s path-string?) (program any/c #f)) (or/c path? false/c)]{ -Strips the Scheme file suffix from @scheme[s] and -returns a stripped path. If @scheme[s] is not a Scheme file name and +Strips the Racket file suffix from @scheme[s] and +returns a stripped path. If @scheme[s] is not a Racket file name and @scheme[program] is a symbol, and error is signaled. If @scheme[s] is -not a Scheme file and @scheme[program] is @scheme[#f], @scheme[#f] is +not a Racket file and @scheme[program] is @scheme[#f], @scheme[#f] is returned.} @defproc[(extract-base-filename/kp (s path-string?) (program any/c #f)) (or/c path? false/c)]{ 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/errortrace/scribblings/errortrace.scrbl b/collects/errortrace/scribblings/errortrace.scrbl index aea23f9b09..b7ee22db0e 100644 --- a/collects/errortrace/scribblings/errortrace.scrbl +++ b/collects/errortrace/scribblings/errortrace.scrbl @@ -10,9 +10,9 @@ @title[#:tag "top"]{@bold{Errortrace}: Debugging and Profiling} @bold{Errortrace} is a stack-trace-on-exceptions, profiler, and -coverage tool for MzScheme. It is not a complete debugger; DrScheme +coverage tool for Racket. It is not a complete debugger; DrRacket provides more. Meanwhile, using Errortrace might be better than -MzScheme's limited stack-trace reporting. +Racket's limited stack-trace reporting. @table-of-contents[] @@ -29,19 +29,19 @@ Then, @itemize[ @item{If your program has a module file @nonterm{prog}, run it with - @commandline{mzscheme -l errortrace -t @nonterm{prog}}} + @commandline{racket -l errortrace -t @nonterm{prog}}} @item{If you program is a non-module top-level sequence of definitions and expressions, you can instead add @schemeblock[(require errortrace)] - to the beginning of the program or start MzScheme with the @Flag{l} option before the + to the beginning of the program or start Racket with the @Flag{l} option before the arguments to load your program: - @commandline{mzscheme -l errortrace ...}} + @commandline{racket -l errortrace ...}} @item{If you have no main program and you want to use - MzScheme interactively, include the @Flag{i} flag + Racket interactively, include the @Flag{i} flag before @Flag{l}: - @commandline{mzscheme -i -l errortrace}} + @commandline{racket -i -l errortrace}} ] After starting @schememodname[errortrace] in one of these ways, when an @@ -64,7 +64,7 @@ handler or the error display handler. Invoking the @schememodname[errortrace] module sets the compilation -handler to instrument Scheme source code. It also sets the error +handler to instrument Racket source code. It also sets the error display handler to report source information for an exception, and it sets the @scheme[use-compiled-file-paths] parameter to trigger the use of Errortrace-specific @filepath{.zo} files. diff --git a/collects/file/scribblings/file.scrbl b/collects/file/scribblings/file.scrbl index c626178876..17cd6d2e4c 100644 --- a/collects/file/scribblings/file.scrbl +++ b/collects/file/scribblings/file.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require "common.ss") -@title{@bold{File}: PLT File Format Libraries} +@title{@bold{File}: Racket File Format Libraries} @table-of-contents[] 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 6ce387d291..f704fde98c 100644 --- a/collects/framework/private/scheme.rkt +++ b/collects/framework/private/scheme.rkt @@ -323,7 +323,7 @@ (define (add-coloring-preferences-panel) (color-prefs:add-to-preferences-panel - "Scheme" + "Racket" (λ (parent) (for-each (λ (line) @@ -1186,8 +1186,8 @@ (values lexeme type paren start end backup-delta mode))))) (define/override (put-file text sup directory default-name) - (parameterize ([finder:default-extension "ss"] - [finder:default-filters '(["Scheme Sources" "*.ss;*.scm"] + (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 (sup directory default-name))) diff --git a/collects/frtime/scribblings/frtime.scrbl b/collects/frtime/scribblings/frtime.scrbl index cd309cfbab..c33b90beab 100644 --- a/collects/frtime/scribblings/frtime.scrbl +++ b/collects/frtime/scribblings/frtime.scrbl @@ -17,8 +17,8 @@ @author["Greg Cooper"] The @schememodname[frtime] language supports declarative construction of -reactive systems in a syntax very similar to that of MzScheme. To -interact with FrTime, select FrTime from the "Choose Language" menu. +reactive systems in a syntax very similar to that of Racket. To +interact with FrTime, select @onscreen{FrTime} from the @onscreen{Choose Language} menu. You can also make FrTime the language for a module: @schemeblock[ @@ -144,7 +144,7 @@ anything else.} any]{provides a mechanism for applying ordinary Scheme primitives to behaviors. If any of the @scheme[val]s are behaviors, returns a behavior whose current value is always equal to @scheme[(proc -(value-now arg) ...)]. In FrTime, many MzScheme primitives are +(value-now arg) ...)]. In FrTime, many Racket primitives are implicitly lifted.} The following forms allow importation of lifted procedures that aren't diff --git a/collects/games/scribblings/pousse.scrbl b/collects/games/scribblings/pousse.scrbl index 46a8c7e0a2..56643ac7ab 100644 --- a/collects/games/scribblings/pousse.scrbl +++ b/collects/games/scribblings/pousse.scrbl @@ -3,7 +3,7 @@ @gametitle["Pousse" "pousse" "Tic-Tac-Toe-like Game"] -@onscreen{Pousse} (French for "push", pronounced "poo-ss") is a 2 +@onscreen{Pousse} (French for ``push,'' pronounced ``poo-ss'') is a 2 person game, played on an @math{N} by @math{N} board (usually 4 by 4). Initially the board is empty, and the players take turns inserting one marker of their color (@onscreen{X} or @onscreen{O}) on the board. diff --git a/collects/graphics/scribblings/traditional-turtles.scrbl b/collects/graphics/scribblings/traditional-turtles.scrbl index 26d76687b5..b1bcfde7ce 100644 --- a/collects/graphics/scribblings/traditional-turtles.scrbl +++ b/collects/graphics/scribblings/traditional-turtles.scrbl @@ -215,7 +215,7 @@ For @scheme[fern1], you will probably want to point the turtle up before running this one, with something like: @schemeblock[ -@scheme[(turn/radians (- (/ pi 2)))] +(turn/radians (- (/ pi 2))) ] For @scheme[fern2], you may need to backup a little.} diff --git a/collects/help/installer.rkt b/collects/help/installer.rkt index 9507d8646a..d2f92c69a7 100644 --- a/collects/help/installer.rkt +++ b/collects/help/installer.rkt @@ -1,8 +1,9 @@ #lang scheme/base ;; Builds different kinds of executables for different platforms. - -;; proposed changes below -robby. +;; The `plt-help' executable is for backward compatibity. +;; The `Racket Documentation' executable is to help Windows and +;; Mac users who are completely lost and need something to click. (provide post-installer) (require launcher) @@ -23,11 +24,11 @@ make-mzscheme-launcher mzscheme-program-launcher-path '()))) - (for ([variant (variants)]) + (for ([variant (remove* '(script-3m script-cgc) (variants))]) (parameterize ([current-launcher-variant variant]) (mk-launcher '("-l-" "help/help") - (mk-path "plt-help") ;; change to "Racket Docs" - `([exe-name . "plt-help"] ;; get rid of this (in favor of 'raco docs') + (mk-path (if mr? "Racket Documentation" "plt-help")) + `([exe-name . ,(if mr? "Racket Documentation" "plt-help")] [relative? . #t] [framework-root . #f] [dll-dir . #f] 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/lang/htdp-lib.scrbl b/collects/lang/htdp-lib.scrbl index 3a86ab2155..bdae269eee 100644 --- a/collects/lang/htdp-lib.scrbl +++ b/collects/lang/htdp-lib.scrbl @@ -63,8 +63,9 @@ Student language for @|htdp|; see @htdp-ref["advanced"]. @defmodule[lang/plt-pretty-big-text] The @schememodname[lang/plt-pretty-big-text] module is similar to the -@italic{HtDP} Advanced Student language, but with more of PLT Scheme's -libraries. It provides the bindings of @schememodname[mzscheme], +@italic{HtDP} Advanced Student language, but with more of Racket's +libraries in legacy form. It provides the bindings of +@schememodname[mzscheme], @schememodname[mzlib/etc], @schememodname[mzlib/file], @schememodname[mzlib/list], @schememodname[mzlib/class], @schememodname[mzlib/unit], @schememodname[mzlib/include], @@ -82,7 +83,7 @@ libraries. It provides the bindings of @schememodname[mzscheme], The @schememodname[lang/plt-pretty-big] module extends @scheme[lang/plt-pretty-big-text] with @schememodname[scheme/gui/base] and @schememodname[lang/imageeq]. This language corresponds to the -@onscreen{Pretty Big Scheme} legacy language in DrScheme. +@onscreen{Pretty Big} legacy language in DrRacket. @; ---------------------------------------------------------------------- diff --git a/collects/lazy/info.rkt b/collects/lazy/info.rkt index 509dd61822..92bd040cf5 100644 --- a/collects/lazy/info.rkt +++ b/collects/lazy/info.rkt @@ -5,6 +5,6 @@ (define scribblings '(("lazy.scrbl" () (experimental)))) (define drscheme-language-modules '(("lazy.ss" "lazy"))) (define drscheme-language-positions - `((,(string-constant experimental-languages) "Lazy Scheme"))) + `((,(string-constant experimental-languages) "Lazy Racket"))) (define drscheme-language-numbers '((1000 -500))) -(define drscheme-language-one-line-summaries '("Lazy Scheme")) +(define drscheme-language-one-line-summaries '("Lazy Racket")) diff --git a/collects/lazy/lazy.scrbl b/collects/lazy/lazy.scrbl index b27d8056ec..747d4b50b3 100644 --- a/collects/lazy/lazy.scrbl +++ b/collects/lazy/lazy.scrbl @@ -34,13 +34,13 @@ @(require scribble/manual) -@title{@bold{Lazy Scheme}} +@title{@bold{Lazy Racket}} @author["Eli Barzilay"] @defmodulelang[lazy] -Lazy Scheme is available as both a language level and a module that +Lazy Racket is available as both a language level and a module that can be used to write lazy code. To write lazy code, simply use @schememodname[lazy] as your module's language: 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/make/make.scrbl b/collects/make/make.scrbl index 2f16fb91cf..e758262bf1 100644 --- a/collects/make/make.scrbl +++ b/collects/make/make.scrbl @@ -16,9 +16,9 @@ @title{@bold{Make}: Dependency Manager} -The @schememodname[make] library provides a Scheme version of the +The @schememodname[make] library provides a Racket version of the popular @exec{make} utility. Its syntax is intended to imitate the -syntax of @exec{make}, only in Scheme. +syntax of @exec{make}, only in Racket. @table-of-contents[] @@ -26,7 +26,7 @@ syntax of @exec{make}, only in Scheme. @section[#:tag "overview"]{Overview} -@margin-note{If you want to build Scheme modules with automatic +@margin-note{If you want to build Racket modules with automatic dependency tracking, just use @exec{raco make} as described in @|raco-manual|.} @@ -77,10 +77,10 @@ utility uses existing programs to build your project --- each rule has a shell command line. The @schememodname[make] library provides similar functionality, -except that the description is in Scheme, and the steps that are -needed to build target files are implemented as Scheme functions. +except that the description is in Racket, and the steps that are +needed to build target files are implemented as Racket functions. -Here's a Scheme program that is equivalent to the above: +Here's a Racket program that is equivalent to the above: @schemeblock[ (require make) @@ -258,7 +258,7 @@ function helps with a few: @item{taming to some degree the differing conventions of Unix and Windows, } - @item{setting up suitable dependencies on PLT Scheme headers, and} + @item{setting up suitable dependencies on Racket headers, and} @item{using a pre-compiled binary when a @filepath{precompiled} directory is present.} 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/mysterx/scribblings/com.scrbl b/collects/mysterx/scribblings/com.scrbl index 061f233bc9..9e71016673 100644 --- a/collects/mysterx/scribblings/com.scrbl +++ b/collects/mysterx/scribblings/com.scrbl @@ -3,7 +3,7 @@ @title[#:tag "com" #:style 'toc]{COM} -MysterX allows scripting of most COM components from Scheme. A COM +MysterX allows scripting of most COM components from Racket. A COM component can be scripted in MysterX if it supports OLE Automation via the @tt{IDispatch} interface, and if it publishes type information using the @tt{ITypeInfo} interface. diff --git a/collects/mysterx/scribblings/html.scrbl b/collects/mysterx/scribblings/html.scrbl index d74f2765b2..8a772a5a6c 100644 --- a/collects/mysterx/scribblings/html.scrbl +++ b/collects/mysterx/scribblings/html.scrbl @@ -12,7 +12,7 @@ Goodman's @italic{Dynamic HTML} will have more complete information. Many of the @scheme[mx-element%] methods have two variants, a - version that takes or returns Scheme data, and another + version that takes or returns Racket data, and another @schemeidfont{-native} version that takes or returns a string. For methods that return values of element properties, we assume two characteristics, which we do not mention in the methods' diff --git a/collects/mysterx/scribblings/methprop.scrbl b/collects/mysterx/scribblings/methprop.scrbl index ebc280e7d2..db955d9dc6 100644 --- a/collects/mysterx/scribblings/methprop.scrbl +++ b/collects/mysterx/scribblings/methprop.scrbl @@ -3,7 +3,7 @@ @title[#:tag "methprop"]{COM Methods and Properties} - MysterX allows scripting of most COM components from Scheme. A COM + MysterX allows scripting of most COM components from Racket. A COM component can be scripted in MysterX if it supports OLE Automation via the @tt{IDispatch} interface, and if it publishes type information using the @tt{ITypeInfo} interface. diff --git a/collects/mysterx/scribblings/mysterx.scrbl b/collects/mysterx/scribblings/mysterx.scrbl index 754c1e729b..1da7aaffdd 100644 --- a/collects/mysterx/scribblings/mysterx.scrbl +++ b/collects/mysterx/scribblings/mysterx.scrbl @@ -1,12 +1,12 @@ #lang scribble/doc @(require "common.ss") -@title{@bold{MysterX}: Using Windows COM Objects in Scheme} +@title{@bold{MysterX}: Using Windows COM Objects in Racket} @author["Paul Steckler"] @bold{MysterX} is a toolkit for building Windows applications from -@as-index{ActiveX} and COM components, using Scheme as glue code. +@as-index{ActiveX} and COM components, using Racket as glue code. Dynamic HTML (DHTML) is used for component presentation and event-handling. diff --git a/collects/mysterx/scribblings/overview.scrbl b/collects/mysterx/scribblings/overview.scrbl index b633d6f49c..6a7b1f0b9e 100644 --- a/collects/mysterx/scribblings/overview.scrbl +++ b/collects/mysterx/scribblings/overview.scrbl @@ -12,11 +12,11 @@ Recent versions of Windows come with DCOM; DCOM packages for Windows Two Windows DLLs support low-level operations in MysterX: @filepath{myspage.dll} and @filepath{myssink.dll}. Both are installed -in the registry (using @exec{regsvr32.exe}) when Setup PLT runs the -MysterX post-installer. If you move the location of your PLT -installation, you may need to re-run Setup PLT to make MysterX -work. Neither of these DLLs is specific to a PLT Scheme version, so -it's ok for one version of PLT Scheme to use the DLLs registered by +in the registry (using @exec{regsvr32.exe}) when @exec{raco setup} runs the +MysterX post-installer. If you move the location of your Racket +installation, you may need to re-run @exec{raco setup} to make MysterX +work. Neither of these DLLs is specific to a Racket version, so +it's ok for one version of Racket to use the DLLs registered by another. @margin-note{Prior to version 369.4, @filepath{myssink.dll} was @@ -77,7 +77,7 @@ class system, you may also need ] Several MysterX procedures take HTML strings as input. The -@schememodname[xml] library provides procedures that convert Scheme +@schememodname[xml] library provides procedures that convert Racket syntax into XML strings. You may find using these procedures useful in creating HTML strings for use by MysterX. diff --git a/collects/mzcom/mzcom.scrbl b/collects/mzcom/mzcom.scrbl index 8528183b7d..00f8c91d9d 100644 --- a/collects/mzcom/mzcom.scrbl +++ b/collects/mzcom/mzcom.scrbl @@ -9,20 +9,20 @@ (list @elem{@(tt name) COM @|what|}) (apply tt proto))) -@title{@bold{MzCOM}: Scheme as a Windows COM Object} +@title{@bold{MzCOM}: Racket as a Windows COM Object} @author["Paul Steckler"] @exec{MzCOM.exe} is a Windows COM (i.e., Component Object Model) class -wrapper for PLT Scheme. +wrapper for Racket. During normal installation of MzCOM, the executable is registered as a -COM object automatically. If you move the PLT Scheme installation +COM object automatically. If you move the Racket installation folder, re-register @exec{MzCOM.exe} with @commandline{mzcom.exe /RegServer} -The @exec{MzCOM.exe} executable find DLLs and PLT Scheme library +The @exec{MzCOM.exe} executable find DLLs and Racket library collections relative to its own path. @; ---------------------------------------------------------------------- @@ -61,11 +61,11 @@ From Visual C++: where @tt{} is the version number. You'll need the definition of @tt{IID_IMzObj} (see @secref["guids"]). The header file @filepath{mzcom.h} is generated as @filepath{src\worksp\mzcom\} when -building from the PLT Scheme source distribution. The above C/C++ code +building from the Racket source distribution. The above C/C++ code is for illustration; your actual code should check return values, of course. -Using @schememodname[mysterx] to manipulate COM objects within Scheme, +Using @schememodname[mysterx] to manipulate COM objects within Racket, you can load MzCOM with either @schemeblock[ @@ -84,7 +84,7 @@ methods may be called directly or by using OLE Automation. @section[#:tag "guids"]{GUIDs} -When compiled from the PLT Scheme source distibrution, the directory +When compiled from the Racket source distibrution, the directory @filepath{src\worksp\mzcom\} contains the file @filepath{MzCOM_i.c} that contains GUIDs for MzCOM. Those GUIDs are as follows: @@ -122,15 +122,15 @@ MzCOM support three COM methods: Takes and returns @tt{BSTR}s (BASIC strings). The returned value is the result of evaluating the input expression, formatted as a string. The input string may contain several - S-expressions. The embedded PLT Scheme updates its environment + S-expressions. The embedded Racket updates its environment with each evaluation. Therefore, it is possible to define procedures in a call to @tt{Eval}, and use the procedures in subsequent calls.} @item{@com-index["Reset" "method"]{Reset :: void Reset(void)} - Resets the Scheme environment to the initial environment. - Also, the custodian for the primary Scheme thread is invoked, + Resets the Racket environment to the initial environment. + Also, the custodian for the primary Racket thread is invoked, shutting all its managed values.} ] @@ -155,8 +155,8 @@ means to obtain COM error information. @section{Evaluation thread} -The PLT Scheme evaluator runs in a Win32 thread created when MzCOM is -loaded. If an expression kills the primary MzScheme thread, as in +The Racket evaluator runs in a Win32 thread created when MzCOM is +loaded. If an expression kills the primary Racket thread, as in @schemeblock[ (kill-thread (current-thread)) diff --git a/collects/mzlib/restart.rkt b/collects/mzlib/restart.rkt index 4e1def8adf..cf6777055d 100644 --- a/collects/mzlib/restart.rkt +++ b/collects/mzlib/restart.rkt @@ -97,7 +97,7 @@ (let ([n (make-base-empty-namespace)] [argv (if args (list->vector args) (vector))]) (parameterize ([current-command-line-arguments argv] - [print-as-quasiquote #f]) + [print-as-expression #f]) (thread-wait (thread (lambda () diff --git a/collects/mzlib/scribblings/mzlib.scrbl b/collects/mzlib/scribblings/mzlib.scrbl index 19fe687e37..fd5ed65e56 100644 --- a/collects/mzlib/scribblings/mzlib.scrbl +++ b/collects/mzlib/scribblings/mzlib.scrbl @@ -1,10 +1,10 @@ #lang scribble/doc @(require "common.ss") -@title{@bold{MzLib}: Legacy PLT Libraries} +@title{@bold{MzLib}: Legacy Racket Libraries} The @filepath{mzlib} collection contains wrappers and libraries for -compatibility with older versions of PLT Scheme. In many ways, the +compatibility with older versions of Racket. In many ways, the libraries of the @filepath{mzlib} collection go with the @schememodname[mzscheme] legacy language. Newer variants of many libraries reside in the @filepath{scheme} collection. diff --git a/collects/net/scribblings/net.scrbl b/collects/net/scribblings/net.scrbl index ca20926846..23128e0fda 100644 --- a/collects/net/scribblings/net.scrbl +++ b/collects/net/scribblings/net.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require "common.ss") -@title{@bold{Net}: PLT Networking Libraries} +@title{@bold{Net}: Racket Networking Libraries} @table-of-contents[] 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 aa191dbe1c..d7d75bff2f 100644 --- a/collects/openssl/openssl.scrbl +++ b/collects/openssl/openssl.scrbl @@ -2,22 +2,23 @@ @(require scribble/manual scribble/bnf (for-label openssl - scheme)) + scheme + openssl/sha1)) @title{@bold{OpenSSL}} @defmodule[openssl] The @schememodname[openssl] library provides glue for the OpenSSL -library with the Scheme port system. It provides functions nearly -identically to the standard TCP subsystem in PLT Scheme, plus a +library with the Racket port system. It provides functions nearly +identically to the standard TCP subsystem in Racket, plus a generic @scheme[ports->ssl-ports] interface. To use this library, you will need OpenSSL installed on your machine, but @itemize[ - @item{for Windows, the PLT Scheme distribution for Windows includes + @item{for Windows, the Racket distribution for Windows includes the necessary DLLs.} @item{for Mac OS X, version 10.2 and later provides the necessary @@ -339,13 +340,42 @@ 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} and @filepath{ssleay32.dll}, where the DLLs are located in the same place as @filepath{libmzsch@nonterm{vers}.dll} (where @nonterm{vers} -is either @tt{xxxxxxx} or a mangling of PLT Scheme's version -number). The DLLs are distributed as part of PLT Scheme. +is either @tt{xxxxxxx} or a mangling of Racket's version +number). The DLLs are distributed as part of Racket. For Unix variants, @schememodname[openssl] relies on @filepath{libcryto.so} and @filepath{libssl.so}, which must be 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/plot/plot.scrbl b/collects/plot/plot.scrbl index 23d7987fad..0f67aed418 100644 --- a/collects/plot/plot.scrbl +++ b/collects/plot/plot.scrbl @@ -260,7 +260,7 @@ plots, fit curves to data, and some useful miscellaneous functions. @subsection{Plotting} The @scheme[plot] and @scheme[plot3d] functions generate plots that can be -viewed in the DrScheme interactions window. +viewed in the DrRacket interactions window. @defproc[(plot [data ((is-a?/c 2d-view%) . -> . void?)] [#:width width real? 400] diff --git a/collects/preprocessor/scribblings/preprocessor.scrbl b/collects/preprocessor/scribblings/preprocessor.scrbl index 91c399917c..5d69401f1f 100644 --- a/collects/preprocessor/scribblings/preprocessor.scrbl +++ b/collects/preprocessor/scribblings/preprocessor.scrbl @@ -8,13 +8,13 @@ @author["Eli Barzilay"] -The @filepath{preprocessor} collection defines two Scheme-based -preprocessors for texts that can have embedded Scheme code. The two +The @filepath{preprocessor} collection defines two Racket-based +preprocessors for texts that can have embedded Racket code. The two processors share a few features, like several command-line flags and -the fact that embedded Scheme code is case-sensitive by default. +the fact that embedded Racket code is case-sensitive by default. Note that these processors are @bold{not} intended as preprocessors for -Scheme code, since you have macros to do that. +Racket code, since you have macros to do that. @table-of-contents[] @@ -24,7 +24,7 @@ Scheme code, since you have macros to do that. @defmodule[preprocessor/pp-run] -The preprocessors can be invoked from Scheme programs, but the main +The preprocessors can be invoked from Racket programs, but the main usage should be through the launchers. Both launchers use code from @schememodname[preprocessor/pp-run] that allows a special invocation mode through the @DFlag{run} flag. diff --git a/collects/r6rs/scribblings/r6rs.scrbl b/collects/r6rs/scribblings/r6rs.scrbl index c0cdab6342..a77d942e36 100644 --- a/collects/r6rs/scribblings/r6rs.scrbl +++ b/collects/r6rs/scribblings/r6rs.scrbl @@ -35,7 +35,7 @@ defined by the standard. dialects of Scheme within Racket.} @|r6rs| defines both @defterm{libraries} and @defterm{top-level -programs}. Both correspond to Rackey @defterm{modules} (see +programs}. Both correspond to Racket @defterm{modules} (see @secref[#:doc guide-src "modules"]). That is, although @|r6rs| defines top-level programs as entry points, you can just as easily treat a library as an entry point when using Racket. The only difference diff --git a/collects/racket/pretty.rkt b/collects/racket/pretty.rkt index 8145448c31..32661062eb 100644 --- a/collects/racket/pretty.rkt +++ b/collects/racket/pretty.rkt @@ -221,7 +221,7 @@ (pretty-print-print-line)) (print-graph) (print-struct) (print-hash-table) (and (not display?) (print-vector-length)) (print-box) - (and (not display?) as-qq? (print-as-quasiquote)) + (and (not display?) as-qq? (print-as-expression)) (pretty-print-depth) (lambda (o display?) (size-hook o display? port))) @@ -488,14 +488,8 @@ (ormap loop (vector->list (struct->vector obj)))] [(hash? obj) - (let/ec esc - (hash-for-each - obj - (lambda (v k) - (when (or (loop v) - (loop k)) - (esc #t)))) - #f)])]) + (for/or ([(k v) (in-hash obj)]) + (or (loop v) (loop k)))])]) (hash-remove! table obj) cycle))))))) @@ -548,6 +542,67 @@ (make-mark #f (box #f))))))) (void))))) + (define (custom-print? obj) + (and (custom-print-as-constructor? obj) + (custom-print-as-constructor-accessor obj))) + + (define escapes-table + (let* ([table (make-hasheq)] + [local-cycle (and found-cycle (make-hasheq))] + [escapes! (lambda (obj) + (hash-set! table obj #t) + #t)] + [orf (lambda (a b) (or a b))]) + (and print-as-qq? + (let loop ([obj obj]) + (if (and local-cycle (hash-ref local-cycle obj #f)) + #f + (begin + (when local-cycle + (hash-set! local-cycle obj #t)) + (begin0 + (cond + [ #f] + [(vector? obj) + (let ([len (vector-length obj)]) + (let vloop ([esc? #f][i 0]) + (if (= i len) + (and esc? + (escapes! obj)) + (vloop (or (loop (vector-ref obj i)) esc?) + (add1 i)))))] + [(pair? obj) + (and (orf (loop (car obj)) + (loop (cdr obj))) + (escapes! obj))] + [(mpair? obj) + (loop (mcar obj)) + (loop (mcdr obj)) + ;; always unquoted: + #t] + [(and (box? obj) print-box?) + (and (loop (unbox obj)) + (escapes! obj))] + [(and (custom-write? obj) + (not (struct-type? obj))) + (and (or (loop (extract-sub-objects obj pport)) + (custom-print? obj)) + (escapes! obj))] + [(struct? obj) + (and (or (loop (struct->vector obj)) + (not (prefab-struct-key obj))) + (escapes! obj))] + [(hash? obj) + (and (for/fold ([esc? #f]) ([(k v) (in-hash obj)]) + (or (orf (loop v) + (loop k)) + esc?)) + (escapes! obj))] + [else #f]) + (when local-cycle + (hash-remove! local-cycle obj))))))) + table)) + (define cycle-counter 0) (define found (if found-cycle @@ -615,8 +670,44 @@ (register-printing-port-like p pport) (parameterize ([pretty-printing #t] [pretty-print-columns (or width 'infinity)]) - ((custom-write-accessor obj) obj p (not display?)))))) + ((custom-write-accessor obj) obj p (or qd (not display?))))))) + ;; ------------------------------------------------------------ + + (define (convert-pair obj) + (cond + [(list? obj) (cons (make-unquoted 'list) + ;; reconstruct first pair in case it + ;; starts a cycle: + (cons (car obj) (cdr obj)))] + [(and (pair? (cdr obj)) + (not (and found + (hash-ref found (cdr obj) #f)))) + (cons (make-unquoted 'list*) + (cons + (car obj) + (let loop ([obj (cdr obj)]) + (cond + [(and found (hash-ref found obj #f)) (list obj)] + [(pair? obj) (cons (car obj) (loop (cdr obj)))] + [else (list obj)]))))] + [else (list (make-unquoted 'cons) (car obj) (cdr obj))])) + + (define (convert-hash obj expr?) + (let ([l (hash-map obj (lambda (k v) + (if expr? + (list k v) + (cons k (make-hide v)))))]) + (if expr? + (cons (make-unquoted + (if (hash-eq? obj) + 'hasheq + (if (hash-eqv? obj) + 'hasheqv + 'hash))) + (apply append l)) + l))) + ;; ------------------------------------------------------------ ;; wr: write on a single line (define (wr* pport obj depth display? qd) @@ -637,47 +728,43 @@ (define (wr-lst l check? depth pair? car cdr open close qd) (if (pair? l) - (check-expr-found - l pport check? - #f #f - (lambda () - (if (and depth (zero? depth)) - (begin - (out open) - (out "...") - (out close)) - (begin - (out open) - (wr (car l) (dsub1 depth) qd) - (let loop ([l (cdr l)]) - (check-expr-found - l pport (and check? (pair? l)) - (lambda (s) (out " . ") (out s) (out close)) - (lambda () - (out " . ") - (wr-lst l check? (dsub1 depth) pair? car cdr open close qd) - (out close)) - (lambda () - (cond - [(pair? l) - (if (and (eq? (do-remap (car l)) 'unquote) - (not (equal? qd 1)) - (pair? (cdr l)) - (null? (cdr (cdr l)))) - (begin - (out " . ,") - (wr (car (cdr l)) (dsub1 depth) - (reader-adjust-qd (car l) qd)) - (out close)) - (begin - (out " ") - (wr (car l) (dsub1 depth) qd) - (loop (cdr l))))] - [(null? l) (out close)] - [else - (out " . ") - (wr l (dsub1 depth) qd) - (out close)])))))))) + (if (and depth (zero? depth)) + (begin + (out open) + (out "...") + (out close)) + (begin + (out open) + (wr (car l) (dsub1 depth) qd) + (let loop ([l (cdr l)]) + (check-expr-found + l pport (and check? (pair? l)) + (lambda (s) (out " . ") (out s) (out close)) + (lambda () + (out " . ") + (wr-lst l check? (dsub1 depth) pair? car cdr open close qd) + (out close)) + (lambda () + (cond + [(pair? l) + (if (and (eq? (do-remap (car l)) 'unquote) + (not (equal? qd 1)) + (pair? (cdr l)) + (null? (cdr (cdr l)))) + (begin + (out " . ,") + (wr (car (cdr l)) (dsub1 depth) + (reader-adjust-qd (car l) qd)) + (out close)) + (begin + (out " ") + (wr (car l) (dsub1 depth) qd) + (loop (cdr l))))] + [(null? l) (out close)] + [else + (out " . ") + (wr l (dsub1 depth) qd) + (out close)])))))) (begin (out open) (out close)))) @@ -694,34 +781,56 @@ => (lambda (len) (output-hooked pport obj len display?))] - [(pair? obj) - (let ([qd (to-quoted out qd "`")]) - (wr-expr obj depth pair? car cdr pair-open pair-close qd))] + [(pair? obj) + (check-expr-found + obj pport #t + #f #f + (lambda () + (let* ([qd (to-quoted out qd obj)] + [pair (if (and qd (zero? qd)) + (convert-pair obj) + obj)]) + (wr-expr pair depth pair? car cdr pair-open pair-close qd))))] [(mpair? obj) - (let ([qd (to-quoted out qd "`")]) - (wr-expr obj depth mpair? mcar mcdr mpair-open mpair-close qd))] + (check-expr-found + obj pport #t + #f #f + (lambda () + (if (and qd (zero? qd)) + (wr-expr (list (make-unquoted 'mcons) (mcar obj) (mcdr obj)) + depth pair? car cdr pair-open pair-close qd) + (wr-expr obj depth mpair? mcar mcdr mpair-open mpair-close qd))))] [(null? obj) - (let ([qd (to-quoted out qd "'")]) + (let ([qd (to-quoted out qd obj)]) (wr-lst obj #f depth pair? car cdr "(" ")" qd))] [(vector? obj) (check-expr-found obj pport #t #f #f (lambda () - (let ([qd (to-quoted out qd "`")]) - (out "#") - (when print-vec-length? - (out (number->string (vector-length obj)))) - (wr-lst (vector->repeatless-list obj) #f depth pair? car cdr "(" ")" qd))))] + (let ([qd (to-quoted out qd obj)] + [vecl (vector->repeatless-list obj)]) + (if (and qd (zero? qd)) + (wr-lst (cons (make-unquoted 'vector) vecl) + #f depth pair? car cdr "(" ")" qd) + (begin + (out "#") + (when print-vec-length? + (out (number->string (vector-length obj)))) + (wr-lst vecl #f depth pair? car cdr "(" ")" qd))))))] [(and (box? obj) print-box?) (check-expr-found obj pport #t #f #f (lambda () - (let ([qd (to-quoted out qd "`")]) - (out "#&") - (wr (unbox obj) (dsub1 depth) qd))))] + (let ([qd (to-quoted out qd obj)]) + (if (and qd (zero? qd)) + (wr-lst (list (make-unquoted 'box) (unbox obj)) + #f depth pair? car cdr "(" ")" qd) + (begin + (out "#&") + (wr (unbox obj) (dsub1 depth) qd))))))] [(and (custom-write? obj) (not (struct-type? obj))) (check-expr-found @@ -729,7 +838,10 @@ #f #f (lambda () (parameterize ([pretty-print-columns 'infinity]) - (write-custom wr* obj pport depth display? width qd))))] + (let ([qd (if (custom-print? obj) + qd + (to-quoted out qd obj))]) + (write-custom wr* obj pport depth display? width qd)))))] [(struct? obj) (if (and print-struct? (not (and depth @@ -741,13 +853,13 @@ (let* ([v (struct->vector obj struct-ellipses)] [pf? (prefab?! obj v)]) (let ([qd (if pf? - (to-quoted out qd "`") - (to-unquoted out qd))]) - (when (or (not qd) pf?) + (to-quoted out qd obj) + qd)]) + (when (or (not qd) (positive? qd)) (out "#") (when pf? (out "s"))) (wr-lst (let ([l (vector->list v)]) - (if (and qd (not pf?)) + (if (and qd (zero? qd)) (cons (make-unquoted (object-name obj)) (cdr l)) l)) @@ -763,14 +875,15 @@ obj pport #t #f #f (lambda () - (let ([qd (to-quoted out qd "`")]) - (out (if (hash-eq? obj) - "#hasheq" - (if (hash-eqv? obj) - "#hasheqv" - "#hash"))) - (wr-lst (hash-map obj (lambda (k v) - (cons k (make-hide v)))) + (let* ([qd (to-quoted out qd obj)] + [expr? (and qd (zero? qd))]) + (unless expr? + (out (if (hash-eq? obj) + "#hasheq" + (if (hash-eqv? obj) + "#hasheqv" + "#hash")))) + (wr-lst (convert-hash obj expr?) #f depth pair? car cdr "(" ")" qd)))) (parameterize ([print-hash-table #f]) @@ -790,19 +903,13 @@ [(and (pretty-print-.-symbol-without-bars) (eq? obj '|.|)) (out ".")] - [(and (equal? qd 1) - (or (eq? 'unquote obj) - (eq? 'unquote-splicing obj))) - (out ",'") - (orig-write obj pport)] [(and qd (or (symbol? obj) (keyword? obj))) (unless (eq? obj struct-ellipses) - (to-quoted out qd "'")) + (to-quoted out qd obj)) (orig-write obj pport)] [(unquoted? obj) - (let ([qd (to-unquoted out qd)]) - (orig-write (unquoted-val obj) pport))] + (orig-write (unquoted-val obj) pport)] [else ((if display? orig-display orig-write) obj pport)])) (unless (hide? obj) @@ -878,38 +985,54 @@ (pre-print pport obj) (cond [(pair? obj) - (let ([qd (to-quoted out qd "`")]) - (pp-pair obj extra depth + (let* ([qd (to-quoted out qd obj)] + [pair (if (and qd (zero? qd)) + (convert-pair obj) + obj)]) + (pp-pair pair extra depth pair? car cdr pair-open pair-close qd))] [(mpair? obj) - (let ([qd (to-quoted out qd "`")]) - (pp-pair obj extra depth - mpair? mcar mcdr mpair-open mpair-close - qd))] + (if (and qd (zero? qd)) + (pp-pair (list (make-unquoted 'mcons) (mcar obj) (mcdr obj)) + extra depth + pair? car cdr pair-open pair-close + qd) + (pp-pair obj extra depth + mpair? mcar mcdr mpair-open mpair-close + qd))] [(vector? obj) - (let ([qd (to-quoted out qd "`")]) - (out "#") - (when print-vec-length? - (out (number->string (vector-length obj)))) - (pp-list (vector->repeatless-list obj) extra pp-expr #f depth - pair? car cdr pair-open pair-close - qd))] + (let ([qd (to-quoted out qd obj)] + [vecl (vector->repeatless-list obj)]) + (if (and qd (zero? qd)) + (pp-pair (cons (make-unquoted 'vector) vecl) + extra depth + pair? car cdr pair-open pair-close + qd) + (begin + (out "#") + (when print-vec-length? + (out (number->string (vector-length obj)))) + (pp-list vecl extra pp-expr #f depth + pair? car cdr pair-open pair-close + qd))))] [(and (custom-write? obj) (not (struct-type? obj))) - (let ([qd (to-unquoted out qd)]) + (let ([qd (if (custom-print? obj) + qd + (to-quoted out qd obj))]) (write-custom pp* obj pport depth display? width qd))] [(struct? obj) ; print-struct is on if we got here (let* ([v (struct->vector obj struct-ellipses)] [pf? (prefab?! obj v)]) (let ([qd (if pf? - (to-quoted out qd "`") - (to-unquoted out qd))]) - (when (or (not qd) pf?) + (to-quoted out qd obj) + qd)]) + (when (or (not qd) (positive? qd)) (out "#") (when pf? (out "s"))) (pp-list (let ([l (vector->list v)]) - (if (and qd (not pf?)) + (if (and qd (zero? qd)) (cons (make-unquoted (object-name obj)) (cdr l)) l)) @@ -917,19 +1040,27 @@ pair? car cdr pair-open pair-close qd)))] [(hash? obj) - (let ([qd (to-quoted out qd "`")]) - (out (if (hash-eq? obj) - "#hasheq" - (if (hash-eqv? obj) - "#hasheqv" - "#hash"))) - (pp-list (hash-map obj cons) extra pp-expr #f depth + (let* ([qd (to-quoted out qd obj)] + [expr? (and qd (zero? qd))]) + (unless expr? + (out (if (hash-eq? obj) + "#hasheq" + (if (hash-eqv? obj) + "#hasheqv" + "#hash")))) + (pp-list (convert-hash obj expr?) extra pp-expr #f depth pair? car cdr pair-open pair-close qd))] [(and (box? obj) print-box?) - (let ([qd (to-quoted out qd "`")]) - (out "#&") - (pr (unbox obj) extra pp-pair depth qd))]) + (let ([qd (to-quoted out qd obj)]) + (if (and qd (zero? qd)) + (pp-pair (list (make-unquoted 'box) (unbox obj)) + extra depth + pair? car cdr pair-open pair-close + qd) + (begin + (out "#&") + (pr (unbox obj) extra pp-pair depth qd))))]) (post-print pport obj))))) ;; Not possible to split obj across lines; so just write directly (wr* pport obj depth display? qd)))) @@ -953,7 +1084,10 @@ ((pretty-print-remap-stylable) head)) (let ((proc (style head expr apair? acar acdr))) (if proc - (let ([qd (to-quoted out qd "`")]) + (let* ([qd (to-quoted out qd expr)] + [pair (if (and qd (zero? qd)) + (cons (make-unquoted 'list) obj) + obj)]) (proc expr extra depth apair? acar acdr open close qd)) @@ -1264,22 +1398,16 @@ (pr obj 0 pp-expr depth qd)) - (define (to-quoted out qd str) + (define (to-quoted out qd obj) (and qd (if (zero? qd) - (begin - (out str) - (add1 qd)) + (if (hash-ref escapes-table obj #f) + qd + (begin + (out "'") + (add1 qd))) qd))) - (define (to-unquoted out qd) - (and qd - (if (zero? qd) - qd - (begin - (out ",") - (to-unquoted out (sub1 qd)))))) - ;; ------------------------------------------------------------ ;; This is where generic-write's body expressions start @@ -1313,11 +1441,9 @@ (let ((head (do-remap (car l))) (tail (cdr l))) (case head ((quote quasiquote syntax - quasisyntax unsyntax unsyntax-splicing) + quasisyntax unsyntax unsyntax-splicing + unquote unquote-splicing) (length1? tail)) - ((unquote unquote-splicing) - (and (not (equal? qd 1)) - (length1? tail))) (else #f))))) (define (reader-adjust-qd v qd) diff --git a/collects/racket/runtime-config.rkt b/collects/racket/runtime-config.rkt index 572d8a496b..006bc366d4 100644 --- a/collects/racket/runtime-config.rkt +++ b/collects/racket/runtime-config.rkt @@ -4,4 +4,4 @@ (define-values (configure) (lambda (config) - (print-as-quasiquote #t)))) + (print-as-expression #t)))) 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/redex/tests/tl-test.rkt b/collects/redex/tests/tl-test.rkt index 93b73985b2..f46fa3a98b 100644 --- a/collects/redex/tests/tl-test.rkt +++ b/collects/redex/tests/tl-test.rkt @@ -645,14 +645,14 @@ (let ([sp (open-output-string)]) (parameterize ([current-output-port sp] [current-traced-metafunctions 'all] - [print-as-quasiquote #f]) + [print-as-expression #f]) (term (f 1))) (test (get-output-string sp) ">(f 1)\n<0\n")) (let ([sp (open-output-string)]) (parameterize ([current-output-port sp] [current-traced-metafunctions '(f)] - [print-as-quasiquote #f]) + [print-as-expression #f]) (term (f 1))) (test (get-output-string sp) ">(f 1)\n<0\n"))) 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/scheme/runtime-config.rkt b/collects/scheme/runtime-config.rkt index f61c5daded..aef6106c2c 100644 --- a/collects/scheme/runtime-config.rkt +++ b/collects/scheme/runtime-config.rkt @@ -4,4 +4,4 @@ (define-values (configure) (lambda (config) - (print-as-quasiquote #f)))) + (print-as-expression #f)))) 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)]) (and l ((length l) . >= . 3) @@ -367,7 +369,7 @@ (if val? value-color #f) (list (make-element/cache (if val? value-color paren-color) '". ") - (typeset a #f "" "" "" (not val?) qq?) + (typeset a #f "" "" "" (not val?) expr?) (make-element/cache (if val? value-color paren-color) '" .")) (+ (syntax-span a) 4))) (list (syntax-source a) @@ -385,7 +387,7 @@ (cond [(eq? s 'rsquo) "'"] [else s])) - (define (loop init-line! quote-depth qq?) + (define (loop init-line! quote-depth expr? no-cons?) (lambda (c) (cond [(eq? 'code:blank (syntax-e c)) @@ -422,12 +424,13 @@ (set! dest-col 0) (out "; " comment-color)) 0 - qq?) + expr? + #f) l))] [(and (pair? (syntax-e c)) (eq? (syntax-e (car (syntax-e c))) 'code:line)) (let ([l (cdr (syntax->list c))]) - (for-each (loop init-line! quote-depth qq?) + (for-each (loop init-line! quote-depth expr? #f) l))] [(and (pair? (syntax-e c)) (eq? (syntax-e (car (syntax-e c))) 'code:hilite)) @@ -439,19 +442,19 @@ (set! src-col (syntax-column (cadr l))) (hash-set! next-col-map src-col dest-col) (set! highlight? #t) - ((loop init-line! quote-depth qq?) (cadr l)) + ((loop init-line! quote-depth expr? #f) (cadr l)) (set! highlight? h?) (set! src-col (add1 src-col)))] [(and (pair? (syntax-e c)) (eq? (syntax-e (car (syntax-e c))) 'code:quote)) (advance c init-line!) - (let ([quote-depth (to-quoted "`" qq? quote-depth out color? inc-src-col)]) + (let ([quote-depth (to-quoted c expr? quote-depth out color? inc-src-col)]) (out "(" (if (positive? quote-depth) value-color paren-color)) (set! src-col (+ src-col 1)) (hash-set! next-col-map src-col dest-col) - ((loop init-line! quote-depth qq?) + ((loop init-line! quote-depth expr? #f) (datum->syntax #'here 'quote (car (syntax-e c)))) - (for-each (loop init-line! (add1 quote-depth) qq?) + (for-each (loop init-line! (add1 quote-depth) expr? #f) (cdr (syntax->list c))) (out ")" (if (positive? quote-depth) value-color paren-color)) (set! src-col (+ src-col 1)) @@ -463,12 +466,11 @@ quasisyntax syntax unsyntax unsyntax-splicing)) (let ([v (syntax->list c)]) (and v (= 2 (length v)))) - (or (not qq?) - (quote-depth . > . 1) - (not (memq (syntax-e (car (syntax-e c))) - '(unquote unquote-splicing))))) + (or (not expr?) + (positive? quote-depth) + (quotable? c))) (advance c init-line!) - (let ([quote-depth (to-quoted "`" qq? quote-depth out color? inc-src-col)]) + (let ([quote-depth (to-quoted c expr? quote-depth out color? inc-src-col)]) (let-values ([(str quote-delta) (case (syntax-e (car (syntax-e c))) [(quote) (values "'" +inf.0)] @@ -485,12 +487,16 @@ (let ([i (cadr (syntax->list 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) qq?) i))))] + ((loop init-line! (max 0 (+ quote-depth quote-delta)) expr? #f) i))))] [(and (pair? (syntax-e c)) - (convert-infix c quote-depth qq?)) + (or (not expr?) + (positive? quote-depth) + (quotable? c)) + (convert-infix c quote-depth expr?)) => (lambda (converted) - ((loop init-line! quote-depth qq?) converted))] + ((loop init-line! quote-depth expr? #f) converted))] [(or (pair? (syntax-e c)) + (mpair? (syntax-e c)) (forced-pair? (syntax-e c)) (null? (syntax-e c)) (vector? (syntax-e c)) @@ -498,12 +504,15 @@ (prefab-struct-key (syntax-e c))) (struct-proxy? (syntax-e c))) (let* ([sh (or (syntax-property c 'paren-shape) - #\()] - [quote-depth (if (and (not qq?) + (if (and (mpair? (syntax-e c)) + (not (and expr? (zero? quote-depth)))) + #\{ + #\())] + [quote-depth (if (and (not expr?) (zero? quote-depth) (or (vector? (syntax-e c)) (struct? (syntax-e c)))) - +inf.0 + 1 quote-depth)] [p-color (if (positive? quote-depth) value-color @@ -512,24 +521,50 @@ paren-color))]) (advance c init-line!) (let ([quote-depth (if (struct-proxy? (syntax-e c)) - (to-unquoted qq? quote-depth out color? inc-src-col) - (to-quoted "`" qq? quote-depth out color? inc-src-col))]) + quote-depth + (to-quoted c expr? quote-depth out color? inc-src-col))]) + (when (and expr? (zero? quote-depth)) + (out "(" p-color) + (unless no-cons? + (out (let ([s (cond + [(pair? (syntax-e c)) + (if (syntax->list c) + "list" + (if (let ([d (cdr (syntax-e c))]) + (or (pair? d) + (and (syntax? d) + (pair? (syntax-e d))))) + "list*" + "cons"))] + [(vector? (syntax-e c)) "vector"] + [(mpair? (syntax-e c)) "mcons"] + [else (format "~a" + (if (struct-proxy? (syntax-e c)) + (syntax-e (struct-proxy-name (syntax-e c))) + (object-name (syntax-e c))))])]) + (set! src-col (+ src-col (string-length s))) + s) + symbol-color) + (out " " no-color))) (when (vector? (syntax-e c)) - (let ([vec (syntax-e c)]) - (out "#" #; (format "#~a" (vector-length vec)) p-color) - (if (zero? (vector-length vec)) - (set! src-col (+ src-col (- (syntax-span c) 2))) - (set! src-col (+ src-col (- (syntax-column (vector-ref vec 0)) - (syntax-column c) - 1)))))) + (unless (and expr? (zero? quote-depth)) + (let ([vec (syntax-e c)]) + (out "#" p-color) + (if (zero? (vector-length vec)) + (set! src-col (+ src-col (- (syntax-span c) 2))) + (set! src-col (+ src-col (- (syntax-column (vector-ref vec 0)) + (syntax-column c) + 1))))))) (when (struct? (syntax-e c)) - (out "#s" p-color) - (set! src-col (+ src-col 2))) - (out (case sh - [(#\[ #\?) "["] - [(#\{) "{"] - [else "("]) - p-color) + (unless (and expr? (zero? quote-depth)) + (out "#s" p-color) + (set! src-col (+ src-col 2)))) + (unless (and expr? (zero? quote-depth)) + (out (case sh + [(#\[ #\?) "["] + [(#\{) "{"] + [else "("]) + p-color)) (set! src-col (+ src-col 1)) (hash-set! next-col-map src-col dest-col) (let lloop ([l (cond @@ -539,31 +574,33 @@ (let ([l (vector->list (struct->vector (syntax-e c)))]) ;; Need to build key datum, syntax-ize it internally, and ;; set the overall width to fit right: - (cons (let ([key (syntax-ize (prefab-struct-key (syntax-e c)) - (+ 3 (or (syntax-column c) 0)) - (or (syntax-line c) 1))] - [end (if (pair? (cdr l)) - (and (equal? (syntax-line c) (syntax-line (cadr l))) - (syntax-column (cadr l))) - (and (syntax-column c) - (+ (syntax-column c) (syntax-span c))))]) - (if end - (datum->syntax #f - (syntax-e key) - (vector #f (syntax-line key) - (syntax-column key) - (syntax-position key) - (- end 1 (syntax-column key)))) - end)) - (cdr l)))] + (if (and expr? (zero? quote-depth)) + (cdr l) + (cons (let ([key (syntax-ize (prefab-struct-key (syntax-e c)) + (+ 3 (or (syntax-column c) 0)) + (or (syntax-line c) 1))] + [end (if (pair? (cdr l)) + (and (equal? (syntax-line c) (syntax-line (cadr l))) + (syntax-column (cadr l))) + (and (syntax-column c) + (+ (syntax-column c) (syntax-span c))))]) + (if end + (datum->syntax #f + (syntax-e key) + (vector #f (syntax-line key) + (syntax-column key) + (syntax-position key) + (max 1 (- end 1 (syntax-column key))))) + end)) + (cdr l))))] [(struct-proxy? (syntax-e c)) - (cons - (struct-proxy-name (syntax-e c)) - (struct-proxy-content (syntax-e c)))] + (struct-proxy-content (syntax-e c))] [(forced-pair? (syntax-e c)) (syntax-e c)] + [(mpair? (syntax-e c)) + (syntax-e c)] [else c])] - [first-qq? (and qq? (not (struct-proxy? (syntax-e c))))] + [first-expr? (and expr? (not (struct-proxy? (syntax-e c))) (not no-cons?))] [dotted? #f]) (cond [(and (syntax? l) @@ -573,76 +610,94 @@ '(quote unquote syntax unsyntax quasiquote quasiunsyntax)) (let ([v (syntax->list l)]) (and v (= 2 (length v)))) - (or (not qq?) + (or (not expr?) (quote-depth . > . 1) (not (memq (syntax-e (car (syntax-e l))) '(unquote unquote-splicing))))))) - (lloop (syntax-e l) first-qq? #f)] - [(or (null? l) - (and (syntax? l) - (null? (syntax-e l)))) + (lloop (syntax-e l) first-expr? #f)] + [(and (or (null? l) + (and (syntax? l) + (null? (syntax-e l))))) (void)] [(and (pair? l) (not dotted?)) - ((loop init-line! quote-depth first-qq?) (car l)) - (lloop (cdr l) qq? #f)] + ((loop init-line! quote-depth first-expr? #f) (car l)) + (lloop (cdr l) expr? #f)] [(forced-pair? l) - ((loop init-line! quote-depth first-qq?) (forced-pair-car l)) - (lloop (forced-pair-cdr l) qq? #t)] + ((loop init-line! quote-depth first-expr? #f) (forced-pair-car l)) + (lloop (forced-pair-cdr l) expr? #t)] + [(mpair? l) + ((loop init-line! quote-depth first-expr? #f) (mcar l)) + (lloop (mcdr l) expr? #t)] [else - (advance l init-line! -2) - (out ". " (if (positive? quote-depth) value-color paren-color)) - (set! src-col (+ src-col 3)) + (unless (and expr? (zero? quote-depth)) + (advance l init-line! -2) + (out ". " (if (positive? quote-depth) value-color paren-color)) + (set! src-col (+ src-col 3))) (hash-set! next-col-map src-col dest-col) - ((loop init-line! quote-depth first-qq?) l)])) + ((loop init-line! quote-depth first-expr? #f) l)])) (out (case sh [(#\[ #\?) "]"] [(#\{) "}"] [else ")"]) p-color) - (set! src-col (+ src-col 1)) - #; - (hash-set! next-col-map src-col dest-col)))] + (set! src-col (+ src-col 1))))] [(box? (syntax-e c)) (advance c init-line!) - (let ([quote-depth (to-quoted "`" qq? quote-depth out color? inc-src-col)]) - (out "#&" value-color) - (set! src-col (+ src-col 2)) + (let ([quote-depth (to-quoted c expr? quote-depth out color? inc-src-col)]) + (if (and expr? (zero? quote-depth)) + (begin + (out "(" paren-color) + (out "box" symbol-color) + (out " " no-color) + (set! src-col (+ src-col 5))) + (begin + (out "#&" value-color) + (set! src-col (+ src-col 2)))) (hash-set! next-col-map src-col dest-col) - ((loop init-line! (if qq? quote-depth +inf.0) qq?) (unbox (syntax-e c))))] + ((loop init-line! (if expr? quote-depth +inf.0) expr? #f) (unbox (syntax-e c))) + (when (and expr? (zero? quote-depth)) + (out ")" paren-color)))] [(hash? (syntax-e c)) (advance c init-line!) (let ([equal-table? (hash-equal? (syntax-e c))] [eqv-table? (hash-eq? (syntax-e c))] - [quote-depth (to-quoted "`" qq? quote-depth out color? inc-src-col)]) - (out (if equal-table? - "#hash" - (if eqv-table? - "#hasheqv" - "#hasheq")) - value-color) - (let ([delta (+ 5 (if equal-table? 0 (if eqv-table? 3 2)))] + [quote-depth (to-quoted c expr? quote-depth out color? inc-src-col)]) + (unless (and expr? (zero? quote-depth)) + (out (if equal-table? + "#hash" + (if eqv-table? + "#hasheqv" + "#hasheq")) + value-color)) + (let ([delta (+ 5 (if equal-table? 0 (if eqv-table? 3 2)) + (if (and expr? (zero? quote-depth)) 1 0))] [orig-col src-col]) (set! src-col (+ src-col delta)) (hash-set! next-col-map src-col dest-col) - ((loop init-line! (if qq? quote-depth +inf.0) qq?) + ((loop init-line! (if expr? quote-depth +inf.0) expr? (and expr? (zero? quote-depth))) (let*-values ([(l) (sort (hash-map (syntax-e c) cons) (lambda (a b) (< (or (syntax-position (cdr a)) -inf.0) (or (syntax-position (cdr b)) -inf.0))))] - [(col0) (+ (syntax-column c) delta 2)] + [(sep cap) (if (and expr? (zero? quote-depth)) + (values 1 0) + (values 3 1))] + [(col0) (+ (syntax-column c) delta cap 1)] [(l2 pos line) (for/fold ([l2 null][col col0][line (syntax-line c)]) ([p (in-list l)]) - (let* ([tentative (syntax-ize (car p) 0)] + (let* ([tentative (syntax-ize (car p) 0 + #:expr? (and expr? (zero? quote-depth)))] [width (syntax-span tentative)] [col (if (= line (syntax-line (cdr p))) col col0)]) (let ([key (let ([e (syntax-ize (car p) - (max 0 (- (syntax-column (cdr p)) - width - 3)) - (syntax-line (cdr p)))]) + (max 0 (- (syntax-column (cdr p)) + width + sep)) + (syntax-line (cdr p)) + #:expr? (and expr? (zero? quote-depth)))]) (if ((syntax-column e) . <= . col) e (datum->syntax #f @@ -658,17 +713,42 @@ (make-forced-pair key (cdr p)) (vector 'here (syntax-line (cdr p)) - (max 0 (- (syntax-column key) 1)) - (max 1 (- (syntax-position key) 1)) - (+ (syntax-span (cdr p)) (syntax-span key) 5)))]) + (max 0 (- (syntax-column key) cap)) + (max 1 (- (syntax-position key) cap)) + (+ (syntax-span (cdr p)) (syntax-span key) sep cap cap)))]) (values (cons elem l2) (+ (syntax-column elem) (syntax-span elem) 2) (syntax-line elem))))))]) - (datum->syntax #f (reverse l2) (vector (syntax-source c) - (syntax-line c) - (+ (syntax-column c) delta) - (+ (syntax-position c) delta) - (max 1 (- (syntax-span c) delta)))))) + (if (and expr? (zero? quote-depth)) + ;; constructed: + (let ([l (apply append + (map (lambda (p) + (let ([p (syntax-e p)]) + (list (forced-pair-car p) + (forced-pair-cdr p)))) + (reverse l2)))]) + (datum->syntax + #f + (cons (let ([s (if equal-table? + 'hash + (if eqv-table? + 'hasheqv + 'hasheq))]) + (datum->syntax #f + s + (vector (syntax-source c) + (syntax-line c) + (+ (syntax-column c) 1) + (+ (syntax-position c) 1) + (string-length (symbol->string s))))) + l) + c)) + ;; quoted: + (datum->syntax #f (reverse l2) (vector (syntax-source c) + (syntax-line c) + (+ (syntax-column c) delta) + (+ (syntax-position c) delta) + (max 1 (- (syntax-span c) delta))))))) (set! src-col (+ orig-col (syntax-span c)))))] [(graph-reference? (syntax-e c)) (advance c init-line!) @@ -685,22 +765,22 @@ value-color paren-color)) (set! src-col (+ src-col 3)) - ((loop init-line! quote-depth qq?) (graph-defn-r (syntax-e c))))] - [(and (keyword? (syntax-e c)) qq?) + ((loop init-line! quote-depth expr? #f) (graph-defn-r (syntax-e c))))] + [(and (keyword? (syntax-e c)) expr?) (advance c init-line!) - (let ([quote-depth (to-quoted "`" qq? quote-depth out color? inc-src-col)]) - (typeset-atom c out color? quote-depth qq?) + (let ([quote-depth (to-quoted c expr? quote-depth out color? inc-src-col)]) + (typeset-atom c out color? quote-depth expr?) (set! src-col (+ src-col (or (syntax-span c) 1))))] [else (advance c init-line!) - (typeset-atom c out color? quote-depth qq?) + (typeset-atom c out color? quote-depth expr?) (set! src-col (+ src-col (or (syntax-span c) 1))) #; (hash-set! next-col-map src-col dest-col)]))) (out prefix1 #f) (set! dest-col 0) (hash-set! next-col-map init-col dest-col) - ((loop (lambda () (set! src-col init-col) (set! dest-col 0)) 0 qq?) c) + ((loop (lambda () (set! src-col init-col) (set! dest-col 0)) 0 expr? #f) c) (if (list? suffix) (map (lambda (sfx) (finish-line!) @@ -715,12 +795,13 @@ (make-table block-color (map list (reverse docs)))) (make-sized-element #f (reverse content) dest-col)))) - (define (typeset c multi-line? prefix1 prefix suffix color? qq?) - (let* ([c (syntax-ize c 0 #:qq? qq?)] + (define (typeset c multi-line? prefix1 prefix suffix color? expr?) + (let* ([c (syntax-ize c 0 #:expr? expr?)] [s (syntax-e c)]) (if (or multi-line? (eq? 'code:blank s) (pair? s) + (mpair? s) (vector? s) (struct? s) (box? s) @@ -729,9 +810,9 @@ (graph-defn? s) (graph-reference? s) (struct-proxy? s) - (and qq? (or (identifier? c) + (and expr? (or (identifier? c) (keyword? (syntax-e c))))) - (gen-typeset c multi-line? prefix1 prefix suffix color? qq?) + (gen-typeset c multi-line? prefix1 prefix suffix color? expr?) (typeset-atom c (letrec ([mk (case-lambda @@ -743,19 +824,19 @@ (make-element/cache (and color? color) elem) (make-sized-element (and color? color) elem len))])]) mk) - color? 0 qq?)))) + color? 0 expr?)))) - (define (to-element c #:qq? [qq? #f]) - (typeset c #f "" "" "" #t qq?)) + (define (to-element c #:expr? [expr? #f]) + (typeset c #f "" "" "" #t expr?)) - (define (to-element/no-color c #:qq? [qq? #f]) - (typeset c #f "" "" "" #f qq?)) + (define (to-element/no-color c #:expr? [expr? #f]) + (typeset c #f "" "" "" #f expr?)) - (define (to-paragraph c #:qq? [qq? #f]) - (typeset c #t "" "" "" #t qq?)) + (define (to-paragraph c #:expr? [expr? #f]) + (typeset c #t "" "" "" #t expr?)) - (define ((to-paragraph/prefix pfx1 pfx sfx) c #:qq? [qq? #f]) - (typeset c #t pfx1 pfx sfx #t qq?)) + (define ((to-paragraph/prefix pfx1 pfx sfx) c #:expr? [expr? #f]) + (typeset c #t pfx1 pfx sfx #t expr?)) (begin-for-syntax (define-struct variable-id (sym) @@ -886,8 +967,8 @@ (define-struct graph-reference (bx)) (define-struct graph-defn (r bx)) - (define (syntax-ize v col [line 1] #:qq? [qq? #f]) - (do-syntax-ize v col line (box #hasheq()) #f (and qq? 0))) + (define (syntax-ize v col [line 1] #:expr? [expr? #f]) + (do-syntax-ize v col line (box #hasheq()) #f (and expr? 0) #f)) (define (graph-count ht graph?) (and graph? @@ -897,23 +978,52 @@ (define-struct forced-pair (car cdr)) - (define (do-syntax-ize v col line ht graph? qq) + (define (quotable? v) + (define graph (make-hasheq)) + (let quotable? ([v v]) + (if (hash-ref graph v #f) + #t + (begin + (hash-set! graph v #t) + (cond + [(syntax? v) (quotable? (syntax-e v))] + [(pair? v) (and (quotable? (car v)) + (quotable? (cdr v)))] + [(vector? v) (andmap quotable? (vector->list v))] + [(hash? v) (for/and ([(k v) (in-hash v)]) + (and (quotable? k) + (quotable? v)))] + [(box? v) (quotable? (unbox v))] + [(and (struct? v) + (prefab-struct-key v)) + (andmap quotable? (vector->list (struct->vector v)))] + [(struct? v) (if (custom-write? v) + (if (and (custom-print-as-constructor? v) + (custom-print-as-constructor-accessor v)) + #f + #t) + #f)] + [(struct-proxy? v) #f] + [(mpair? v) #f] + [else #t]))))) + + (define (do-syntax-ize v col line ht graph? qq no-cons?) (cond [((syntax-ize-hook) v col) => (lambda (r) r)] [(shaped-parens? v) - (syntax-property (do-syntax-ize (shaped-parens-val v) col line ht #f qq) + (syntax-property (do-syntax-ize (shaped-parens-val v) col line ht #f qq #f) 'paren-shape (shaped-parens-shape v))] [(just-context? v) - (let ([s (do-syntax-ize (just-context-val v) col line ht #f qq)]) + (let ([s (do-syntax-ize (just-context-val v) col line ht #f qq #f)]) (datum->syntax (just-context-ctx v) (syntax-e s) s s (just-context-ctx v)))] [(alternate-display? v) - (let ([s (do-syntax-ize (alternate-display-id v) col line ht #f qq)]) + (let ([s (do-syntax-ize (alternate-display-id v) col line ht #f qq #f)]) (syntax-property s 'display-string (alternate-display-string v)))] @@ -924,30 +1034,49 @@ (datum->syntax #f (make-graph-reference m) (vector #f line col (+ 1 col) 1)))] + [(and qq + (zero? qq) + (or (pair? v) + (forced-pair? v) + (vector? v) + (hash? v) + (box? v) + (and (struct? v) + (prefab-struct-key v))) + (quotable? v) + (not no-cons?)) + ;; Add a quote: + (let ([l (do-syntax-ize v (add1 col) line ht #f 1 #f)]) + (datum->syntax #f + (syntax-e l) + (vector (syntax-source l) + (syntax-line l) + (sub1 (syntax-column l)) + (max 0 (sub1 (syntax-position l))) + (add1 (syntax-span l)))))] [(and (list? v) (pair? v) + (or (not qq) + (positive? qq) + (quotable? v)) (let ([s (let ([s (car v)]) (if (just-context? s) (just-context-val s) s))]) - (and - (or (memq s '(quaisquote quote)) - (and (memq s '(unquote unquote-splicing)) - (or (not qq) - (qq . > . 2)))) - s))) + (memq s '(quote unquote unquote-splicing))) + (not no-cons?)) => (lambda (s) - (let ([c (do-syntax-ize (cadr v) (+ col 1) line ht #f qq)]) + (let* ([delta (if (and qq (zero? qq)) + 1 + 0)] + [c (do-syntax-ize (cadr v) (+ col delta) line ht #f qq #f)]) (datum->syntax #f - (list (do-syntax-ize (car v) col line ht #f - (and qq - (case s - [(quaisquote) (add1 qq)] - [(unquote unquote-splicing) (sub1 qq)] - [else qq]))) + (list (do-syntax-ize (car v) col line ht #f qq #f) c) (vector #f line col (+ 1 col) - (+ 1 (syntax-span c))))))] + (+ 1 + (if (and qq (zero? qq)) 1 0) + (syntax-span c))))))] [(or (list? v) (vector? v) (and (struct? v) @@ -956,21 +1085,28 @@ (not (element? v))) (prefab-struct-key v)))) (let ([orig-ht (unbox ht)] - [graph-box (box (graph-count ht graph?))] - [qq (and qq (max 1 qq))]) + [graph-box (box (graph-count ht graph?))]) (set-box! ht (hash-set (unbox ht) v graph-box)) (let* ([graph-sz (if graph? (+ 2 (string-length (format "~a" (unbox graph-box)))) 0)] [vec-sz (cond [(vector? v) - (+ 1 #;(string-length (format "~a" (vector-length v))))] + (if (and qq (zero? qq)) 0 1)] [(struct? v) - (if (prefab-struct-key v) + (if (and (prefab-struct-key v) + (or (not qq) (positive? qq))) 2 0)] [else 0])] - [r (let ([l (let loop ([col (+ col 1 vec-sz graph-sz)] + [delta (if (and qq (zero? qq)) + (cond + [(vector? v) 8] + [(struct? v) 1] + [no-cons? 1] + [else 5]) + 1)] + [r (let ([l (let loop ([col (+ col delta vec-sz graph-sz)] [v (cond [(vector? v) (vector->short-list v values)] @@ -983,7 +1119,7 @@ [else v])]) (if (null? v) null - (let ([i (do-syntax-ize (car v) col line ht #f qq)]) + (let ([i (do-syntax-ize (car v) col line ht #f qq #f)]) (cons i (loop (+ col 1 (syntax-span i)) (cdr v))))))]) (datum->syntax #f @@ -998,8 +1134,9 @@ (vector #f line (+ graph-sz col) (+ 1 graph-sz col) - (+ 2 + (+ 1 vec-sz + delta (if (zero? (length l)) 0 (sub1 (length l))) @@ -1016,55 +1153,85 @@ [(unbox graph-box) ;; Go again, this time knowing that there will be a graph: (set-box! ht orig-ht) - (do-syntax-ize v col line ht #t qq)] + (do-syntax-ize v col line ht #t qq #f)] [else r])))] [(or (pair? v) + (mpair? v) (forced-pair? v)) - (let ([carv (if (pair? v) (car v) (forced-pair-car v))] - [cdrv (if (pair? v) (cdr v) (forced-pair-cdr v))] + (let ([carv (if (pair? v) (car v) (if (mpair? v) (mcar v) (forced-pair-car v)))] + [cdrv (if (pair? v) (cdr v) (if (mpair? v) (mcdr v) (forced-pair-cdr v)))] [orig-ht (unbox ht)] - [graph-box (box (graph-count ht graph?))] - [qq (and qq (max 1 qq))]) + [graph-box (box (graph-count ht graph?))]) (set-box! ht (hash-set (unbox ht) v graph-box)) - (let* ([inc (if graph? + (let* ([delta (if (and qq (zero? qq) (not no-cons?)) + (if (mpair? v) + 7 ; "(mcons " + (if (or (list? cdrv) + (not (pair? cdrv))) + 6 ; "(cons " + 7)) ; "(list* " + 1)] + [inc (if graph? (+ 2 (string-length (format "~a" (unbox graph-box)))) 0)] - [a (do-syntax-ize carv (+ col 1 inc) line ht #f qq)] + [a (do-syntax-ize carv (+ col delta inc) line ht #f qq #f)] [sep (if (and (pair? v) (pair? cdrv) ;; FIXME: what if it turns out to be a graph reference? (not (hash-ref (unbox ht) cdrv #f))) 0 - 3)] - [b (do-syntax-ize cdrv (+ col 1 inc (syntax-span a) sep) line ht #f qq)]) + (if (and qq (zero? qq)) + 1 + 3))] + [b (do-syntax-ize cdrv (+ col delta inc (syntax-span a) sep) line ht #f qq #t)]) (let ([r (datum->syntax #f - (cons a b) - (vector #f line (+ col inc) (+ 1 col inc) - (+ 2 sep (syntax-span a) (syntax-span b))))]) + (if (mpair? v) + (mcons a b) + (cons a b)) + (vector #f line (+ col inc) (+ delta col inc) + (+ 1 delta + (if (and qq (zero? qq)) 1 0) + sep (syntax-span a) (syntax-span b))))]) (unless graph? (set-box! ht (hash-set (unbox ht) v #f))) (cond [graph? (datum->syntax #f (make-graph-defn r graph-box) - (vector #f line col (+ 1 col) + (vector #f line col (+ delta col) (+ inc (syntax-span r))))] [(unbox graph-box) ;; Go again... (set-box! ht orig-ht) - (do-syntax-ize v col line ht #t qq)] + (do-syntax-ize v col line ht #t qq #f)] [else r]))))] [(box? v) - (let ([a (do-syntax-ize (unbox v) (+ col 2) line ht #f (and qq (max 1 qq)))]) + (let* ([delta (if (and qq (zero? qq)) + 5 ; "(box " + 2)] ; "#&" + [a (do-syntax-ize (unbox v) (+ col delta) line ht #f qq #f)]) (datum->syntax #f (box a) (vector #f line col (+ 1 col) - (+ 2 (syntax-span a)))))] + (+ delta (if (and qq (zero? qq)) 1 0) (syntax-span a)))))] [(hash? v) (let* ([delta (cond [(hash-eq? v) 7] [(hash-eqv? v) 8] [else 6])] - [pairs (do-syntax-ize (hash-map v make-forced-pair) (+ col delta) line ht #f (and qq (max 1 qq)))]) + [undelta (if (and qq (zero? qq)) + (- delta 1) + 0)] + [pairs (if (and qq (zero? qq)) + (let ([ls (do-syntax-ize (apply append (hash-map v (lambda (k v) (list k v)))) + (+ col delta -1) line ht #f qq #t)]) + (datum->syntax + #f + (let loop ([l (syntax->list ls)]) + (if (null? l) + null + (cons (cons (car l) (cadr l)) (loop (cddr l))))) + ls)) + (do-syntax-ize (hash-map v make-forced-pair) (+ col delta) line ht #f qq #f))]) (datum->syntax #f ((cond [(hash-eq? v) make-immutable-hasheq] @@ -1075,6 +1242,10 @@ (cons (syntax->datum (car p)) (cdr p)))) (syntax->list pairs))) - pairs))] + (vector (syntax-source pairs) + (syntax-line pairs) + (max 0 (- (syntax-column pairs) undelta)) + (max 1 (- (syntax-position pairs) undelta)) + (+ (syntax-span pairs) undelta))))] [else (datum->syntax #f v (vector #f line col (+ 1 col) 1))]))) 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/gui/wxme.scrbl b/collects/scribblings/gui/wxme.scrbl index 626562cfa3..6d9c4bf5f6 100644 --- a/collects/scribblings/gui/wxme.scrbl +++ b/collects/scribblings/gui/wxme.scrbl @@ -19,17 +19,17 @@ @title{WXME Decoding} -@defmodule[wxme]{The @schememodname[wxme] library provides tools for -reading @tech{WXME} @scheme[editor<%>]-format files (see -@secref["editorfileformat"]) without the @scheme[scheme/gui] library -(i.e., using @exec{mzscheme} instead of @exec{mred}).} +@defmodule[wxme]{The @racketmodname[wxme] library provides tools for +reading @tech{WXME} @racket[editor<%>]-format files (see +@secref["editorfileformat"]) without the @racket[racket/gui] library +(i.e., using @exec{racket} instead of @exec{gracket}).} @defproc[(is-wxme-stream? [in input-port?]) boolean?]{ -Peeks from @scheme[in] and returns @scheme[#t] if it starts with the +Peeks from @racket[in] and returns @racket[#t] if it starts with the magic bytes indicating a @tech{WXME}-format stream (see -@secref["editorfileformat"]), @scheme[#f] otherwise.} +@secref["editorfileformat"]), @racket[#f] otherwise.} @defproc[(wxme-port->text-port [in input-port?] [close? any/c #t]) @@ -37,10 +37,10 @@ magic bytes indicating a @tech{WXME}-format stream (see Takes an input port whose stream starts with @tech{WXME}-format data and returns an input port that produces a text form of the WXME -content, like the result of opening a WXME file in DrScheme and saving +content, like the result of opening a WXME file in DrRacket and saving it as text. -If @scheme[close?] is true, then closing the result port close the +If @racket[close?] is true, then closing the result port close the original port. See @secref["snipclassmapping"] for information about the kinds of @@ -55,24 +55,24 @@ non-text content that can be read.} Takes an input port whose stream starts with @tech{WXME}-format data and returns an input port that produces text content converted to bytes, and non-text content as ``special'' values (see -@scheme[read-char-or-special]). +@racket[read-char-or-special]). These special values produced by the new input port are different than -the ones produced by reading a file into an @scheme[editor<%>] -object. Instead of instances of the @scheme[snip%], the special values -are typically simple extensions of @scheme[object%]. See +the ones produced by reading a file into an @racket[editor<%>] +object. Instead of instances of the @racket[snip%], the special values +are typically simple extensions of @racket[object%]. See @secref["snipclassmapping"] for information about the kinds of non-text content that can be read. -If @scheme[close?] is true, then closing the result port close the +If @racket[close?] is true, then closing the result port close the original port. -The @scheme[snip-filter] procedure is applied to any special value +The @racket[snip-filter] procedure is applied to any special value generated for the stream, and its result is used as an alternate special value. If a special value (possibly produced by the filter procedure) is an -object implementing the @scheme[readable<%>] interface, then the +object implementing the @racket[readable<%>] interface, then the object's @method[readable<%> read-special] method is called to produce the special value.} @@ -93,8 +93,8 @@ any) is consumed.} void?]{ Maps a snip-class name to a quoted module path that provides a -@scheme[reader%] implementation. The module path must have the form -@scheme['(lib #,(scheme _string ...))], where each @scheme[_string] +@racket[reader%] implementation. The module path must have the form +@racket['(lib #,(racket _string ...))], where each @racket[_string] contains only alpha-numeric ASCII characters, @litchar{.}, @litchar{_}, @litchar{-}, and spaces.} @@ -102,14 +102,14 @@ contains only alpha-numeric ASCII characters, @litchar{.}, @defproc[(string->lib-path [str string?] [gui? any/c]) (cons/c (one-of/c 'lib) (listof string?))]{ -Returns a quoted module path for @scheme[str] for either -@scheme[editor<%>] mode when @scheme[gui?] is true, or -@schememodname[wxme] mode when @scheme[gui?] is @scheme[#f]. For the +Returns a quoted module path for @racket[str] for either +@racket[editor<%>] mode when @racket[gui?] is true, or +@racketmodname[wxme] mode when @racket[gui?] is @racket[#f]. For the latter, built-in mappings and mapping registered via -@scheme[register-lib-mapping!] are used. If @scheme[str] cannot be +@racket[register-lib-mapping!] are used. If @racket[str] cannot be parsed as a library path, and if no mapping is available (either because the class is built-in or not known), the result is -@scheme[#f].} +@racket[#f].} @defboolparam[unknown-extensions-skip-enabled skip?]{ @@ -130,26 +130,26 @@ default is the current platform's endian order.} @defproc[(wxme-read [in input-port?]) any/c]{ -Like @scheme[read], but for a stream that starts with +Like @racket[read], but for a stream that starts with @tech{WXME}-format data. If multiple S-expressions are in the @tech{WXME} data, they are all read and combined with -@scheme['begin]. +@racket['begin]. -If @scheme[scheme/gui/base] is available (as determined by -@scheme[gui-available?]), then @scheme[open-input-text-editor] is -used. Otherwise, @scheme[wxme-port->port] is used.} +If @racket[racket/gui/base] is available (as determined by +@racket[gui-available?]), then @racket[open-input-text-editor] is +used. Otherwise, @racket[wxme-port->port] is used.} @defproc[(wxme-read-syntax [source-v any/c] [in input-port?]) (or/c syntax? eof-object?)]{ -Like @scheme[read-syntax], but for a @tech{WXME}-format input stream. +Like @racket[read-syntax], but for a @tech{WXME}-format input stream. If multiple S-expressions are in the @tech{WXME} data, they are all -read and combined with @scheme['begin]. +read and combined with @racket['begin]. -If @scheme[scheme/gui/base] is available (as determined by -@scheme[gui-available?]), then @scheme[open-input-text-editor] is -used. Otherwise, @scheme[wxme-port->port] is used.} +If @racket[racket/gui/base] is available (as determined by +@racket[gui-available?]), then @racket[open-input-text-editor] is +used. Otherwise, @racket[wxme-port->port] is used.} @definterface[snip-reader<%> ()]{ @@ -175,7 +175,7 @@ stream. This method reads the data and returns either bytes to be returned as part of the decoded stream or any other kind of value to be returned as a ``special'' value from the decoded stream. The result value can optionally be an object that implements -@scheme[readable<%>].} +@racket[readable<%>].} } @@ -200,14 +200,14 @@ obtain the ``special'' result from the @tech{WXME}-decoding port.} @definterface[stream<%> ()]{ Represents a @tech{WXME} input stream for use by -@scheme[snip-reader<%>] instances. +@racket[snip-reader<%>] instances. @defmethod[(read-integer [what any/c]) exact-integer?]{ Reads an exact integer, analogous to @method[editor-stream-in% get-exact]. -The @scheme[what] field describes what is being read, for +The @racket[what] field describes what is being read, for error-message purposes, in case the stream does not continue with an integer.} @@ -216,34 +216,34 @@ integer.} Reads an exact integer that has a fixed size in the stream, analogous to @method[editor-stream-in% get-fixed]. -The @scheme[what] argument is as for @method[stream<%> read-integer].} +The @racket[what] argument is as for @method[stream<%> read-integer].} @defmethod[(read-inexact [what any/c]) (and/c real? inexact?)]{ Reads an inexact real number, analogous to @method[editor-stream-in% get-inexact]. -The @scheme[what] argument is as for @method[stream<%> read-integer].} +The @racket[what] argument is as for @method[stream<%> read-integer].} @defmethod[(read-raw-bytes [what any/c]) bytes?]{ Reads raw bytes, analogous to @method[editor-stream-in% get-unterminated-bytes]. -The @scheme[what] argument is as for @method[stream<%> read-integer].} +The @racket[what] argument is as for @method[stream<%> read-integer].} @defmethod[(read-bytes [what any/c]) bytes?]{ Reads raw bytes, analogous to @method[editor-stream-in% get-bytes]. -The @scheme[what] argument is as for @method[stream<%> read-integer].} +The @racket[what] argument is as for @method[stream<%> read-integer].} @defmethod[(read-editor [what any/c]) input-port?]{ Reads a nested editor, producing a new input port to extract the editor's content. -The @scheme[what] argument is as for @method[stream<%> read-integer].} +The @racket[what] argument is as for @method[stream<%> read-integer].} } @; ---------------------------------------------------------------------- @@ -256,77 +256,77 @@ time. See also @secref["editorsnipclasses"]. Ideally, the snip-class name is generated as -@schemeblock[ -(format "~s" (list '(lib #,(scheme _string ...)) - '(lib #,(scheme _string ...)))) +@racketblock[ +(format "~s" (list '(lib #,(racket _string ...)) + '(lib #,(racket _string ...)))) ] -where each element of the @scheme[format]ed list is a quoted module -path (see @scheme[module-path?]). The @scheme[_string]s must contain only +where each element of the @racket[format]ed list is a quoted module +path (see @racket[module-path?]). The @racket[_string]s must contain only alpha-numeric ASCII characters, plus @litchar{.}, @litchar{_}, -@litchar{-}, and spaces, and they must not be @scheme["."] or -@scheme[".."]. +@litchar{-}, and spaces, and they must not be @racket["."] or +@racket[".."]. In that case, the first quoted module path is used for loading @tech{WXME} files in graphical mode; the corresponding module must -provide @schemeidfont{snip-class} object that implements the -@scheme[snip-class%] class. The second quoted module path is used by -the @schememodname[wxme] library for converting @tech{WXME} streams +provide @racketidfont{snip-class} object that implements the +@racket[snip-class%] class. The second quoted module path is used by +the @racketmodname[wxme] library for converting @tech{WXME} streams without graphical support; the corresponding module must provide a -@schemeidfont{reader} object that implements the @scheme[reader<%>] -interface. Naturally, the @scheme[snip-class%] instance and -@scheme[reader<%>] instance are expected to parse the same format, but +@racketidfont{reader} object that implements the @racket[reader<%>] +interface. Naturally, the @racket[snip-class%] instance and +@racket[reader<%>] instance are expected to parse the same format, but generate different results suitable for the different contexts (i.e., graphical or not). If a snip-class name is generated as -@schemeblock[ -(format "~s" '(lib #,(scheme _string ...))) +@racketblock[ +(format "~s" '(lib #,(racket _string ...))) ] then graphical mode uses the sole module path, and -@schememodname[wxme] needs a compatibility mapping. Install one with -@scheme[register-lib-mapping!]. +@racketmodname[wxme] needs a compatibility mapping. Install one with +@racket[register-lib-mapping!]. If a snip-class name has neither of the above formats, then graphical mode can use the data only if a snip class is registered for the name, -or if it the name of one of the built-in classes: @scheme["wxtext"], -@scheme["wxtab"], @scheme["wximage"], or @scheme["wxmedia"] (for -nested editors). The @schememodname[wxme] library needs a -compatibility mapping installed with @scheme[register-lib-mapping!] +or if it the name of one of the built-in classes: @racket["wxtext"], +@racket["wxtab"], @racket["wximage"], or @racket["wxmedia"] (for +nested editors). The @racketmodname[wxme] library needs a +compatibility mapping installed with @racket[register-lib-mapping!] if it is not one of the built-in classes. Several compatibility mappings are installed automatically for the -@schememodname[wxme] library. They correspond to popular graphical -elements supported by various versions of DrScheme, including comment -boxes, fractions, XML boxes, Scheme boxes, text boxes, and images +@racketmodname[wxme] library. They correspond to popular graphical +elements supported by various versions of DrRacket, including comment +boxes, fractions, XML boxes, Racket boxes, text boxes, and images generated by the ``world'' and ``image'' teachpacks (or, more -generally, from @schememodname[mrlib/cache-image-snip]), and test-case +generally, from @racketmodname[mrlib/cache-image-snip]), and test-case boxes. -For a port created by @scheme[wxme-port->port], nested editors are -represented by instances of the @scheme[editor%] class provided by the -@schememodname[wxme/editor] library. This class provides a single +For a port created by @racket[wxme-port->port], nested editors are +represented by instances of the @racket[editor%] class provided by the +@racketmodname[wxme/editor] library. This class provides a single method, @method[editor% get-content-port], which returns a port for the editor's content. Images are represented as instances of the -@scheme[image%] class provided by the @schememodname[wxme/image] +@racket[image%] class provided by the @racketmodname[wxme/image] library. Comment boxes are represented as instances of a class that extends -@scheme[editor%] to implement @scheme[readable<%>]; see -@schememodname[wxme/comment]. The read form produces a special comment -(created by @scheme[make-special-comment]), so that the comment box -disappears when @scheme[read] is used to read the stream; the -special-comment content is the readable instance. XML, Scheme, and -text boxes similarly produce instances of @scheme[editor%] and -@scheme[readable<%>] that expand in the usual way; see -@schememodname[wxme/xml], @schememodname[wxme/scheme], and -@scheme[wxme/text]. Images from the ``world'' and ``image'' teachpacks -are packaged as instances of @scheme[cache-image%] from the -@schememodname[wxme/cache-image] library. Test-case boxes are packaged -as instances of @scheme[test-case%] from the -@schememodname[wxme/test-case] library. +@racket[editor%] to implement @racket[readable<%>]; see +@racketmodname[wxme/comment]. The read form produces a special comment +(created by @racket[make-special-comment]), so that the comment box +disappears when @racket[read] is used to read the stream; the +special-comment content is the readable instance. XML, Racket, and +text boxes similarly produce instances of @racket[editor%] and +@racket[readable<%>] that expand in the usual way; see +@racketmodname[wxme/xml], @racketmodname[wxme/scheme], and +@racket[wxme/text]. Images from the ``world'' and ``image'' teachpacks +are packaged as instances of @racket[cache-image%] from the +@racketmodname[wxme/cache-image] library. Test-case boxes are packaged +as instances of @racket[test-case%] from the +@racketmodname[wxme/test-case] library. @; ---------------------------------------- @@ -341,7 +341,7 @@ mode. @defmethod[(get-content-port) input-port?]{ -Returns a port (like the one from @scheme[wxme-port->port]) for the +Returns a port (like the one from @racket[wxme-port->port]) for the editor's content.} } @@ -358,7 +358,7 @@ Instantiated for images in a @tech{WXME} stream in text mode. @defmethod[(get-filename) (or/c bytes? false/c)]{ -Returns a filename as bytes, or @scheme[#f] if data is available +Returns a filename as bytes, or @racket[#f] if data is available instead.} @defmethod[(get-data) (or/c bytes? false/c)]{ @@ -391,7 +391,7 @@ display image.} @; ---------------------------------------- -@section{DrScheme Comment Boxes} +@section{DrRacket Comment Boxes} @defmodule[wxme/comment] @@ -403,7 +403,7 @@ A text-mode reader for comment boxes.}] @defclass[comment-editor% editor% (readable<%>)]{ -Instantiated for DrScheme comment boxes in a @tech{WXME} stream for +Instantiated for DrRacket comment boxes in a @tech{WXME} stream for text mode. @defmethod[(get-data) false/c]{ @@ -418,14 +418,14 @@ No data is available. [position (or/c exact-nonnegative-integer? false/c)]) any/c]{ -Generates a special comment using @scheme[make-special-comment]. The +Generates a special comment using @racket[make-special-comment]. The special comment contains the comment text.} } @; ---------------------------------------- -@section{DrScheme XML Boxes} +@section{DrRacket XML Boxes} @defmodule[wxme/xml] @@ -437,13 +437,13 @@ A text-mode reader for XML boxes.}] @defclass[xml-editor% editor% (readable<%>)]{ -Instantiated for DrScheme XML boxes in a @tech{WXME} stream for text +Instantiated for DrRacket XML boxes in a @tech{WXME} stream for text mode. @defmethod[(get-data) any/c]{ -Returns @scheme[#t] if whitespace is elimited from the contained XML -literal, @scheme[#f] otherwise.} +Returns @racket[#t] if whitespace is elimited from the contained XML +literal, @racket[#f] otherwise.} @defmethod[(read-special [source any/c] [line (or/c exact-nonnegative-integer? false/c)] @@ -451,33 +451,33 @@ literal, @scheme[#f] otherwise.} [position (or/c exact-nonnegative-integer? false/c)]) any/c]{ -Generates a @scheme[quasiquote] S-expression that enclosed the XML, -with @scheme[unquote] and @scheme[unquote-splicing] escapes for nested -Scheme boxes.} +Generates a @racket[quasiquote] S-expression that enclosed the XML, +with @racket[unquote] and @racket[unquote-splicing] escapes for nested +Racket boxes.} } @; ---------------------------------------- -@section{DrScheme Scheme Boxes} +@section{DrRacket Racket Boxes} @defmodule[wxme/scheme] @in[wxme/scheme @defthing[reader (is-a?/c snip-reader<%>)]{ -A text-mode reader for Scheme boxes.}] +A text-mode reader for Racket boxes.}] -@defclass[scheme-editor% editor% (readable<%>)]{ +@defclass[racket-editor% editor% (readable<%>)]{ -Instantiated for DrScheme Scheme boxes in a @tech{WXME} stream for text +Instantiated for DrRacket Racket boxes in a @tech{WXME} stream for text mode. @defmethod[(get-data) any/c]{ -Returns @scheme[#t] if the box corresponds to a splicing unquote, -@scheme[#f] for a non-splicing unquote.} +Returns @racket[#t] if the box corresponds to a splicing unquote, +@racket[#f] for a non-splicing unquote.} @defmethod[(read-special [source any/c] [line (or/c exact-nonnegative-integer? false/c)] @@ -491,7 +491,7 @@ Generates an S-expression for the code in the box.} @; ---------------------------------------- -@section{DrScheme Text Boxes} +@section{DrRacket Text Boxes} @defmodule[wxme/text] @@ -503,7 +503,7 @@ A text-mode reader for text boxes.}] @defclass[text-editor% editor% (readable<%>)]{ -Instantiated for DrScheme text boxes in a @tech{WXME} stream for text +Instantiated for DrRacket text boxes in a @tech{WXME} stream for text mode. @defmethod[(get-data) false/c]{ @@ -522,19 +522,19 @@ Generates a string containing the text.} @; ---------------------------------------- -@section{DrScheme Fractions} +@section{DrRacket Fractions} @defmodule[wxme/number] @in[wxme/number @defthing[reader (is-a?/c snip-reader<%>)]{ -A text-mode reader for DrScheme fractions that generates exact, +A text-mode reader for DrRacket fractions that generates exact, rational numbers.}] @; ---------------------------------------- -@section{DrScheme Teachpack Images} +@section{DrRacket Teachpack Images} @defmodule[wxme/cache-image] @@ -543,12 +543,12 @@ rational numbers.}] A text-mode reader for images in a WXME stream generated by the ``image'' and ``world'' teachpacks---or, more generally, by -@schememodname[mrlib/cache-image-snip].}] +@racketmodname[mrlib/cache-image-snip].}] @defclass[cache-image% object% ()]{ -Instantiated for DrScheme teachpack boxes in a @tech{WXME} stream for +Instantiated for DrRacket teachpack boxes in a @tech{WXME} stream for text mode. @defmethod[(get-argb) (vectorof byte?)]{ @@ -573,19 +573,19 @@ Returns an offset down into the image for the pinhole.} } -@section{DrScheme Test-Case Boxes} +@section{DrRacket Test-Case Boxes} @defmodule[wxme/test-case] @in[wxme/test-case @defthing[reader (is-a?/c snip-reader<%>)]{ -A text-mode reader for DrScheme test-case boxes in a WXME stream. It -generates instances of @scheme[test-case%].}] +A text-mode reader for DrRacket test-case boxes in a WXME stream. It +generates instances of @racket[test-case%].}] @defclass[test-case% object% ()]{ -Instantiated for old-style DrScheme test-case boxes in a @tech{WXME} +Instantiated for old-style DrRacket test-case boxes in a @tech{WXME} stream for text mode. @defmethod[(get-comment) (or/c false/c input-port?)]{ @@ -610,14 +610,14 @@ Returns a port for the ``error msg'' field, if any.} @defmethod[(get-enabled?) boolean?]{ -Returns @scheme[#t] if the test is enabled.} +Returns @racket[#t] if the test is enabled.} @defmethod[(get-collapsed?) boolean?]{ -Returns @scheme[#t] if the test is collapsed.} +Returns @racket[#t] if the test is collapsed.} @defmethod[(get-error-box?) boolean?]{ -Returns @scheme[#t] if the test is for an exception.} +Returns @racket[#t] if the test is for an exception.} } diff --git a/collects/scribblings/guide/boxes.scrbl b/collects/scribblings/guide/boxes.scrbl index cb6c230b09..f1dc5bfd78 100644 --- a/collects/scribblings/guide/boxes.scrbl +++ b/collects/scribblings/guide/boxes.scrbl @@ -5,9 +5,9 @@ @title[#:tag "boxes"]{Boxes} -A @deftech{box} is like a single-element vector. It prints as -@litchar{#&} followed by the printed form of the boxed value. A -@litchar{#&} form can also be used as an expression, but since the +A @deftech{box} is like a single-element vector. It can print as a +quoted @litchar{#&} followed by the printed form of the boxed value. +A @litchar{#&} form can also be used as an expression, but since the resulting box is constant, it has practically no use. @; So what are boxes good for, anyway? 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/guide/hash-tables.scrbl b/collects/scribblings/guide/hash-tables.scrbl index 210e7edc42..ed60c0c4e2 100644 --- a/collects/scribblings/guide/hash-tables.scrbl +++ b/collects/scribblings/guide/hash-tables.scrbl @@ -8,9 +8,9 @@ A @deftech{hash table} implements a mapping from keys to values, where both keys and values can be arbitrary Scheme values, and access and update to the table are normally constant-time operations. Keys are -compared using @scheme[equal?] or @scheme[eq?], depending on whether -the hash table is created with @scheme[make-hash] or -@scheme[make-hasheq]. +compared using @scheme[equal?], @scheme[eqv?], or @scheme[eq?], depending on whether +the hash table is created with @scheme[make-hash], +@scheme[make-hasheqv], or @scheme[make-hasheq]. @examples[ (define ht (make-hash)) @@ -21,29 +21,50 @@ the hash table is created with @scheme[make-hash] or (hash-ref ht "coconut" "not there") ] -A literal hash table can be written as an expression by using +The @racket[hash], @racket[hasheqv], and @racket[hasheq] functions +create immutable hash tables from an initial set of keys and values, +which each value is provided as an argument after its key. Immutable +hash tables can be extended with @scheme[hash-set], which produces a +new immutable hash table in constant time. + +@examples[ +(define ht (hash "apple" 'red "banana" 'yellow)) +(hash-ref ht "apple") +(define ht2 (hash-set ht "coconut" 'brown)) +(hash-ref ht "coconut") +(hash-ref ht2 "coconut") +] + +A literal immutable hash table can be written as an expression by using @litchar{#hash} (for an @scheme[equal?]-based table), -@litchar{#hasheq} (for an @scheme[eq?]-based table), or -@litchar{#hasheqv} (for an @scheme[eqv?]-based table). A parenthesized +@litchar{#hasheqv} (for an @scheme[eqv?]-based table), or +@litchar{#hasheq} (for an @scheme[eq?]-based table). A parenthesized sequence must immediately follow @litchar{#hash}, @litchar{#hasheq}, or @litchar{#hasheqv}, where each element is a sequence is a dotted -key--value pair. Literal hash tables are immutable, but they can be -extended functionally (producing a new hash table without changing the -old one) using @scheme[hash-set]. +key--value pair. The @litchar{#hash}, etc. forms implicitly +@scheme[quote] their key and value sub-forms. @examples[ (define ht #hash(("apple" . red) ("banana" . yellow))) (hash-ref ht "apple") -(define ht2 (hash-set ht "coconut" 'brown)) -(hash-ref ht "coconut") -(hash-ref ht2 "coconut") -ht2 ] @refdetails/gory["parse-hashtable"]{the syntax of hash table literals} -A non-literal hash table can optionally retain its keys +Both mutable and immutable hash tables print like immutable hash +tables, using a quoted @litchar{#hash}, @litchar{#hasheqv}, or +@litchar{#hasheq} form if all keys and values can be expressed with +@scheme[quote] or using @racketresult[hash], @racketresult[hasheq], or +@racketresult[hasheqv] otherwise: + +@examples[ +#hash(("apple" . red) + ("banana" . yellow)) +(hash 1 (srcloc "file.rkt" 1 0 1 (+ 4 4))) +] + +A mutable hash table can optionally retain its keys @defterm{weakly}, so each mapping is retained only so long as the key is retained elsewhere. diff --git a/collects/scribblings/guide/lists.scrbl b/collects/scribblings/guide/lists.scrbl index 8400bc0ece..abc4a5da42 100644 --- a/collects/scribblings/guide/lists.scrbl +++ b/collects/scribblings/guide/lists.scrbl @@ -23,12 +23,16 @@ a list containing the values: @interaction[(list "red" "green" "blue") (list 1 2 3 4 5)] -As you can see, a list result prints in the @tech{REPL} as a backquote -@litchar{`} and then a pair of parentheses wrapped around the printed +@margin-note{A list usually prints with @litchar{'}, but the printed + form of a list depends on its content. See + @secref["pairs"] for more information.} + +As you can see, a list result prints in the @tech{REPL} as a quote +@litchar{'} and then a pair of parentheses wrapped around the printed form of the list elements. There's an opportunity for confusion here, because parentheses are used for both expressions, such as @racket[(list "red" "green" "blue")], and printed results, such as -@racketresult['("red" "green" "blue")]. In addition to the backquote, +@racketresult['("red" "green" "blue")]. In addition to the quote, parentheses for results are printed in blue in the documentation and in DrRacket, whereas parentheses for expressions are brown. diff --git a/collects/scribblings/guide/pairs.scrbl b/collects/scribblings/guide/pairs.scrbl index 0fe53119d7..c9208b42b4 100644 --- a/collects/scribblings/guide/pairs.scrbl +++ b/collects/scribblings/guide/pairs.scrbl @@ -11,7 +11,7 @@ procedures extract the first and second elements of the pair, respectively. The @scheme[pair?] predicate recognizes pairs. Some pairs print by wrapping parentheses around the printed forms of -the two pair elements, putting a @litchar{`} at the beginning and a +the two pair elements, putting a @litchar{'} at the beginning and a @litchar{.} between the elements. @examples[ @@ -28,7 +28,7 @@ or it is a pair whose first element is a list element and whose second element is a list. The @scheme[list?] predicate recognizes lists. The @scheme[null?] predicate recognizes the empty list. -A list prints as a @litchar{`} followed by a pair of parentheses +A list normally prints as a @litchar{'} followed by a pair of parentheses wrapped around the list elements. @examples[ @@ -39,28 +39,37 @@ null (list? (cons 1 2)) ] -The @scheme[display] function prints a pair or list without a leading -@litchar{`}: +A list or pair prints using @schemeresult[list] or @schemeresult[cons] +when one of its elements cannot be written as a @scheme[quote]d +value. For example, a value constructed with @racket[srcloc] cannot be +written using @scheme[quote], and it prints using @racketresult[srcloc]: -@examples[ -(display (cons 1 2)) -(display null) -(display (list 1 2 3)) +@interaction[ +(srcloc "file.rkt" 1 0 1 (+ 4 4)) +(list 'here (srcloc "file.rkt" 1 0 1 8) 'there) +(cons 1 (srcloc "file.rkt" 1 0 1 8)) +(cons 1 (cons 2 (srcloc "file.rkt" 1 0 1 8))) ] -Pairs are immutable (contrary to Lisp tradition), and @scheme[pair?] -and @scheme[list?] recognize immutable pairs and lists, only. The -@scheme[mcons] procedure creates a mutable pair, which works with -@scheme[set-mcar!] and @scheme[set-mcdr!], as well as @scheme[mcar] -and @scheme[mcdr]. +@margin-note{See also @racket[list*].} + +As shown in the last example, @schemeresult[list*] is used to +abbreviate a series of @schemeresult[cons]es that cannot be +abbreviated using @racketresult[list]. + +The @scheme[write] and @scheme[display] functions print a pair or list +without a leading @litchar{'}, @schemeresult[cons], +@schemeresult[list], or @schemeresult[list*]. There is no difference +between @scheme[write] and @racket[display] for a pair or list, except +as they apply to elements of the list: @examples[ -(define p (mcons 1 2)) -p -(pair? p) -(mpair? p) -(set-mcar! p 0) -p +(write (cons 1 2)) +(display (cons 1 2)) +(write null) +(display null) +(write (list 1 2 "3")) +(display (list 1 2 "3")) ] Among the most important predefined procedures on lists are those that @@ -87,3 +96,23 @@ iterate through the list's elements: ] @refdetails["pairs"]{pairs and lists} + +Pairs are immutable (contrary to Lisp tradition), and @scheme[pair?] +and @scheme[list?] recognize immutable pairs and lists, only. The +@scheme[mcons] procedure creates a @deftech{mutable pair}, which works +with @scheme[set-mcar!] and @scheme[set-mcdr!], as well as +@scheme[mcar] and @scheme[mcdr]. A mutable pair prints using +@schemeresult[mcons], while @scheme[write] and @scheme[display] print +mutable pairs with @litchar["{"] and @litchar["}"]: + +@examples[ +(define p (mcons 1 2)) +p +(pair? p) +(mpair? p) +(set-mcar! p 0) +p +(write p) +] + +@refdetails["mpairs"]{mutable pairs} diff --git a/collects/scribblings/guide/symbols.scrbl b/collects/scribblings/guide/symbols.scrbl index f2f9859163..1ee2b3bde2 100644 --- a/collects/scribblings/guide/symbols.scrbl +++ b/collects/scribblings/guide/symbols.scrbl @@ -61,11 +61,14 @@ special characters or that might otherwise look like numbers. @refdetails/gory["parse-symbol"]{the syntax of symbols} -The @racket[display] form of a symbol is the same as the corresponding -string. +The @racket[write] function prints a symbol without a @litchar{'} +prefix. The @racket[display] form of a symbol is the same as the +corresponding string. @examples[ +(write 'Apple) (display 'Apple) +(write '|6|) (display '|6|) ] diff --git a/collects/scribblings/guide/truth.scrbl b/collects/scribblings/guide/truth.scrbl index 967f6d6868..db5c80a0ab 100644 --- a/collects/scribblings/guide/truth.scrbl +++ b/collects/scribblings/guide/truth.scrbl @@ -69,27 +69,27 @@ a pair, but @italic{is not} a list: In general, the rule for printing a pair is as follows: use the dot notation always, but if the dot is immediately followed by an open parenthesis, then remove the dot, the open parenthesis, and the -matching close parenthesis. Thus, @racketresultfont{`(0 . (1 . 2))} -becomes @racketresult[`(0 1 . 2)], and -@racketresultfont{`(1 . (2 . (3 . ())))} becomes @racketresult[`(1 2 3)]. +matching close parenthesis. Thus, @racketresultfont{'(0 . (1 . 2))} +becomes @racketresult['(0 1 . 2)], and +@racketresultfont{'(1 . (2 . (3 . ())))} becomes @racketresult['(1 2 3)]. @;------------------------------------------------------------------------ @section[#:tag "quoting-lists"]{Quoting Pairs and Symbols with @racket[quote]} -After you see +A list prints with a quote mark before it, but if an element of a list +is itself a list, then no quote mark is printed for the inner list: @interaction[ -(list (list 1) (list 2) (list 3)) +(list (list 1) (list 2 3) (list 4)) ] -enough times, you'll wish (or you're already wishing) that there was a -way to write just @racket[((1) (2) (3))] and have it mean the list of -lists that prints as @racketresult[`((1) (2) (3))]. The @racket[quote] -form does exactly that: +For nested lists, especially, the @racket[quote] form lets you write a +list as an expression in essentially the same way that the list it +prints: @interaction[ -(eval:alts (@#,racket[quote] ((1) (2) (3))) '((1) (2) (3))) (eval:alts (@#,racket[quote] ("red" "green" "blue")) '("red" "green" "blue")) +(eval:alts (@#,racket[quote] ((1) (2 3) (4))) '((1) (2 4) (4))) (eval:alts (@#,racket[quote] ()) '()) ] @@ -116,7 +116,7 @@ that looks like an identifier, but with a @litchar{'} prefix: (eval:alts (@#,racket[quote] jane-doe) 'jane-doe) ] -A value that prints like an identifier is a @defterm{symbol}. In the +A value that prints like a quoted identifier is a @defterm{symbol}. In the same way that parenthesized output should not be confused with expressions, a printed symbol should not be confused with an identifier. In particular, the symbol @racket[(@#,racket[quote] @@ -141,28 +141,38 @@ map (eval:alts (symbol->string (@#,racket[quote] @#,racketidfont{map})) (symbol->string 'map)) ] -When @racket[quote] is used on a parenthesized sequence of -identifiers, it creates a list of symbols: +In the same way that @racket[quote] for a list automatically applies +itself to nested lists, @racket[quote] on a parenthesized sequence of +identifiers automatically applies itself to the identifiers to create +a list of symbols: @interaction[ (eval:alts (car (@#,racket[quote] (@#,racketidfont{road} @#,racketidfont{map}))) (car '(road map))) (eval:alts (symbol? (car (@#,racket[quote] (@#,racketidfont{road} @#,racketidfont{map})))) (symbol? (car '(road map)))) ] -When a symbol is inside a -list that is printed with @litchar{`}, the @litchar{'} on the symbol -is omitted, since @litchar{`} is doing the job already: +When a symbol is inside a list that is printed with +@litchar{'}, the @litchar{'} on the symbol is omitted, since +@litchar{'} is doing the job already: @interaction[ (eval:alts (@#,racket[quote] (@#,racketidfont{road} @#,racketidfont{map})) '(road map)) ] +The @racket[quote] form has no effect on a literal expression such as +a number or string: + +@interaction[ +(eval:alts (@#,racket[quote] 42) 42) +(eval:alts (@#,racket[quote] "on the record") "on the record") +] + @;------------------------------------------------------------------------ @section{Abbreviating @racket[quote] with @racketvalfont{'}} -If @racket[(@#,racket[quote] (1 2 3))] still seems like too much -typing, you can abbreviate by just putting @litchar{'} in front of -@racket[(1 2 3)]: +As you may have guessed, you can abbreviate a use of +@racket[quote] by just putting @litchar{'} in front of a form to +quote: @interaction[ '(1 2 3) @@ -183,58 +193,25 @@ way. You can see this if you put a @litchar{'} in front of a form that has a @litchar{'}: @interaction[ -(eval:alts (car '(@#,racketvalfont{quote} @#,racketvalfont{road})) 'quote) (car ''road) +(eval:alts (car '(@#,racketvalfont{quote} @#,racketvalfont{road})) 'quote) ] -Beware, however, that the @tech{REPL}'s printer recognizes the symbol -@racketidfont{quote} when printing output, and then it uses -@racketidfont{'} in the output: +The @litchar{'} abbreviation works in output as well as input. The +@tech{REPL}'s printer recognizes the symbol @racket['quote] as the +first element of a two-element list when printing output, in which +case it uses @racketidfont{'} to print the output: @interaction[ -(eval:alts (list (@#,racketvalfont{quote} (@#,racketvalfont{quote} @#,racketvalfont{road}))) '('road)) -(list ''road) +(eval:alts (@#,racketvalfont{quote} (@#,racketvalfont{quote} @#,racketvalfont{road})) ''road) +(eval:alts '(@#,racketvalfont{quote} @#,racketvalfont{road}) ''road) +''road ] @; FIXME: @; warning about how "quote" creates constant data, which is subtly @; different than what "list" creates -@;------------------------------------------------------------------------ -@section{Quasiquoting with @racketvalfont{`}} - -At this point, you may wonder why a symbol that is written with -@litchar{'} prints back with @litchar{'}, while a list that is written -with @litchar{'} prints back with @litchar{`}: - -@interaction[ -'road -'(left right) -] - -The @litchar{`} character is a shorthand for @racket[quasiquote] in -the same way that @litchar{'} is short for @racket[quote]. The -@racket[quasiquote] form is like @scheme[quote], except that the -content of a @scheme[quasiquote]d form can escape back to a Racket -expression using @racket[unquote], which is abbreviated @litchar{,}: - -@moreguide["qq"]{@racket[quasiquote]} - -@interaction[ -`(1 ,(+ 1 1) "buckle my shoe") -] - -The value printer in Racket uses @litchar{`} for a lists in case it -must escape to print certain kinds of values that cannot be written -directly under @scheme[quote]. For example, a source-location record -is created with the @racket[srcloc] function, and it prints like an -equivalent call to @racket[srcloc]: - -@interaction[ -(srcloc "file.rkt" 1 0 1 (+ 4 4)) -(list 'here (srcloc "file.rkt" 1 0 1 8) 'there) -] - @;------------------------------------------------------------------------ @section[#:tag "lists-and-syntax"]{Lists and Racket Syntax} diff --git a/collects/scribblings/guide/vectors.scrbl b/collects/scribblings/guide/vectors.scrbl index 0bdb0c77e2..0e56609d4e 100644 --- a/collects/scribblings/guide/vectors.scrbl +++ b/collects/scribblings/guide/vectors.scrbl @@ -10,11 +10,14 @@ values. Unlike a list, a vector supports constant-time access and update of its elements. A vector prints similar to a list---as a parenthesized sequence of its -elements---but a vector is prefixed with @litchar{#}. For a vector as -an expression, an optional length can be supplied. Also, a vector as -an expression implicitly quotes the forms for its content, which means -that identifiers and parenthesized forms in a vector constant -represent symbols and lists. +elements---but a vector is prefixed with @litchar{#} after +@litchar{'}, or it uses @schemeresult[vector] of one of its elements +cannot be expressed with @racket[quote]. + +For a vector as an expression, an optional length can be +supplied. Also, a vector as an expression implicitly @racket[quote]s +the forms for its content, which means that identifiers and +parenthesized forms in a vector constant represent symbols and lists. @refdetails/gory["parse-vector"]{the syntax of vectors} diff --git a/collects/scribblings/honu/honu.scrbl b/collects/scribblings/honu/honu.scrbl index 2176a34cb7..330f6917dd 100644 --- a/collects/scribblings/honu/honu.scrbl +++ b/collects/scribblings/honu/honu.scrbl @@ -7,13 +7,13 @@ @title{@bold{Honu}} -@defterm{Honu} is a family of languages built on top of Scheme. Honu -syntax resembles Java. Like Scheme, however, Honu has no fixed syntax, +@defterm{Honu} is a family of languages built on top of Racket. Honu +syntax resembles Java. Like Racket, however, Honu has no fixed syntax, because Honu supports extensibility through macros and a base syntax of @as-index{H-expressions}, which are analogous to S-expressions. The Honu language currently exists only as a undocumented -prototype. Scheme's parsing and printing of H-expressions is +prototype. Racket's parsing and printing of H-expressions is independent of the Honu language, however, so it is documented here. @table-of-contents[] @@ -22,7 +22,7 @@ independent of the Honu language, however, so it is documented here. @section{H-expressions} -The Scheme reader incorporates an H-expression reader, and Scheme's +The Racket reader incorporates an H-expression reader, and Racket's printer also supports printing values in Honu syntax. The reader can be put into H-expression mode either by including @litchar{#hx} in the input stream, or by calling @scheme[read-honu] or @@ -34,9 +34,9 @@ the default print handler) produces Honu output when the When the reader encounters @litchar{#hx}, it reads a single H-expression, and it produces an S-expression that encodes the H-expression. Except for atomic H-expressions, evaluating this -S-expression as Scheme is unlikely to succeed. In other words, +S-expression as Racket is unlikely to succeed. In other words, H-expressions are not intended as a replacement for S-expressions to -represent Scheme code. +represent Racket code. Honu syntax is normally used via @litchar{#lang honu}, which reads H-expressions repeatedly until an end-of-file is encountered, and @@ -74,7 +74,7 @@ Ignoring whitespace, an H-expression is either Within a sequence of H-expressions, a sub-sequence between angle brackets is represented specially (see @secref["honu:parens"]). -Whitespace for H-expressions is as in Scheme: any character for which +Whitespace for H-expressions is as in Racket: any character for which @scheme[char-whitespace?] returns true counts as a whitespace. @; ---------------------------------------------------------------------- @@ -82,7 +82,7 @@ Whitespace for H-expressions is as in Scheme: any character for which @subsection[#:tag "honu:numbers"]{Numbers} The syntax for Honu numbers is the same as for Java. The S-expression -encoding of a particular H-expression number is the obvious Scheme +encoding of a particular H-expression number is the obvious Racket number. @; ---------------------------------------------------------------------- @@ -101,7 +101,7 @@ characters: } The S-expression encoding of an H-expression identifier is the obvious -Scheme symbol. +Racket symbol. Input is parsed to form maximally long identifiers. For example, the input @litchar{int->int;} is parsed as four H-expressions represented @@ -114,7 +114,7 @@ by symbols: @scheme['int], @scheme['->], @scheme['int], and The syntax for an H-expression string is exactly the same as for an S-expression string, and an H-expression string is represented by the -obvious Scheme string. +obvious Racket string. @; ---------------------------------------------------------------------- @@ -124,7 +124,7 @@ The syntax for an H-expression character is the same as for an H-expression string that has a single content character, except that a @litchar{'} surrounds the character instead of @litchar{"}. The S-expression representation of an H-expression character is the -obvious Scheme character. +obvious Racket character. @; ---------------------------------------------------------------------- @@ -132,16 +132,16 @@ obvious Scheme character. A H-expression between @litchar{(} and @litchar{)}, @litchar{[} and @litchar{]}, or @litchar["{"] and @litchar["}"] is represented by a -Scheme list. The first element of the list is @scheme['#%parens] for a +Racket list. The first element of the list is @scheme['#%parens] for a @litchar{(}...@litchar{)} sequence, @scheme['#%brackets] for a @litchar{[}...@litchar{]} sequence, or @scheme['#%braces] for a @litchar["{"]...@litchar["}"] sequence. The remaining elements are the -Scheme representations for the grouped H-expressions in order. +Racket representations for the grouped H-expressions in order. In an H-expression sequence, when a @litchar{<} is followed by a @litchar{>}, and when nothing between the @litchar{<} and @litchar{>} is an immediate symbol containing a @litchar{=}, @litchar{&}, or -@litchar{|}, then the sub-sequence is represented by a Scheme list +@litchar{|}, then the sub-sequence is represented by a Racket list that starts with @scheme['#%angles] and continues with the elements of the sub-sequence between the @litchar{<} and @litchar{>} (exclusive). This representation is applied recursively, so that angle @@ -175,14 +175,14 @@ is followed by an H-expression to be treated as whitespace. Note that @subsection{Honu Output Printing} -Some Scheme values have a standard H-expression representation. For +Some Racket values have a standard H-expression representation. For values with no H-expression representation but with a -@scheme[read]able S-expression form, the Scheme printer produces an +@scheme[read]able S-expression form, the Racket printer produces an S-expression prefixed with @litchar{#sx}. For values with neither an H-expression form nor a @scheme[read]able S-expression form, then printer produces output of the form @litchar{#<}...@litchar{>}, as in -Scheme mode. The @scheme[print-honu] parameter controls whether -Scheme's printer produces Scheme or Honu output. +Racket mode. The @scheme[print-honu] parameter controls whether +Racket's printer produces Racket or Honu output. The values with H-expression forms are as follows: 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/main/start.scrbl b/collects/scribblings/main/start.scrbl index 474550346f..52c90f9e0e 100644 --- a/collects/scribblings/main/start.scrbl +++ b/collects/scribblings/main/start.scrbl @@ -10,6 +10,7 @@ @margin-note{ @not-on-the-web{ This is an installation-specific listing. Running @exec{raco docs} + (or @exec{Racket Documentation} under Windows or Mac OS X) may open a different page with local and user-specific documentation, including documentation for installed @link["http://planet.plt-scheme.org/"]{@|PLaneT|} packages.}} diff --git a/collects/scribblings/quick/quick.scrbl b/collects/scribblings/quick/quick.scrbl index cffa661195..1d393a46b4 100644 --- a/collects/scribblings/quick/quick.scrbl +++ b/collects/scribblings/quick/quick.scrbl @@ -318,11 +318,11 @@ a list containing the given values: @mr-interaction[(list "red" "green" "blue") (list (circle 10) (square 10))] -As you can see, a list prints as a backquoted pair of parentheses wrapped around +As you can see, a list prints as a single quote and then pair of parentheses wrapped around the printed form of the list elements. There's room for confusion here, because parentheses are used for both expressions, such as @racket[(circle 10)], and printed results, such as -@racketresult[`("red" "green" "blue")]. The backquote is the key difference, +@racketresult['("red" "green" "blue")]. The quote is the key difference, as @seclink[#:doc '(lib "scribblings/guide/guide.scrbl") "quoting-lists"]{discussed elsewhere}. To help emphasize the difference, in the documentation and in DrRacket, result parentheses are printed in blue, unlike expression parentheses. diff --git a/collects/scribblings/raco/setup.scrbl b/collects/scribblings/raco/setup.scrbl index 63768ac82f..72d6989cba 100644 --- a/collects/scribblings/raco/setup.scrbl +++ b/collects/scribblings/raco/setup.scrbl @@ -984,15 +984,17 @@ An @deftech{unpackable} is one of the following: provides functions for accessing fields in @filepath{info.rkt} files.} -@defproc[(get-info (collection-names (listof string?))) +@defproc[(get-info [collection-names (listof string?)] + [#:namespace namespace (or/c namespace? #f) #f]) (or/c (symbol? [(-> any)] . -> . any) false/c)]{ Accepts a list of strings naming a collection or sub-collection, and calls @racket[get-info/full] with the full path corresponding to the - named collection.} + named collection and the @scheme[namespace] argument.} -@defproc[(get-info/full (path path?)) +@defproc[(get-info/full [path path?] + [#:namespace namespace (or/c namespace? #f) #f]) (or/c (symbol? [(-> any)] . -> . any) false/c)]{ @@ -1010,16 +1012,20 @@ An @deftech{unpackable} is one of the following: case. If the name is not defined and no @racket[_thunk] is provided, then an exception is raised. - @racket[get-info/full] returns @racket[#f] if there is - no @filepath{info.rkt} or @filepath{info.rkt} file in the directory. If there is a - @filepath{info.rkt} file that has the wrong shape (i.e., not a module + The @racket[get-info/full] function returns @racket[#f] if there is + no @filepath{info.rkt} or @filepath{info.ss} file in the directory. If there is a + @filepath{info.rkt} (or @filepath{info.ss}) file that has the wrong shape (i.e., not a module using @racketmodname[setup/infotab] or @racket[(lib "infotab.rkt" "setup")]), or if the @filepath{info.rkt} file fails to load, then an exception is raised. If the @filepath{info.rkt} file loaded, @racket[get-info/full] returns the @racket[get-info] file. If the @filepath{info.rkt} file does not exist, then @racket[get-info/full] does the same checks for the @filepath{info.rkt} file, either raising an exception - or returning the @racket[get-info] function from the @filepath{info.rkt} file.} + or returning the @racket[get-info] function from the @filepath{info.rkt} file. + + The @filepath{info.rkt} (or @filepath{info.ss}) module is loaded + into @scheme[namespace] if it is not @scheme[#f], or a private, + weakly-held namespace otherwise.} @defproc[(find-relevant-directories (syms (listof symbol?)) 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/custom-write.scrbl b/collects/scribblings/reference/custom-write.scrbl index 35db4af2a1..212b21995c 100644 --- a/collects/scribblings/reference/custom-write.scrbl +++ b/collects/scribblings/reference/custom-write.scrbl @@ -14,8 +14,8 @@ instances of the structure type. The procedure for a @scheme[prop:custom-write] value takes three arguments: the structure to be printed, the target port, and an argument that is @scheme[#t] for @scheme[write] mode, @scheme[#f] for -@scheme[display] mode, or an exact non-negative integer representing -the current @scheme[quasiquote] depth for @scheme[print] mode. The +@scheme[display] mode, or @scheme[0] or @scheme[1] indicating +the current @tech{quoting depth} for @scheme[print] mode. The procedure should print the value to the given port using @scheme[write], @scheme[display], @scheme[print], @scheme[fprintf], @scheme[write-special], etc. @@ -88,3 +88,16 @@ property, @scheme[#f] otherwise.} (custom-write? output-port? boolean?. -> . any)]{ Returns the custom-write procedure associated with @scheme[v].} + +@deftogether[( +@defthing[prop:custom-print-as-constructor struct-type-property?] +@defthing[custom-print-as-constructor? struct-type-property?] +@defthing[custom-print-as-constructor-accessor struct-type-property?] +)]{ + +A property and associated predicate and accessor. The property value +is always a boolean. When a structure has this property as @scheme[#t] +in addition to a @scheme[prop:custom-write] property value, then it is +never considered @tech{quotable} for printing, which can change the +way that enclosing datatypes are printed.} + 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 f9b3313eb6..a4f235f691 100644 --- a/collects/scribblings/reference/printer.scrbl +++ b/collects/scribblings/reference/printer.scrbl @@ -4,34 +4,59 @@ @title[#:tag "printing" #:style 'quiet]{The Printer} -The default printer generally prints core datatypes in such a way that -using @scheme[read] on the output produces a value that is -@scheme[equal?] to the printed value---when the printed is used in -@scheme[write]. When the printer is used in @scheme[display] mode, the -printing of strings, byte strings, characters, and symbols changes to -render the character/byte content directly to the output port. The -printer's @scheme[print] mode is similar to @scheme[write], but it is -sensitive to the @scheme[print-as-quasiquote] parameter for printing -values in a way that @scheme[read] plus @scheme[eval] on the output -can be @scheme[equal?] to the printed value. +The Racket printer supports three modes: + +@itemlist[ + + @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;} + + @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;} + + @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 @scheme[print-box] is @scheme[#t]), hash tables (when -@scheme[print-hash-table] is @scheme[#t]), and fields of structures +@scheme[print-hash-table] is @scheme[#t]), fields of structures exposed by @scheme[struct->vector] (when @scheme[print-struct] is -@scheme[#t]). If @scheme[print-graph] is @scheme[#t], then this -information is used to display sharing by printing graph definitions -and references (see @secref["parse-graph"]). If a cycle is detected in -the initial scan, then @scheme[print-graph] is effectively set to -@scheme[#t] automatically. +@scheme[#t]), and fields of structures exposed by printing when the +structure's type has the @scheme[prop:custom-write] property. If +@scheme[print-graph] is @scheme[#t], then this information is used to +print sharing through graph definitions and references (see +@secref["parse-graph"]). If a cycle is detected in the initial scan, +then @scheme[print-graph] is effectively set to @scheme[#t] +automatically. With the exception of displaying byte strings, printing is defined in terms of Unicode characters; see @secref["ports"] for information on how a character stream is written to an port's underlying byte stream. + @section[#:tag "print-symbol"]{Printing Symbols} Symbols containing spaces or special characters @scheme[write] using @@ -68,17 +93,16 @@ characters. That is, the display form of a symbol is the same as the display form of @scheme[symbol->string] applied to the symbol. Symbols @scheme[print] the same as they @scheme[write], unless -@scheme[print-as-quasiquote] is set to @scheme[#t] and the current -@scheme[quasiquote] depth is @scheme[0]. In that case, the symbol's -@scheme[print]ed form is prefixed with @litchar{'}. If the current -@scheme[quasiquote] depth is @scheme[1], and if the symbol is -@scheme['unquote] or @scheme[quasiquote], then the @scheme[print]ed -form is prefixed with @litchar{,'}. +@scheme[print-as-expression] is set to @scheme[#t] and the current +@tech{quoting depth} is @scheme[0]. In that case, the symbol's +@scheme[print]ed form is prefixed with @litchar{'}. For the purposes +of printing enclosing datatypes, a symbol is @tech{quotable}. @section{Printing Numbers} A number prints the same way in @scheme[write], @scheme[display], and -@scheme[print] modes. +@scheme[print] modes. For the purposes of printing enclosing +datatypes, a symbol is @tech{quotable}. A @tech{complex number} that is not a @tech{real number} always prints as @nonterm{m}@litchar{+}@nonterm{n}@litchar{i}, where @nonterm{m} and @@ -107,7 +131,8 @@ printed form of its exact negation. The constant @scheme[#t] prints as @litchar{#t}, and the constant @scheme[#f] prints as @litchar{#f} in all modes (@scheme[display], -@scheme[write], and @scheme[print]). +@scheme[write], and @scheme[print]). For the purposes of printing +enclosing datatypes, a symbol is @tech{quotable}. @section[#:tag "print-pairs"]{Printing Pairs and Lists} @@ -130,8 +155,8 @@ printed form depends on the @scheme[cdr]: ] If @scheme[print-reader-abbreviations] is set to @scheme[#t], then -pair printing is adjusted in the case of a pair that starts a -two-element list whose first element is @scheme[quote], +pair printing in @scheme[write] mode is adjusted in the case of a pair +that starts a two-element list whose first element is @scheme['quote], @scheme['quasiquote], @scheme['unquote], @scheme['unquote-splicing], @scheme['syntax], @scheme['quasisyntax], @scheme['unsyntax], @scheme['unsyntax-splicing]. In that case, the pair is printed with @@ -146,28 +171,52 @@ including the tail as two elements of the enclosing list. The printed form of a pair is the same in both @scheme[write] and @scheme[display] modes, except as the printed form of the pair's @scheme[car] and @scheme[cdr] vary with the mode. The @scheme[print] -form is also the same is @scheme[print-as-quasiquote] is @scheme[#f]. +form is also the same is @scheme[print-as-expression] is @scheme[#f] +or when the quoting depth is @scheme[1]. -When @scheme[print-as-quasiquote] is @scheme[#t] and the current -@scheme[quasiquote] depth is @scheme[0], then the empty list prints as -@litchar{'()} and a pair's output is prefixed with @litchar{`}; the -pair's content is printed at @scheme[quasiquote] depth is -@scheme[1]. In addition, when @scheme['quasiquote], @scheme['unquote], -or @scheme['unquote-splicing] appears as the first element of a -two-element list, the @scheme[quasiquote] depth is adjusted -appropriately for printing the second element of the list. +For @scheme[print] mode when @scheme[print-as-expression] is +@scheme[#t] and the @tech{quoting depth} is @scheme[0], then the empty +list prints as @litchar{'()}. For a pair whose @scheme[car] and +@scheme[cdr] are @tech{quotable}, the pair prints in @scheme[write] +mode but with a @litchar{'} prefix; the pair's content is printed with +@tech{quoting depth} @scheme[1]. Otherwise, when the @scheme[car] or +@scheme[cdr] is not @tech{quotable}, then pair prints with either +@litchar{cons} (when the @scheme[cdr] is not a pair), @litchar{list} +(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]. 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, except that @litchar["{"] and @litchar["}"] are used -instead of @litchar{(} and @litchar{)}. Note that the reader -treats @litchar["{"]...@litchar["}"] and @litchar{(}...@litchar{)} -equivalently on input, creating immutable pairs in both cases. +same as pairs for @scheme[write] and @scheme[display], except that +@litchar["{"] and @litchar["}"] are used instead of @litchar{(} and +@litchar{)}. Note that the reader treats @litchar["{"]...@litchar["}"] +and @litchar{(}...@litchar{)} equivalently on input, creating +immutable pairs in both cases. Mutable in @scheme[print] mode with +@scheme[print-as-expression] as @scheme[#f] or a @tech{quoting depth} +of @scheme[1] also use @litchar["{"] and @litchar["}"]. In +@scheme[print] mode with @scheme[print-as-expression] as @scheme[#t] +and a @tech{quoting depth} of @scheme[0], a mutable pair prints as +@litchar{(mcons }, the @scheme[mcar] and @scheme[mcdr] printed at +@tech{quoting depth} @scheme[0] and separated by a space, and a +closing @litchar{)}. If the @scheme[print-pair-curly-braces] parameter is set to -@scheme[#t], then immutable pairs print using @litchar["{"] and -@litchar["}"]. If the @scheme[print-mpair-curly-braces] parameter is -set to @scheme[#f], then mutable pairs print using @litchar{(} and -@litchar{)}. +@scheme[#t], then pairs print using @litchar["{"] and @litchar["}"] in +when not using @scheme[print] mode with @scheme[print-as-expression] a +@scheme[#t] and a @tech{quoting depth} of @scheme[0]. If the +@scheme[print-mpair-curly-braces] parameter is set to @scheme[#f], +then mutable pairs print using @litchar{(} and @litchar{)} in that +mode. + +For the purposes of printing enclosing datatypes, an empty list is +always @tech{quotable}, a pair is @tech{quotable} when its +@scheme[car] and @scheme[cdr] are @tech{quotable}, and a mutable list +is never @tech{quotable}. @section{Printing Strings} @@ -201,6 +250,10 @@ is written using @litchar{\a}, @litchar{\b}, @litchar{\t}, @litchar{\e} if possible, otherwise using @litchar{\} followed by one to three octal digits (only as many as necessary). +For the purposes of printing enclosing datatypes, a string or a byte +string is @tech{quotable}. + + @section[#:tag "print-vectors"]{Printing Vectors} In @scheme[display] mode, the printed form of a vector is @litchar{#} @@ -211,10 +264,15 @@ decimal integer is printed after the @litchar{#}, and a repeated last element is printed only once. Vectors @scheme[print] the same as they @scheme[write], unless -@scheme[print-as-quasiquote] is set to @scheme[#t] and the current -@scheme[quasiquote] depth is @scheme[0]. In that case, the vector's -@scheme[print]ed form is prefixed with @litchar{`}, and its content is -printed with @scheme[quasiquote] depth @scheme[1]. +@scheme[print-as-expression] is set to @scheme[#t] and the current +@tech{quoting depth} is @scheme[0]. In that case, if all of the +vector's elements are @tech{quotable}, then the vector's +@scheme[print]ed form is prefixed with @litchar{'} and its elements +printed with @tech{quoting depth} @scheme[1]. If its elements are not +all @tech{quotable}, then the vector @racket[print]s as +@litchar["(vector "], the elements at @tech{quoting depth} @scheme[0], +and a closing @litchar{)}. A vector is @tech{quotable} when all of +its elements are @tech{quotable}. @section[#:tag "print-structure"]{Printing Structures} @@ -225,36 +283,55 @@ for which the structure is an instance: @itemize[ - @item{If the structure type is a @techlink{prefab} structure type, - then it prints using @litchar{#s(} followed by the @tech{prefab} - structure type key, then the printed form each field in the - structure, and then @litchar{)}. + @item{If the structure type is a @tech{prefab} structure type, + then it prints in @scheme[write] or @scheme[display] mode using + @litchar{#s(} followed by the @tech{prefab} structure type key, + then the printed form each field in the structure, and then + @litchar{)}. - In @scheme[print] mode when @scheme[print-as-quasiquote] is set - to @scheme[#t] and the current @scheme[quasiquote] depth is - @scheme[0], the structure's @scheme[print]ed form is prefixed - with @litchar{`} and its content is printed with - @scheme[quasiquote] depth @scheme[1].} + In @scheme[print] mode when @scheme[print-as-expression] is set + to @scheme[#t] and the current @tech{quoting depth} is + @scheme[0], if the structure's content is all @tech{quotable}, + then the structure's @scheme[print]ed form is prefixed with + @litchar{'} and its content is printed with @tech{quoting + depth} @scheme[1]. If any of its content is not quotable, then + the structure type prints the same as a non-@tech{prefab} + structure type. + + An instance of a @tech{prefab} structure type is @tech{quotable} + when all of its content is @tech{quotable}.} @item{If the structure has a @scheme[prop:custom-write] property value, then the associated procedure is used to print the structure, unless the @racket[print-unreadable] parameter is - set to @racket[#f].} + set to @racket[#f]. - @item{If the structure type is transparent, or if any ancestor is - transparent, then the structure prints as the vector produced + An instance of a structure with a @scheme[prop:custom-write] + property is @tech{quotable} if it does not have a + @scheme[prop:custom-print-as-constructor] value as @scheme[#t] + and its content is @tech{quotable}. The content is determined + by the values recursively printed by the structure's + @scheme[prop:custom-write] procedure.} + + @item{If the structure's type is transparent or if any ancestor is + transparent (i.e,. @scheme[struct?] on the instance produces + @scheme[#t]), then the structure prints as the vector produced by @scheme[struct->vector] in @scheme[display] mode, in @scheme[write] mode, or in @scheme[print] mode when - @scheme[print-as-quasiquote] is set to @scheme[#f]. + @scheme[print-as-expression] is set to @scheme[#f] or when the + @tech{quoting depth} is @scheme[0]. - In @scheme[print] mode with @scheme[print-as-quasiquote] as - @scheme[#t], then the printed form is prefixed with as many - @litchar{,}s as the current @scheme[quasiquote] depth. Instead - of printing as a vector, the structure content is printed as a - list, where the first element is the list is the structure's - type name (as determined by @scheme[object-name]) printed in - @scheme[write] mode, while the remaining elements are - @scheme[print]ed at @scheme[quasiquote] depth @scheme[0].} + In @scheme[print] mode with @scheme[print-as-expression] as + @scheme[#t] and a @tech{quoting depth} of @scheme[0], the + structure content is printed with a @litchar{(} followed by the + list is the structure's type name (as determined by + @scheme[object-name]) in @scheme[write] mode; the remaining + elements are @scheme[print]ed at @tech{quoting depth} + @scheme[0] and separated by a space, and finally a closing + @litchar{)}. + + A transparent structure type that is not a @tech{prefab} + structure type is never @tech{quotable}.} @item{For any other structure type, the structure prints as an unreadable value; see @secref["print-unreadable"] for more @@ -263,75 +340,103 @@ for which the structure is an instance: If the @scheme[print-struct] parameter is set to @scheme[#f], then all structures without a @scheme[prop:custom-write] property print as -unreadable values. +unreadable values (see @secref["print-unreadable"]) and count as +@tech{quotable}. @section[#:tag "print-hashtable"]{Printing Hash Tables} -When the @scheme[print-hash-table] parameter is set to @scheme[#t], a -hash table prints starting with @litchar{#hash(}, @litchar{#hasheqv(}, or @litchar{#hasheq(} -for a table using @scheme[equal?], @scheme[eqv?], or @scheme[eq?] key comparisons, -respectively. After this prefix, each key--value mapping is shown as -@litchar{(}, the printed form of a key, a space, @litchar{.}, a space, -the printed form the corresponding value, and @litchar{)}, with an -additional space if the key--value pair is not the last to be printed. -After all key-value pairs, the printed form completes with -@litchar{)}. +When the @scheme[print-hash-table] parameter is set to @scheme[#t], in +@scheme[write] and @scheme[display] modes, a hash table prints +starting with @litchar{#hash(}, @litchar{#hasheqv(}, or +@litchar{#hasheq(} for a table using @scheme[equal?], @scheme[eqv?], +or @scheme[eq?] key comparisons, respectively. After this prefix, each +key--value mapping is shown as @litchar{(}, the printed form of a key, +a space, @litchar{.}, a space, the printed form the corresponding +value, and @litchar{)}, with an additional space if the key--value +pair is not the last to be printed. After all key-value pairs, the +printed form completes with @litchar{)}. -In @scheme[print] mode when @scheme[print-as-quasiquote] is -@scheme[#t] and the current quasiquote depth is @scheme[0], then the -printed form is prefixed with @litchar{`} and the hash table's content -is printed at @scheme[quasiquote] depth @scheme[1]. In the printed -form, keys may be printed with @litchar{,} escapes, even though -@scheme[quasiquote] does not support @scheme[unquote] escapes in the -key position. +In @scheme[print] mode when @scheme[print-as-expression] is +@scheme[#f] or the @tech{quoting depth} is @scheme[1], the printed for +is the same as for @scheme[write]. Otherwise, if the hash table's keys +and values are all @tech{quotable}, the table prints with a +@litchar{'} prefix, and the table's key and values are @racket[print]ed +at @tech{quoting depth} @scheme[1]. If some key or value is not +@tech{quotable}, the hash table prints as @litchar["(hash "], +@litchar["(hasheqv "], or @litchar["(hasheq "] followed by alternating +keys and values @racket[print]ed at @tech{quoting depth} @scheme[1] and +separated by spaces, and finally a closing @litchar{)}. A hash table +is @tech{quotable} when all of its keys and values are +@tech{quotable}. When the @scheme[print-hash-table] parameter is set to @scheme[#f], a -hash table prints (un@scheme[read]ably) as @litchar{#}. +hash table prints as @litchar{#} and counts as @tech{quotable}. + @section[#:tag "print-box"]{Printing Boxes} -When the @scheme[print-box] parameter is set to @scheme[#t], -a box prints as @litchar{#&} followed by the printed form of its content. -In @scheme[print] mode when @scheme[print-as-quasiquote] is -@scheme[#t] and the current quasiquote depth is @scheme[0], then the -printed form is prefixed with @litchar{`} and the box's content -is printed at @scheme[quasiquote] depth @scheme[1]. +When the @scheme[print-box] parameter is set to @scheme[#t], a box +prints as @litchar{#&} followed by the printed form of its content in +@scheme[write] mode, @scheme[display], or @scheme[print] mode when +@scheme[print-as-expression] is @scheme[#f] or the @tech{quoting +depth} is @scheme[1]. + +In @scheme[print] mode when @scheme[print-as-expression] is +@scheme[#t] and the @tech{quoting depth} is @scheme[0], a box prints +with a @litchar{'} prefix and its value is printed at @tech{quoting +depth} @scheme[1] when its content is @tech{quotable}, otherwise the +box prints a @litchar["(box "] followed by the content at +@tech{quoting depth} @scheme[0] and a closing @litchar{)}. A box is +@tech{quotable} when its content is @tech{quotable}. When the @scheme[print-box] parameter is set to @scheme[#f], a box -prints (un@scheme[read]ably) as @litchar{#}. +prints as @litchar{#} and counts as @tech{quotable}. + @section{Printing Characters} Characters with the special names described in -@secref["parse-character"] @scheme[write] and @scheme[print] using the same name. -(Some characters have multiple names; the @scheme[#\newline] and -@scheme[#\nul] names are used instead of @scheme[#\linefeed] and -@scheme[#\null]). Other graphic characters (according to -@scheme[char-graphic?]) @scheme[write] as @litchar{#\} followed by the -single character, and all others characters are written in -@scheme[#\u] notation with four digits or @scheme[#\U] notation with -eight digits (using the latter only if the character value it does not -fit in four digits). +@secref["parse-character"] @scheme[write] and @scheme[print] using the +same name. (Some characters have multiple names; the +@scheme[#\newline] and @scheme[#\nul] names are used instead of +@scheme[#\linefeed] and @scheme[#\null]). Other graphic characters +(according to @scheme[char-graphic?]) @scheme[write] as @litchar{#\} +followed by the single character, and all others characters are +written in @scheme[#\u] notation with four digits or @scheme[#\U] +notation with eight digits (using the latter only if the character +value it does not fit in four digits). All characters @scheme[display] directly as themselves (i.e., a single character). +For the purposes of printing enclosing datatypes, a character is +@tech{quotable}. + + @section{Printing Keywords} -Keywords @scheme[write], @scheme[print], and @scheme[display] the same as symbols, -except (see @secref["print-symbol"]) with a leading @litchar{#:} (after any -@litchar{'} prefix added in @scheme[print] mode), -and without special handing for an initial @litchar{#} or when the -printed form would matches a number or a delimited @litchar{.} (since -@litchar{#:} distinguishes the keyword). +Keywords @scheme[write], @scheme[print], and @scheme[display] the same +as symbols, except (see @secref["print-symbol"]) with a leading +@litchar{#:} (after any @litchar{'} prefix added in @scheme[print] +mode), and without special handing for an initial @litchar{#} or when +the printed form would matches a number or a delimited @litchar{.} +(since @litchar{#:} distinguishes the keyword). + +For the purposes of printing enclosing datatypes, a keyword is +@tech{quotable}. + @section{Printing Regular Expressions} -Regexp values in all modes (@scheme[write], @scheme[display], and @scheme[print]) -starting with @litchar{#px} (for @scheme[pregexp]-based regexps) or -@litchar{#rx} (for @scheme[regexp]-based regexps) followed by the -@scheme[write] form of the regexp's source string or byte string. +Regexp values in all modes (@scheme[write], @scheme[display], and +@scheme[print]) starting with @litchar{#px} (for +@scheme[pregexp]-based regexps) or @litchar{#rx} (for +@scheme[regexp]-based regexps) followed by the @scheme[write] form of +the regexp's source string or byte string. + +For the purposes of printing enclosing datatypes, a regexp value is +@tech{quotable}. @section[#:tag "print-unreadable"]{Printing Unreadable Values} @@ -343,3 +448,6 @@ form is @litchar{#<}@nonterm{something}@litchar{>}, where to the value itself. If @racket[print-unreadable] is set to @racket[#f], then attempting to print an unreadable value raises @racket[exn:fail]. + +For the purposes of printing enclosing datatypes, a value that prints +unreadably nevertheless counts as @tech{quotable}. 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 248429ecc0..608ab0e090 100644 --- a/collects/scribblings/reference/write.scrbl +++ b/collects/scribblings/reference/write.scrbl @@ -44,7 +44,7 @@ proportional to the depth of the value being printed, due to the initial cycle check.} @defproc[(print [datum any/c][out output-port? (current-output-port)] - [qq-depth exact-nonnegative-integer? 0]) + [quote-depth (or/c 0 1) 0]) void?]{ Writes @racket[datum] to @racket[out], normally the same way as @@ -53,10 +53,10 @@ Writes @racket[datum] to @racket[out], normally the same way as the handler specified by @racket[global-port-print-handler] is called; the default handler uses the default printer in @racket[write] mode. -The optional @racket[qq-depth] argument adjust printing when the -@racket[print-as-quasiquote] parameter is set to @racket[#t]. In that -case, @racket[qq-depth] specifies the starting @racket[quasiquote] -depth for printing @racket[datum]. +The optional @racket[quote-depth] argument adjusts printing when the +@racket[print-as-expression] parameter is set to @racket[#t]. In that +case, @racket[quote-depth] specifies the starting quote depth for +printing @racket[datum]. The rationale for providing @racket[print] is that @racket[display] and @racket[write] both have specific output conventions, and those @@ -209,10 +209,10 @@ with @racket[quote], @racket['quasiquote], @racket['unquote], @racket['unsyntax], or @racket['unsyntax-splicing]; defaults to @racket[#f]. See @secref["print-pairs"] for more information.} -@defboolparam[print-as-quasiquote on?]{ +@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?]{ @@ -253,7 +253,7 @@ it is not @racket[#f], otherwise the path is left relative).} [proc (any/c output-port? . -> . any)]) void?])]{} -@defproc*[([(port-print-handler [out output-port?]) ((any/c output-port?) (exact-nonnegative-integer?) . ->* . any)] +@defproc*[([(port-print-handler [out output-port?]) ((any/c output-port?) ((or/c 0 1)) . ->* . any)] [(port-print-handler [out output-port?] [proc (any/c output-port? . -> . any)]) void?])]{ @@ -277,7 +277,7 @@ default print handler calls the global port print handler (the value of the @racket[global-port-print-handler] parameter); the default global port print handler is the same as the default write handler.} -@defproc*[([(global-port-print-handler) ((any/c output-port?) (exact-nonnegative-integer?) . ->* . any)] +@defproc*[([(global-port-print-handler) ((any/c output-port?) ((or/c 0 1)) . ->* . any)] [(global-port-print-handler [proc (any/c output-port? . -> . any)]) void?])]{ A parameter that determines @deftech{global port print handler}, 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/scriblib/scribblings/gui-eval.scrbl b/collects/scriblib/scribblings/gui-eval.scrbl index 84d1e06e5c..f6a86f800f 100644 --- a/collects/scriblib/scribblings/gui-eval.scrbl +++ b/collects/scriblib/scribblings/gui-eval.scrbl @@ -7,7 +7,7 @@ @schememodname[scriblib/gui-eval] library support example evaluations with results that are @schememodname[slideshow] picts.} -The trick is that @schememodname[scheme/gui] is not generally +The trick is that @schememodname[racket/gui] is not generally available when rendering documentation, because it requires a GUI context. The picture output is rendered to an image file when the @envvar{MREVAL} environment variable is set, so run the enclosing @@ -27,5 +27,5 @@ generated image. Like @scheme[interaction], etc., but actually evaluating the forms only when the @envvar{MREVAL} environment variable is set, and then in -an evaluator that is initialized with @schememodname[scheme/gui/base] +an evaluator that is initialized with @schememodname[racket/gui/base] and @schememodname[slideshow]. } diff --git a/collects/setup/getinfo.rkt b/collects/setup/getinfo.rkt index e23469c8f5..cd6541b350 100644 --- a/collects/setup/getinfo.rkt +++ b/collects/setup/getinfo.rkt @@ -8,10 +8,11 @@ (define user-infotable (get-planet-cache-path)) ;; get-info : (listof path-or-string) -> info/#f -(define (get-info coll-path) +(define (get-info coll-path #:namespace [ns #f]) (get-info/full (apply collection-path (map (lambda (x) (if (path? x) (path->string x) x)) - coll-path)))) + coll-path)) + #:namespace ns)) ;; HACK: ;; This require is not used. It just requires the file, since @@ -24,11 +25,11 @@ (require (prefix-in !!!HACK!!! setup/infotab/lang/reader)) ;; get-info/full : path -> info/#f -(define (get-info/full dir) - (or (get-info/full/ext dir "rkt") - (get-info/full/ext dir "ss"))) +(define (get-info/full dir #:namespace [ns #f]) + (or (get-info/full/ext dir "rkt" ns) + (get-info/full/ext dir "ss" ns))) -(define (get-info/full/ext dir ext) +(define (get-info/full/ext dir ext ns) (define file (build-path dir (format "info.~a" ext))) (define (err fmt . args) (apply error 'get-info (string-append "info file " fmt " in ~a") @@ -60,7 +61,7 @@ ;; that is required). ;; We are, however, trusting that the bytecode form of the ;; file (if any) matches the source. - (parameterize ([current-namespace (info-namespace)]) + (parameterize ([current-namespace (or ns (info-namespace))]) (dynamic-require file '#%info-lookup))] [else (err "does not contain a module of the right shape")]))) @@ -201,8 +202,8 @@ (provide/contract (reset-relevant-directories-state! (-> any)) - (get-info ((listof path-or-string?) . -> . (or/c info? boolean?))) - (get-info/full (path? . -> . (or/c info? boolean?))) + (get-info (((listof path-or-string?)) (#:namespace (or/c namespace? #f)) . ->* . (or/c info? boolean?))) + (get-info/full ((path?) (#:namespace (or/c namespace? #f)) . ->* . (or/c info? boolean?))) (find-relevant-directories (->* [(listof symbol?)] [(lambda (x) (memq x '(preferred all-available)))] diff --git a/collects/setup/setup-unit.rkt b/collects/setup/setup-unit.rkt index 0134f3d986..adc8b797b7 100644 --- a/collects/setup/setup-unit.rkt +++ b/collects/setup/setup-unit.rkt @@ -41,7 +41,7 @@ [current-compile compile] [current-load/use-compiled loader] [use-compiled-file-paths paths]) - (get-info/full path))))) + (get-info/full path #:namespace ns))))) (provide setup@) diff --git a/collects/sgl/scribblings/bitmap.scrbl b/collects/sgl/scribblings/bitmap.scrbl index a016b1e879..5f88583e7b 100644 --- a/collects/sgl/scribblings/bitmap.scrbl +++ b/collects/sgl/scribblings/bitmap.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc @(require "common.ss" - (for-label scheme/class)) + (for-label racket/class)) @title[#:tag "bitmaps"]{Bitmaps} @@ -15,14 +15,14 @@ exact-integer?]{ Converts the given bitmap into an OpenGL list that can be rendered -with @scheme[gl-call-list] or @scheme[glCallList]. The rendered object +with @racket[gl-call-list] or @racket[glCallList]. The rendered object is a square on the @math{z=0} plane with corners at @math{(0,0)} and @math{(1,1)}. -The @scheme[with-gl-proc] must accept a thunk and call it while the +The @racket[with-gl-proc] must accept a thunk and call it while the relevant OpenGL context is selected. Otherwise, the relevant OpenGL context must be selected already. -If @scheme[mask] is not @scheme[#f], it is used as the mask bitmap for +If @racket[mask] is not @racket[#f], it is used as the mask bitmap for extracting alpha values.} diff --git a/collects/sgl/scribblings/gl-vectors.scrbl b/collects/sgl/scribblings/gl-vectors.scrbl index 8dff8cde3a..056bfbcedb 100644 --- a/collects/sgl/scribblings/gl-vectors.scrbl +++ b/collects/sgl/scribblings/gl-vectors.scrbl @@ -1,18 +1,18 @@ #lang scribble/doc @(require "common.ss" scribble/bnf - (for-syntax scheme/base)) + (for-syntax racket/base)) @title[#:tag "gl-vectors"]{OpenGL Vectors} @defmodule[sgl/gl-vectors] -The @schememodname[sgl/gl-vectors] module supports OpenGL programming -with @scheme[cvector]s. In this document and in the error messages, a -``gl-vector'' is just a @scheme[cvector], while a -``gl-@nonterm{type}-vector'' is a @scheme[cvector] with an appropriate -type. Using the @schememodname[sgl/gl-vectors] module instead of using -@scheme[cvector] directly because these functions are specialized to +The @racketmodname[sgl/gl-vectors] module supports OpenGL programming +with @racket[cvector]s. In this document and in the error messages, a +``gl-vector'' is just a @racket[cvector], while a +``gl-@nonterm{type}-vector'' is a @racket[cvector] with an appropriate +type. Using the @racketmodname[sgl/gl-vectors] module instead of using +@racket[cvector] directly because these functions are specialized to handling the OpenGL types correctly. @deftogether[( @@ -24,7 +24,7 @@ handling the OpenGL types correctly. @defproc[(gl-vector-set! [vec cvector?][pos exact-nonnegative-integer?][v any/v]) void?] )]{ -Synonyms for @scheme[cvector?], @scheme[cvector->vector], @scheme[cvector-length], etc.} +Synonyms for @racket[cvector?], @racket[cvector->vector], @racket[cvector-length], etc.} @(define-syntax (define-gl-vector stx) (syntax-case stx () @@ -66,10 +66,10 @@ Synonyms for @scheme[cvector?], @scheme[cvector->vector], @scheme[cvector-length @defproc[(gl--vector* [x real?][vec gl--vector?]) gl--vector?] )]{ - Operations on vectors of @scheme[] elements. The @scheme[gl--vector+] - and @scheme[gl--vector-] functions compute the element-by-element sum and - difference of the given vectors, respectively. The @scheme[gl--vector*] function - multiplies each element of @scheme[vec] by @scheme[x].})))])) + Operations on vectors of @racket[] elements. The @racket[gl--vector+] + and @racket[gl--vector-] functions compute the element-by-element sum and + difference of the given vectors, respectively. The @racket[gl--vector*] function + multiplies each element of @racket[vec] by @racket[x].})))])) @(define-gl-vector byte) @(define-gl-vector ubyte) @@ -84,5 +84,5 @@ Synonyms for @scheme[cvector?], @scheme[cvector->vector], @scheme[cvector-length @defproc[(gl-vector-norm [vec gl-vector?]) real?]{ Returns the square root of the sum of the squares of the elements -of @scheme[vec].} +of @racket[vec].} diff --git a/collects/sgl/scribblings/gl.scrbl b/collects/sgl/scribblings/gl.scrbl index 24cbefad8e..cf9ec864ca 100644 --- a/collects/sgl/scribblings/gl.scrbl +++ b/collects/sgl/scribblings/gl.scrbl @@ -2,16 +2,16 @@ @(require "common.ss" scribble/bnf scribble/eval - (for-syntax scheme/base)) + (for-syntax racket/base)) @title[#:tag "gl"]{C-Style OpenGL} @defmodule[sgl/gl] -The @schememodname[sgl/gl] module provides a direct interface to the +The @racketmodname[sgl/gl] module provides a direct interface to the system's GL library closely following the conventions of the C-language OpenGL API. It provides a binding for each @tt{#defined} -constant (these start with @schemeidfont{GL_}) and for the functions +constant (these start with @racketidfont{GL_}) and for the functions in the GL 1.5 and GLU 1.3 specifications, except for the following: @itemize[#:style 'compact @@ -26,13 +26,13 @@ in the GL 1.5 and GLU 1.3 specifications, except for the following: If one of the provided functions is not present on your system (e.g. if your system supports only GL 1.3), then the corresponding -@schememodname[sgl/gl] function raises a run-time exception when +@racketmodname[sgl/gl] function raises a run-time exception when invoked. -The functions provided by @schememodname[sgl/gl] perform comparable +The functions provided by @racketmodname[sgl/gl] perform comparable checking to their C-language counterparts; they check the types of their arguments, but do not check the length of array arguments. The -following details the kinds of Scheme values that can be provided for +following details the kinds of Racket values that can be provided for each primitive OpenGL type: @itemize[ @@ -60,24 +60,24 @@ each primitive OpenGL type: @as-index{@tt{GLclampd}}: real number} - @item{@as-index{@tt{GLboolean}}: any value, where @scheme[#f] means + @item{@as-index{@tt{GLboolean}}: any value, where @racket[#f] means @as-index{@tt{GL_FALSE}} and all other values mean - @as-index{@tt{GL_TRUE}}; do not use @scheme[GL_FALSE] or - @scheme[GL_TRUE], since they are bound to integers, both will + @as-index{@tt{GL_TRUE}}; do not use @racket[GL_FALSE] or + @racket[GL_TRUE], since they are bound to integers, both will end up being converted to GL_TRUE.} ] -OpenGL functions that take vector arguments accept @scheme[cvector] -values. The type of the @scheme[cvector] is checked; for example, +OpenGL functions that take vector arguments accept @racket[cvector] +values. The type of the @racket[cvector] is checked; for example, @tt{glVertex3fv} expects a vector of @tt{GLfloats}, so -@scheme[glVertex3fv] accepts only a @scheme[cvector] containing reals. -See also @schememodname[sgl/gl-vectors]. Functions that accept arrays -of type @tt{void*} accept any @scheme[cvector]; you must ensure that +@racket[glVertex3fv] accepts only a @racket[cvector] containing reals. +See also @racketmodname[sgl/gl-vectors]. Functions that accept arrays +of type @tt{void*} accept any @racket[cvector]; you must ensure that you supply the proper kind of vector, as in the C-language OpenGL API. @as-examples[ -@schemeblock[ +@racketblock[ (require sgl/gl sgl/gl-vectors) (glBegin GL_TRIANGLES) @@ -187,16 +187,16 @@ function directly return @tt{GLdouble} vectors.} )]{ These functions do not take vectors, instead they return a -@scheme[selection-buffer-object] or @scheme[feedback-buffer-object]. -The @scheme[select-buffer->gl-uint-vector] and -@scheme[feedback-buffer->gl-float-vector] functions copy the contents +@racket[selection-buffer-object] or @racket[feedback-buffer-object]. +The @racket[select-buffer->gl-uint-vector] and +@racket[feedback-buffer->gl-float-vector] functions copy the contents of the buffer into a vector. Because the OpenGL library writes to the buffer-object on OpenGL function calls after @tt{glSelectBuffer} or @tt{glFeedbackBuffer} has returned, if the buffer is garbage collected -before OpenGL is finished writing to it, the entire Scheme system can -crash. The @scheme[gl-process-selection] function in -@schememodname[sgl] helps interpret the results of @tt{glSelectBuffer} -in a Scheme-friendly format.} +before OpenGL is finished writing to it, the entire Racket system can +crash. The @racket[gl-process-selection] function in +@racketmodname[sgl] helps interpret the results of @tt{glSelectBuffer} +in a Racket-friendly format.} @def-C-gl[( glAccum @@ -1633,9 +1633,9 @@ All OpenGL-defined constants.} @defproc[(feedback-buffer->gl-float-vector [buf feedback-buffer-object?]) gl-float-vector?]{ -Converts a result from @scheme[glFeedbackBuffer] to a vector.} +Converts a result from @racket[glFeedbackBuffer] to a vector.} @defproc[(select-buffer->gl-uint-vector [buf select-buffer-object?]) gl-uint-vector?]{ -Converts a result from @scheme[glSelectBuffer] to a vector.} +Converts a result from @racket[glSelectBuffer] to a vector.} diff --git a/collects/sgl/scribblings/main.scrbl b/collects/sgl/scribblings/main.scrbl index 8cb8d33df4..41119b873e 100644 --- a/collects/sgl/scribblings/main.scrbl +++ b/collects/sgl/scribblings/main.scrbl @@ -1,42 +1,42 @@ #lang scribble/doc @(require "common.ss" scribble/eval - (for-syntax scheme/base)) + (for-syntax racket/base)) -@title[#:tag "main"]{Scheme-Style OpenGL} +@title[#:tag "main"]{Racket-Style OpenGL} @defmodule[sgl] -The functions in @schememodname[sgl] use Scheme style names instead of -C style names. To convert a C OpenGL name to a Scheme OpenGL name, -change the @tt{gl} prefix to @schemeidfont{gl-}, separate adjacent +The functions in @racketmodname[sgl] use Racket style names instead of +C style names. To convert a C OpenGL name to a Racket OpenGL name, +change the @tt{gl} prefix to @racketidfont{gl-}, separate adjacent words with hyphens, and convert to all lower case. Functions that have several variants to accommodate different numbers and types of arguments are collapsed into one or two functions in -@schememodname[sgl]. For example, @schememodname[sgl] provides two -vertex functions: @scheme[vertex] and @scheme[vertex-v]. The -@scheme[vertex] function accepts 2, 3 or 4 numerical arguments, and -the @scheme[vertex-v] function accepts @scheme[gl-vector]s of length +@racketmodname[sgl]. For example, @racketmodname[sgl] provides two +vertex functions: @racket[vertex] and @racket[vertex-v]. The +@racket[vertex] function accepts 2, 3 or 4 numerical arguments, and +the @racket[vertex-v] function accepts @racket[gl-vector]s of length 2, 3 or 4. The C language OpenGL interface, in contrast, has 24 vertex functions: @tt{glVertex3i}, @tt{glVertex4fv}, etc. -Functions in @schememodname[sgl] take symbols instead of integers for +Functions in @racketmodname[sgl] take symbols instead of integers for @tt{GLenum} arguments. Each function checks that the given symbol is an acceptable argument and raises an exception if it is not. Given the name of a C-language @tt{#define} constant, determine the corresponding symbolic argument by removing the leading @tt{GL_}, converting the letters to lower-case and replacing each @tt{_} with -@schemeidfont{-}. For example, @tt{GL_TRIANGLES} becomes -@scheme['triangles], and @tt{GL_TRIANGLE_STRIP} becomes -@scheme['triangle-strip]. Additionally, the functions check the +@racketidfont{-}. For example, @tt{GL_TRIANGLES} becomes +@racket['triangles], and @tt{GL_TRIANGLE_STRIP} becomes +@racket['triangle-strip]. Additionally, the functions check the length of any array arguments to ensure that OpenGL does not attempt to write or read after the array. -The @schememodname[sgl] module is not as complete as the -@schememodname[sgl/gl] module. +The @racketmodname[sgl] module is not as complete as the +@racketmodname[sgl/gl] module. @as-examples[ -@schemeblock[ +@racketblock[ (require sgl sgl/gl-vectors) (gl-begin 'triangles) (gl-vertex 1 2 3) @@ -48,12 +48,12 @@ The @schememodname[sgl] module is not as complete as the Represents a selection.} -@(define-syntax-rule (def-scheme-gl (id ...) body ...) +@(define-syntax-rule (def-racket-gl (id ...) body ...) @deftogether[( @defthing[id procedure?] ... ) body ...]) -@def-scheme-gl[( +@def-racket-gl[( gl-accum gl-active-texture gl-alpha-func @@ -192,25 +192,25 @@ gl-window-pos gl-window-pos-v )]{ -Scheme-style variants of the OpenGL functions.} +Racket-style variants of the OpenGL functions.} @defproc[(gl-process-selection [vec gl-uint-vector?] [hits exact-nonnegative-integer?]) (listof gl-selection-record?)]{ -Parses the contents of @scheme[vec] from the format used by -@scheme[glSelectBuffer]. The second argument should be the number of -hits as returned by @scheme[glRenderMode].} +Parses the contents of @racket[vec] from the format used by +@racket[glSelectBuffer]. The second argument should be the number of +hits as returned by @racket[glRenderMode].} @defproc[(gl-get-gl-version-number) exact-nonnegative-integer?]{ -Returns the run-time OpenGL version number as an integer: @scheme[10], -@scheme[11], @scheme[12], @scheme[13], @scheme[14], @scheme[15], or -@scheme[20].} +Returns the run-time OpenGL version number as an integer: @racket[10], +@racket[11], @racket[12], @racket[13], @racket[14], @racket[15], or +@racket[20].} @defproc[(gl-get-glu-version-number) exact-nonnegative-integer?]{ -Returns the run-time GLU version number as an integer: @scheme[10], -@scheme[11], @scheme[12], or @scheme[13].} +Returns the run-time GLU version number as an integer: @racket[10], +@racket[11], @racket[12], or @racket[13].} diff --git a/collects/sgl/scribblings/overview.scrbl b/collects/sgl/scribblings/overview.scrbl index f8eb4bbc63..9fb404d94a 100644 --- a/collects/sgl/scribblings/overview.scrbl +++ b/collects/sgl/scribblings/overview.scrbl @@ -3,29 +3,29 @@ @title[#:tag "overview"]{Using OpenGL} -The @schememodname[sgl/gl] library provides direct access to the -C-style OpenGL API, whereas the @schememodname[sgl] library provides a -more Scheme-like interface. The @schememodname[sgl/gl] library +The @racketmodname[sgl/gl] library provides direct access to the +C-style OpenGL API, whereas the @racketmodname[sgl] library provides a +more Racket-like interface. The @racketmodname[sgl/gl] library provides a binding for each @tt{#defined} constant and for most functions in OpenGL 1.5 and GLU 1.3. The functions perform comparable checking to their C-language counterparts; they check the types of their arguments, but do not check the length of array arguments. The -@schememodname[sgl] library provides wrappers around many of the -functions in the @schememodname[sgl/gl] library to present a more -Scheme-friendly interface, including function names that follow Scheme +@racketmodname[sgl] library provides wrappers around many of the +functions in the @racketmodname[sgl/gl] library to present a more +Racket-friendly interface, including function names that follow Racket conventions, and checked, symbolic enumeration arguments, and array-length checks. @bold{Warning on Safety:} OpenGL programming is inherently unsafe, -even when using only the @schememodname[sgl] library. Although -@schememodname[sgl] checks the arguments to each function call, +even when using only the @racketmodname[sgl] library. Although +@racketmodname[sgl] checks the arguments to each function call, violation of higher-level assumptions of the system's OpenGL library -can cause it to crash, bringing the entire Scheme system down. For +can cause it to crash, bringing the entire Racket system down. For example, sending a large number of vertices in a single @tt{glBegin} causes at least some GL implementations to crash. Some examples are available in the @filepath{examples} directory of -the @filepath{sgl} collection in the PLT Scheme installation. For +the @filepath{sgl} collection in the Racket installation. For @filepath{alpha.ss}, try choosing the @filepath{sk.jpg} image distritbuted -with PLT Scheme in the @filepath{icons} collection; you may have to +with Racket in the @filepath{icons} collection; you may have to press the ``t'' key a few times if the spinning cube is blank. diff --git a/collects/sgl/scribblings/sgl.scrbl b/collects/sgl/scribblings/sgl.scrbl index 01f0689ef9..d22806c48b 100644 --- a/collects/sgl/scribblings/sgl.scrbl +++ b/collects/sgl/scribblings/sgl.scrbl @@ -9,9 +9,9 @@ The @schememodname[sgl] libraries provide access to the rendering functions of @as-index{OpenGL} 1.5 and @as-index{GLU} 1.3 libraries. The @schememodname[sgl] libraries to not address system-level concerns, such as the attachment of GL rendering contexts -to displays. Instead, the libraries should work with any PLT Scheme +to displays. Instead, the libraries should work with any Racket extension that provides GL with access to the system (such as a -binding for @tt{glx}). Notably, the @schememodname[scheme/gui/base] +binding for @tt{glx}). Notably, the @schememodname[racket/gui/base] library provides support for rendering contexts via the @scheme[canvas%] class and its @method[canvas% with-gl-context] method. diff --git a/collects/srfi/srfi.scrbl b/collects/srfi/srfi.scrbl index 3727ef6e7b..da9ce097a2 100644 --- a/collects/srfi/srfi.scrbl +++ b/collects/srfi/srfi.scrbl @@ -57,7 +57,7 @@ Implementation} (a.k.a. @deftech{SRFI}) process allows individual members of the Scheme community to propose libraries and extensions to be supported by multiple Scheme implementations. -PLT Scheme is distributed with implementations of many SRFIs, most of +Racket is distributed with implementations of many SRFIs, most of which can be implemented as libraries. To import the bindings of SRFI @math{n}, use @@ -65,9 +65,9 @@ which can be implemented as libraries. To import the bindings of SRFI (require @#,elem{@schemeidfont{srfi/}@math{n}}) ] -This document lists the SRFIs that are supported by PLT Scheme and +This document lists the SRFIs that are supported by Racket and provides a link to the original SRFI specification (which is also -distributed as part of PLT Scheme's documentation). +distributed as part of Racket's documentation). @table-of-contents[] @@ -565,7 +565,7 @@ are also available from @schememodname[scheme/foreign]. )] Take care NOT to confuse the internal date structure with the -PLT Scheme @scheme[date]; they are not the same, and all procedures +Racket @scheme[date]; they are not the same, and all procedures from the SRFI library expect the former. @; ---------------------------------------- @@ -651,7 +651,7 @@ from the SRFI library expect the former. @srfi[30]{Nested Multi-line Comments} -This SRFI's syntax is part of PLT Scheme's default reader. +This SRFI's syntax is part of Racket's default reader. @; ---------------------------------------- @@ -684,7 +684,7 @@ This SRFI's syntax is part of PLT Scheme's default reader. (read-with-shared-structure #f "read-with-shared-structure") )] -This SRFI's syntax is part of PLT Scheme's default reader and printer. +This SRFI's syntax is part of Racket's default reader and printer. @; ---------------------------------------- @@ -919,7 +919,7 @@ Returns @scheme[#t] if @scheme[v] is a promise, @scheme[#f] otherwise.} Original specification: @link["../srfi-std/srfi-62.html"]{SRFI 62} -This SRFI's syntax is part of PLT Scheme's default reader (no +This SRFI's syntax is part of Racket's default reader (no @scheme[require] is needed). @; ---------------------------------------- diff --git a/collects/string-constants/danish-string-constants.rkt b/collects/string-constants/danish-string-constants.rkt index a2c6af446c..a4f65c0451 100644 --- a/collects/string-constants/danish-string-constants.rkt +++ b/collects/string-constants/danish-string-constants.rkt @@ -132,7 +132,7 @@ please adhere to these guidelines: (web-materials "Relaterede websites") ;; menu item title (tool-web-sites "Tool Web Sites") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "How to Use Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -241,7 +241,7 @@ please adhere to these guidelines: ;; modes (mode-submenu-label "Tilstande") - (scheme-mode "Scheme-tilstand") + (scheme-mode "Racket-tilstand") (text-mode "Tekst-tilstand") (scheme-mode-color-symbol "Symbol") @@ -379,7 +379,7 @@ please adhere to these guidelines: (preferences "Indstillinger") (error-saving-preferences "Fejl under lagring af indstillinger: ~a") (error-reading-preferences "Fejl ved indlæsning af indstillinger") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Advarsler") (editor-prefs-panel-label "Redigering") (general-prefs-panel-label "Generelt") @@ -443,7 +443,7 @@ please adhere to these guidelines: ; warning message when lockfile is around (waiting-for-pref-lock "Venter på indstillingernes låsefil...") (pref-lock-not-gone - "Indstillingernes låsefil:\n\n ~a\n\nforhindrer indstillingerne i at blive gemt. Sørg for, at du ikke kører PLT-programmer og slet denne fil.") + "Indstillingernes låsefil:\n\n ~a\n\nforhindrer indstillingerne i at blive gemt. Sørg for, at du ikke kører Racket-programmer og slet denne fil.") (still-locked-exit-anyway? "Indstillingerne blev ikke gemt rigtigt. Afslut alligevel?") ;;; indenting preferences panel @@ -781,7 +781,7 @@ please adhere to these guidelines: (language-menu-name "&Sprog") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "Kør") (execute-menu-item-help-string "Genstart programmet i definitionsvinduet") (break-menu-item-label "Afbryd") @@ -803,12 +803,12 @@ please adhere to these guidelines: (create-executable-menu-item-label "Lav binær kørselfil...") (create-executable-title "Lav binær kørselsfil") (must-save-before-executable "Du skal gemme dit program, før du laver en binær fil") - (save-a-mred-launcher "Gem en MrEd-starter") - (save-a-mzscheme-launcher "Gem en MzScheme-starter") - (save-a-mred-stand-alone-executable "Gem en selvstændig MrEd-kørselsfil") - (save-a-mzscheme-stand-alone-executable "Gen en selvstændig MzScheme kørselsfil") - (save-a-mred-distribution "Gem en MrEd-distribution") - (save-a-mzscheme-distribution "Gem en MzScheme-distribution") + (save-a-mred-launcher "Gem en GRacket-starter") + (save-a-mzscheme-launcher "Gem en Racket-starter") + (save-a-mred-stand-alone-executable "Gem en selvstændig GRacket-kørselsfil") + (save-a-mzscheme-stand-alone-executable "Gen en selvstændig Racket kørselsfil") + (save-a-mred-distribution "Gem en GRacket-distribution") + (save-a-mzscheme-distribution "Gem en Racket-distribution") (definitions-not-saved "Definitionsvinduet har ikke været gemt. Den binære kørselsfil vil bruge den senest gemte version af definitionsvinduet. Fortsæt?") (launcher "Starter") @@ -924,7 +924,7 @@ please adhere to these guidelines: (advanced-student "Rutineret") (advanced-one-line-summary "Øvet med lambda og mutation") (how-to-design-programs "How to Design Programs") ;; should agree with MIT Press on this one... - (pretty-big-scheme "Temmelig omfattende Scheme") + (pretty-big-scheme "Temmelig omfattende Racket") (pretty-big-scheme-one-line-summary "Grafisk, med mange standardbiblioteker") (r5rs-language-name "R5RS") (r5rs-one-line-summary "R5RS, uden dikkedarer") @@ -1032,14 +1032,14 @@ please adhere to these guidelines: ;;; version checker (version:update-menu-item "Undersøger om der er opdateringer...") (version:update-check "Opdateringstjek") ; dialog title, with the next line - (version:connecting-server "Forbinder til PLTs versionsserver") - (version:results-title "PLT Versionstjek") - (version:do-periodic-checks "Tjek med mellemrum om der er kommet nye PLT Scheme-versioner") + (version:connecting-server "Forbinder til Rackets versionsserver") + (version:results-title "Racket Versionstjek") + (version:do-periodic-checks "Tjek med mellemrum om der er kommet nye Racket-versioner") (version:take-me-there "Til download") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "Din PLT version er up-to-date") + (version:plt-up-to-date "Din Racket version er up-to-date") (version:but-newer-alpha "men læg mærke til, at der er en nyere alpha-udgave") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "er nu klar på") ;; special menu @@ -1066,8 +1066,8 @@ please adhere to these guidelines: (module-browser-show-lib-paths/short "Følg lib requires") ;; check box label in show module browser pane in drscheme window. (module-browser-show-planet-paths/short "Følg planet requires") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "Opdater") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "Moduloversigten er kun tilgængelig for programmer i PLT-sprogene og i modul-sproget (og kun for de programmer, som benytter moduler).") +; (module-browser-only-in-plt-and-module-langs +; "Moduloversigten er kun tilgængelig for programmer i PLT-sprogene og i modul-sproget (og kun for de programmer, som benytter moduler).") (module-browser-name-length "Navnelængde") (module-browser-name-short "Kort") (module-browser-name-medium "Mellem") @@ -1106,13 +1106,13 @@ please adhere to these guidelines: (snips-and-arrows-hide-all-snips-in-editor "Skjul alle snips i editoren") (xml-tool-insert-xml-box "Indsæt XML-kasse") - (xml-tool-insert-scheme-box "Indsæt Scheme-kasse") - (xml-tool-insert-scheme-splice-box "Indsæt Scheme-splejningskasse (Splice Box)") + (xml-tool-insert-scheme-box "Indsæt Racket-kasse") + (xml-tool-insert-scheme-splice-box "Indsæt Racket-splejningskasse (Splice Box)") (xml-tool-xml-box "XML-Kasse") - (xml-tool-scheme-box "Scheme-Kasse") - (xml-tool-scheme-splice-box "Scheme-splejsningskasse Scheme Splice Box") - (xml-tool-switch-to-scheme "Skift til Scheme-kasse") - (xml-tool-switch-to-scheme-splice "Skift til Scheme-splejsningskasse") + (xml-tool-scheme-box "Racket-Kasse") + (xml-tool-scheme-splice-box "Racket-splejsningskasse Racket Splice Box") + (xml-tool-switch-to-scheme "Skift til Racket-kasse") + (xml-tool-switch-to-scheme-splice "Skift til Racket-splejsningskasse") (xml-tool-eliminate-whitespace-in-empty-tags "Fjern blanktegn i tomme tags") (xml-tool-leave-whitespace-alone "Bevar blanktegn") @@ -1189,7 +1189,7 @@ please adhere to these guidelines: ;; Errors (test-case-empty-error "Tomt test") (test-case-too-many-expressions-error "For mange udtryk i testen.") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "Indsæt test") (test-case-disable-all "Slå alle tests fra") (test-case-enable-all "Slp alle tests til") diff --git a/collects/string-constants/dutch-string-constants.rkt b/collects/string-constants/dutch-string-constants.rkt index 60a6d61e4e..8d8c655f89 100644 --- a/collects/string-constants/dutch-string-constants.rkt +++ b/collects/string-constants/dutch-string-constants.rkt @@ -32,7 +32,7 @@ ;;; important urls (web-materials "Verwante Web Sites") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "How to Use Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -207,7 +207,7 @@ (preferences "Voorkeuren") (error-saving-preferences "Fout bij opslaan voorkeuren: ~a") (error-reading-preferences "Fout bij lezen voorkeuren") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Waarschuwingen") (editor-prefs-panel-label "Bewerken") (highlight-parens "Oplichten tussen bijeenhorende haken") ; -- ugly Dutch - should say something completely different, such as "highlight substructure" @@ -250,7 +250,7 @@ ; warning message when lockfile is around (waiting-for-pref-lock "Waiting for the preferences lockfile...") ; <**> (pref-lock-not-gone - "The preferences lockfile:\n\n ~a\n\nprevents the preferences from being saved. Ensure that no PLT software is running and delete this file.") + "The preferences lockfile:\n\n ~a\n\nprevents the preferences from being saved. Ensure that no Racket software is running and delete this file.") (still-locked-exit-anyway? "Opslaan voorkeuren mislukt. Toch afsluiten?") ;;; indenting preferences panel @@ -520,7 +520,7 @@ (language-menu-name "&Taal") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "Doen!") (execute-menu-item-help-string "Voer het programma in het definitievenster uit") (break-menu-item-label "Onderbreken") @@ -738,13 +738,13 @@ ;(mrflow-language-primitives-error "Onjuiste bestandsnaam voor typentabel basisfuncties: ~a") (xml-tool-insert-xml-box "XMLblok") - (xml-tool-insert-scheme-box "Schemeblok") - (xml-tool-insert-scheme-splice-box "Scheme Splice Box") + (xml-tool-insert-scheme-box "Racketblok") + (xml-tool-insert-scheme-splice-box "Racket Splice Box") (xml-tool-xml-box "XML Box") - (xml-tool-scheme-box "Scheme Box") - (xml-tool-scheme-splice-box "Scheme Splice Box") - (xml-tool-switch-to-scheme "Switch to Scheme box") - (xml-tool-switch-to-scheme-splice "Switch to Scheme splice box") + (xml-tool-scheme-box "Racket Box") + (xml-tool-scheme-splice-box "Racket Splice Box") + (xml-tool-switch-to-scheme "Switch to Racket box") + (xml-tool-switch-to-scheme-splice "Switch to Racket splice box") (xml-tool-eliminate-whitespace-in-empty-tags "Verwijder wit in lege tags") ; <**> - don't know the official Dutch for 'tag' here.. (xml-tool-leave-whitespace-alone "Laat wit staan") diff --git a/collects/string-constants/english-string-constants.rkt b/collects/string-constants/english-string-constants.rkt index 71b24dd75b..25a9ffea96 100644 --- a/collects/string-constants/english-string-constants.rkt +++ b/collects/string-constants/english-string-constants.rkt @@ -134,7 +134,7 @@ please adhere to these guidelines: (web-materials "Related Web Sites") ;; menu item title (tool-web-sites "Tool Web Sites") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "How to Use Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -254,7 +254,7 @@ please adhere to these guidelines: ;; modes (mode-submenu-label "Modes") - (scheme-mode "Scheme mode") + (scheme-mode "Racket mode") (text-mode "Text mode") (scheme-mode-color-symbol "Symbol") @@ -413,7 +413,7 @@ please adhere to these guidelines: (prefs-file-locked "The preferences file is locked (because the file ~a exists), so your preference change could not be saved. Cancel preference change?") (try-again "Try again") ;; button label (prefs-file-still-locked "The preferences file is still locked (because the file ~a exists), so your preference change will not be saved.") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Warnings") (editor-prefs-panel-label "Editing") (general-prefs-panel-label "General") @@ -483,7 +483,7 @@ please adhere to these guidelines: ; warning message when lockfile is around (waiting-for-pref-lock "Waiting for the preferences lockfile...") (pref-lock-not-gone - "The preferences lockfile:\n\n ~a\n\nprevents the preferences from being saved. Ensure that no PLT software is running and delete this file.") + "The preferences lockfile:\n\n ~a\n\nprevents the preferences from being saved. Ensure that no Racket software is running and delete this file.") (still-locked-exit-anyway? "The preferences were not saved sucessfully. Exit anyway?") ;;; indenting preferences panel @@ -869,7 +869,7 @@ please adhere to these guidelines: (language-menu-name "&Language") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "Run") (execute-menu-item-help-string "Restart the program in the definitions window") (ask-quit-menu-item-label "Ask the Program to Quit") @@ -896,12 +896,12 @@ please adhere to these guidelines: (create-executable-menu-item-label "Create Executable...") (create-executable-title "Create Executable") (must-save-before-executable "You must save your program before creating an executable.") - (save-a-mred-launcher "Save a MrEd Launcher") - (save-a-mzscheme-launcher "Save a MzScheme Launcher") - (save-a-mred-stand-alone-executable "Save a MrEd Stand-alone Executable") - (save-a-mzscheme-stand-alone-executable "Save a MzScheme Stand-alone Executable") - (save-a-mred-distribution "Save a MrEd Distribution") - (save-a-mzscheme-distribution "Save a MzScheme Distribution") + (save-a-mred-launcher "Save a GRacket Launcher") + (save-a-mzscheme-launcher "Save a Racket Launcher") + (save-a-mred-stand-alone-executable "Save a GRacket Stand-alone Executable") + (save-a-mzscheme-stand-alone-executable "Save a Racket Stand-alone Executable") + (save-a-mred-distribution "Save a GRacket Distribution") + (save-a-mzscheme-distribution "Save a Racket Distribution") (definitions-not-saved "The definitions window has not been saved. The executable will use the latest saved version of the definitions window. Continue?") ;; The "-explanatory-label" variants are the labels used for the radio buttons in @@ -1166,14 +1166,14 @@ please adhere to these guidelines: ;;; version checker (version:update-menu-item "Check for Updates...") (version:update-check "Update check") ; dialog title, with the next line - (version:connecting-server "Connecting to PLT version server") - (version:results-title "PLT Version Check") - (version:do-periodic-checks "Periodically check for newer PLT Scheme versions") + (version:connecting-server "Connecting to Racket version server") + (version:results-title "Racket Version Check") + (version:do-periodic-checks "Periodically check for newer Racket versions") (version:take-me-there "Take Me There") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "Your PLT version is up-to-date") + (version:plt-up-to-date "Your Racket version is up-to-date") (version:but-newer-alpha "but note that there is a newer alpha-release") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "is now available at") ;; insert menu @@ -1201,7 +1201,7 @@ please adhere to these guidelines: (module-browser-show-planet-paths/short "Follow PLaneT requires") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "Refresh") ;; button label in show module browser pane in drscheme window. (module-browser-only-in-plt-and-module-langs - "The module browser is only available for programs in the PLT languages and in the module language (and only for programs that have modules in them).") + "The module browser is only available for module-based programs.") (module-browser-name-length "Name length") (module-browser-name-short "Short") (module-browser-name-medium "Medium") @@ -1240,13 +1240,13 @@ please adhere to these guidelines: (snips-and-arrows-hide-all-snips-in-editor "Hide all snips in editor") (xml-tool-insert-xml-box "Insert XML Box") - (xml-tool-insert-scheme-box "Insert Scheme Box") - (xml-tool-insert-scheme-splice-box "Insert Scheme Splice Box") + (xml-tool-insert-scheme-box "Insert Racket Box") + (xml-tool-insert-scheme-splice-box "Insert Racket Splice Box") (xml-tool-xml-box "XML Box") - (xml-tool-scheme-box "Scheme Box") - (xml-tool-scheme-splice-box "Scheme Splice Box") - (xml-tool-switch-to-scheme "Switch to Scheme box") - (xml-tool-switch-to-scheme-splice "Switch to Scheme splice box") + (xml-tool-scheme-box "Racket Box") + (xml-tool-scheme-splice-box "Racket Splice Box") + (xml-tool-switch-to-scheme "Switch to Racket box") + (xml-tool-switch-to-scheme-splice "Switch to Racket splice box") (xml-tool-eliminate-whitespace-in-empty-tags "Eliminiate whitespace in empty tags") (xml-tool-leave-whitespace-alone @@ -1387,7 +1387,7 @@ please adhere to these guidelines: ;;Following two appear in View menu, attach and free test report window from DrRacket frame (test-engine-dock-report "Dock Test Report") (test-engine-undock-report "Undock Test Report") - ;;Following two appear in Scheme (Java, etc) menu, cause Tests to be Run automatically or not + ;;Following two appear in Racket (Java, etc) menu, cause Tests to be Run automatically or not (test-engine-enable-tests "Enable Tests") (test-engine-disable-tests "Disable Tests") @@ -1454,7 +1454,7 @@ please adhere to these guidelines: ;; Errors (test-case-empty-error "Empty test case") (test-case-too-many-expressions-error "Too many expressions in a test case.") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "Insert Test Case") (test-case-disable-all "Disable all Test Cases") (test-case-enable-all "Enable all Test Cases") diff --git a/collects/string-constants/french-string-constants.rkt b/collects/string-constants/french-string-constants.rkt index f519c62b12..a90a565871 100644 --- a/collects/string-constants/french-string-constants.rkt +++ b/collects/string-constants/french-string-constants.rkt @@ -134,7 +134,7 @@ (web-materials "Sites web apparentés") ;; menu item title (tool-web-sites "Sites web d'outils") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "How to Use Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -413,7 +413,7 @@ (prefs-file-locked "Le fichier de préférences est verrouillé (car le fichier ~a existe), donc vos préférences n'ont pu être sauvegardées. Annuler le changement des préférences ?") (try-again "Essayer à nouveau") ;; button label (prefs-file-still-locked "Le fichier de préférences est toujours verrouillé (car le fichier ~a existe), donc vos changements ne vont pas être sauvegardés.") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Avertissements") (editor-prefs-panel-label "Edition") (general-prefs-panel-label "Général") @@ -483,7 +483,7 @@ ; warning message when lockfile is around (waiting-for-pref-lock "Attente sur le fichier de verrouillage des préférences...") (pref-lock-not-gone - "Les préférences sont verrouillées par le fichier :\n\n ~a\n\nqui empêche les préférences d'être sauvegardées. Assurez-vous qu'aucun logiciel PLT n'est en cours d'exécution et effacer le fichier.") + "Les préférences sont verrouillées par le fichier :\n\n ~a\n\nqui empêche les préférences d'être sauvegardées. Assurez-vous qu'aucun logiciel Racket n'est en cours d'exécution et effacer le fichier.") (still-locked-exit-anyway? "Les préférences n'ont pu être sauvegardées correctement. Quitter quand même ?") ;;; indenting preferences panel @@ -869,7 +869,7 @@ (language-menu-name "&Langage") ;;; scheme-menu - (scheme-menu-name "&Scheme") + (scheme-menu-name "&Racket") (execute-menu-item-label "Exécuter") (execute-menu-item-help-string "Réexécuter le programme de la fenêtre de définition.") (ask-quit-menu-item-label "Demander au programme de quitter") @@ -896,12 +896,12 @@ (create-executable-menu-item-label "Créer un exécutable...") (create-executable-title "Créer un exécutable") (must-save-before-executable "Vous devez sauvegarder votre programme avant de créer un exécutable.") - (save-a-mred-launcher "Sauvegarder un lanceur de type MrEd") - (save-a-mzscheme-launcher "Sauvegarder un lanceur de type MzScheme") - (save-a-mred-stand-alone-executable "Sauvegarder un exécutable autonome de type MrEd") - (save-a-mzscheme-stand-alone-executable "Sauvegarder un exécutable autonome de type MzScheme") - (save-a-mred-distribution "Sauvegarder une distribution MrEd") - (save-a-mzscheme-distribution "Sauvegarder une distribution MzScheme") + (save-a-mred-launcher "Sauvegarder un lanceur de type GRacket") + (save-a-mzscheme-launcher "Sauvegarder un lanceur de type Racket") + (save-a-mred-stand-alone-executable "Sauvegarder un exécutable autonome de type GRacket") + (save-a-mzscheme-stand-alone-executable "Sauvegarder un exécutable autonome de type Racket") + (save-a-mred-distribution "Sauvegarder une distribution GRacket") + (save-a-mzscheme-distribution "Sauvegarder une distribution Racket") (definitions-not-saved "La fenêtre de définition n'a pas été sauvegardée. L'exécutable va utiliser la dernière version sauvegardée de la fenêtre de définition. Continuer ?") ;; The "-explanatory-label" variants are the labels used for the radio buttons in @@ -1159,14 +1159,14 @@ ;;; version checker (version:update-menu-item "Rechercher des mises à jour...") (version:update-check "Recherche de mises à jour") ; dialog title, with the next line - (version:connecting-server "Connection au serveur de version PLT") + (version:connecting-server "Connection au serveur de version Racket") (version:results-title "Vérification de la version") - (version:do-periodic-checks "Périodiquement rechercher de nouvelles mises à jour de PLT Scheme ?") + (version:do-periodic-checks "Périodiquement rechercher de nouvelles mises à jour de Racket ?") (version:take-me-there "Allons-y") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "Votre version de PLT Scheme est à jour") + (version:plt-up-to-date "Votre version de Racket est à jour") (version:but-newer-alpha "mais notez qu'il existe une nouvelle version au stade alpha") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "est maintenant disponible à") ;; insert menu @@ -1193,8 +1193,8 @@ (module-browser-show-lib-paths/short "(require (lib ...))") ;; check box label in show module browser pane in drscheme window. (module-browser-show-planet-paths/short "(require (planet ...))") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "Rafraîchir") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "Le navigateur de modules n'est disponible que pour les programmes écrits dans l'un des langages PLT ou dans le langage \"module\", et seulement pour les programmes qui contiennent des modules.") +; (module-browser-only-in-plt-and-module-langs +; "Le navigateur de modules n'est disponible que pour les programmes écrits dans l'un des langages PLT ou dans le langage \"module\", et seulement pour les programmes qui contiennent des modules.") (module-browser-name-length "Noms") (module-browser-name-short "courts") (module-browser-name-medium "moyens") @@ -1233,13 +1233,13 @@ (snips-and-arrows-hide-all-snips-in-editor "Cacher les boîtes de cet éditeur") (xml-tool-insert-xml-box "Insérer une boîte XML") - (xml-tool-insert-scheme-box "Insérer une boîte Scheme") - (xml-tool-insert-scheme-splice-box "Insérer une boîte Scheme à raccord") + (xml-tool-insert-scheme-box "Insérer une boîte Racket") + (xml-tool-insert-scheme-splice-box "Insérer une boîte Racket à raccord") (xml-tool-xml-box "Boîte XML") - (xml-tool-scheme-box "Boîte Scheme") - (xml-tool-scheme-splice-box "Boîte Scheme à raccord") - (xml-tool-switch-to-scheme "Changer pour une boîte Scheme") - (xml-tool-switch-to-scheme-splice "Changer pour une boîte Scheme à raccord") + (xml-tool-scheme-box "Boîte Racket") + (xml-tool-scheme-splice-box "Boîte Racket à raccord") + (xml-tool-switch-to-scheme "Changer pour une boîte Racket") + (xml-tool-switch-to-scheme-splice "Changer pour une boîte Racket à raccord") (xml-tool-eliminate-whitespace-in-empty-tags "Eliminer les espaces dans les délimiteurs vides") (xml-tool-leave-whitespace-alone @@ -1380,7 +1380,7 @@ ;;Following two appear in View menu, attach and free test report window from DrRacket frame (test-engine-dock-report "Attacher le rapport de test") (test-engine-undock-report "Détacher le rapport de test") - ;;Following two appear in Scheme (Java, etc) menu, cause Tests to be Run automatically or not + ;;Following two appear in Racket (Java, etc) menu, cause Tests to be Run automatically or not (test-engine-enable-tests "Revalider les tests") (test-engine-disable-tests "Invalider les tests") @@ -1447,7 +1447,7 @@ ;; Errors (test-case-empty-error "Test vide") (test-case-too-many-expressions-error "Expressions trop nombreuses dans un test.") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "Insérer un test") (test-case-disable-all "Invalider tous les tests") (test-case-enable-all "Revalider tous les tests") diff --git a/collects/string-constants/german-string-constants.rkt b/collects/string-constants/german-string-constants.rkt index 6054487dc6..d4fbbd1f74 100644 --- a/collects/string-constants/german-string-constants.rkt +++ b/collects/string-constants/german-string-constants.rkt @@ -36,7 +36,7 @@ (web-materials "Verwandte Web-Seiten") (tool-web-sites "Web-Seiten mit Tools") (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "How to Use Scheme") (teachscheme!-homepage "TeachScheme!") @@ -155,7 +155,7 @@ ;; modes (mode-submenu-label "Modi") - (scheme-mode "Scheme-Modus") + (scheme-mode "Racket-Modus") (text-mode "Text-Modus") (scheme-mode-color-symbol "Symbol") @@ -309,7 +309,7 @@ (prefs-file-locked "Die Datei mit den Einstellungen ist gesperrt (weil die Datei ~a existiert), weshalb die Änderungen an den Einstellungen nicht gespeichert werden konnten. Änderung an den Einstellungen rückgängig machen?") (try-again "Nochmal versuchen") ;; button label (prefs-file-still-locked "Die Datei mit den Einstellungen ist immer noch gesperrt (weil die Datei ~a existiert), weshalb die Änderungen an den Einstellungen nicht gespeichert werden konnten.") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Warnmeldungen") (editor-prefs-panel-label "Editieren") (general-prefs-panel-label "Allgemein") @@ -381,7 +381,7 @@ ; warning message when lockfile is around (waiting-for-pref-lock "Auf Lock-Datei für Einstellungen warten...") (pref-lock-not-gone - "Die Lock-Datei für die Einstellungen:\n\n ~a\n\nverhindert, dass die Einstellungen abgespeichert werden können. Bitte stellen Sie sicher, dass keine andere PLT-Software läuft und löschen Sie dann diese Datei.") + "Die Lock-Datei für die Einstellungen:\n\n ~a\n\nverhindert, dass die Einstellungen abgespeichert werden können. Bitte stellen Sie sicher, dass keine andere Racket-Software läuft und löschen Sie dann diese Datei.") (still-locked-exit-anyway? "Die Einstellungen wurden nicht korrekt gespeichert. Trotzdem beenden?") ;;; indenting preferences panel @@ -764,7 +764,7 @@ (language-menu-name "&Sprache") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "Start") (execute-menu-item-help-string "Das Programm im Definitionsfenster neu starten") @@ -793,12 +793,12 @@ (create-executable-menu-item-label "Programmdatei generieren...") (create-executable-title "Programmdatei generieren") (must-save-before-executable "Sie müssen vor der Generierung einer Programmdatei speichern.") - (save-a-mred-launcher "MrEd-Launcher speichern") - (save-a-mzscheme-launcher "MzScheme-Launcher speichern") - (save-a-mred-stand-alone-executable "MrEd-Stand-Alone-Programmdatei speichern") - (save-a-mzscheme-stand-alone-executable "MzScheme-Stand-Alone-Programmdatei speichern") - (save-a-mred-distribution "MrEd-Distribution speichern") - (save-a-mzscheme-distribution "MzScheme-Distribution speichern") + (save-a-mred-launcher "GRacket-Launcher speichern") + (save-a-mzscheme-launcher "Racket-Launcher speichern") + (save-a-mred-stand-alone-executable "GRacket-Stand-Alone-Programmdatei speichern") + (save-a-mzscheme-stand-alone-executable "Racket-Stand-Alone-Programmdatei speichern") + (save-a-mred-distribution "GRacket-Distribution speichern") + (save-a-mzscheme-distribution "Racket-Distribution speichern") (definitions-not-saved "Die Definitionen sind nicht gespeichert. Die Programmdatei wird von der letzten gespeicherten Version gezogen. Weitermachen?") (launcher "Launcher") @@ -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 @@ -1057,14 +1065,14 @@ ;;; version checker (version:update-menu-item "Nach Updates schauen...") (version:update-check "Update-Prüfung") - (version:connecting-server "Mit PLT-Versions-Server verbinden") - (version:results-title "PLT-Versions-Check") - (version:do-periodic-checks "Regelmäßig nach neueren PLT-Scheme-Versionen schauen") + (version:connecting-server "Mit Racket-Versions-Server verbinden") + (version:results-title "Racket-Versions-Check") + (version:do-periodic-checks "Regelmäßig nach neueren Racket-Versionen schauen") (version:take-me-there "Dorthin gehen") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "Die PLT-Version ist aktuell") + (version:plt-up-to-date "Die Racket-Version ist aktuell") (version:but-newer-alpha "aber es gibt eine neuere Alpha-Version") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "ist jetzt verfügbar bei") ;; insert menu @@ -1092,7 +1100,7 @@ (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).") + "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") @@ -1131,13 +1139,13 @@ (snips-and-arrows-hide-all-snips-in-editor "Alle Snips im Editor ausblenden") (xml-tool-insert-xml-box "XML-Kasten einfügen") - (xml-tool-insert-scheme-box "Scheme-Kasten einfügen") - (xml-tool-insert-scheme-splice-box "Scheme-Spleiß-Kasten einfügen") + (xml-tool-insert-scheme-box "Racket-Kasten einfügen") + (xml-tool-insert-scheme-splice-box "Racket-Spleiß-Kasten einfügen") (xml-tool-xml-box "XML-Kasten") - (xml-tool-scheme-box "Scheme-Kasten") - (xml-tool-scheme-splice-box "Scheme-Spleiß-Kasten") - (xml-tool-switch-to-scheme "In Scheme-Kasten verwandeln") - (xml-tool-switch-to-scheme-splice "In Scheme-Spleiß-Kasten verwandeln") + (xml-tool-scheme-box "Racket-Kasten") + (xml-tool-scheme-splice-box "Racket-Spleiß-Kasten") + (xml-tool-switch-to-scheme "In Racket-Kasten verwandeln") + (xml-tool-switch-to-scheme-splice "In Racket-Spleiß-Kasten verwandeln") (xml-tool-eliminate-whitespace-in-empty-tags "Überflüssigen Whitespace in leeren Tags entfernen") (xml-tool-leave-whitespace-alone @@ -1280,7 +1288,7 @@ ;;Following two appear in View menu, attach and free test report window from DrRacket frame (test-engine-dock-report "Testresultate andocken") (test-engine-undock-report "Testresultate abdocken") - ;;Following two appear in Scheme (Java, etc) menu, cause Tests to be Run automatically or not + ;;Following two appear in Racket (Java, etc) menu, cause Tests to be Run automatically or not (test-engine-enable-tests "Test aktivieren") (test-engine-disable-tests "Tests deaktivieren") @@ -1348,7 +1356,7 @@ ;; Errors (test-case-empty-error "Leerer Testfall") (test-case-too-many-expressions-error "Zu viele Ausdrücke in einem Testfall") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "Testfall einfügen") (test-case-disable-all "Alle Testfälle deaktivieren") (test-case-enable-all "Alle Testfälle aktivieren") diff --git a/collects/string-constants/japanese-string-constants.rkt b/collects/string-constants/japanese-string-constants.rkt index 4b3a02be18..360d706108 100644 --- a/collects/string-constants/japanese-string-constants.rkt +++ b/collects/string-constants/japanese-string-constants.rkt @@ -134,7 +134,7 @@ please adhere to these guidelines: (web-materials "関連するウェブサイト") ;; menu item title (tool-web-sites "ツールのウェブサイト") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "How to Use Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -249,7 +249,7 @@ please adhere to these guidelines: ;; modes (mode-submenu-label "モード") - (scheme-mode "Scheme モード") + (scheme-mode "Racket モード") (text-mode "Text モード") (scheme-mode-color-symbol "シンボル") @@ -408,7 +408,7 @@ please adhere to these guidelines: (prefs-file-locked "環境設定ファイルがロックされています (ファイル ~a が存在します), 環境設定の変更を保存できません。環境設定の変更をキャンセルしますか?") (try-again "再試行") ;; button label (prefs-file-still-locked "環境設定ファイルが依然としてロックされているため (ファイル ~a が存在します), 環境設定の変更を保存できません。") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "警告") (editor-prefs-panel-label "編集") (general-prefs-panel-label "一般") @@ -478,7 +478,7 @@ please adhere to these guidelines: ; warning message when lockfile is around (waiting-for-pref-lock "環境設定のロックファイルを待っています...") (pref-lock-not-gone - "環境設定のロックファイル:\n\n ~a\n\n があるために、環境設定の保存ができません。PLT のソフトウェアが実行されていないことを確認した上で、このファイルを削除してください。") + "環境設定のロックファイル:\n\n ~a\n\n があるために、環境設定の保存ができません。Racket のソフトウェアが実行されていないことを確認した上で、このファイルを削除してください。") (still-locked-exit-anyway? "環境設定が保存できませんでした。とりあえず終了しますか?") ;;; indenting preferences panel @@ -861,7 +861,7 @@ please adhere to these guidelines: (language-menu-name "言語(&L)") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "実行") (execute-menu-item-help-string "定義ウィンドウのプログラムを再開始します") (ask-quit-menu-item-label "プログラムを停止しますか?") @@ -888,12 +888,12 @@ please adhere to these guidelines: (create-executable-menu-item-label "実行ファイルの作成...") (create-executable-title "実行ファイルの作成") (must-save-before-executable "実行ファイルを作成する前に、プログラムを保存してください。") - (save-a-mred-launcher "MrEd ランチャの保存") - (save-a-mzscheme-launcher "MzScheme ランチャの保存") - (save-a-mred-stand-alone-executable "MrEd スタンドアロン実行ファイルの保存") - (save-a-mzscheme-stand-alone-executable "MzScheme スタンドアロン実行ファイルの保存") - (save-a-mred-distribution "MrEd 配布物の保存") - (save-a-mzscheme-distribution "MzScheme 配布物の保存") + (save-a-mred-launcher "GRacket ランチャの保存") + (save-a-mzscheme-launcher "Racket ランチャの保存") + (save-a-mred-stand-alone-executable "GRacket スタンドアロン実行ファイルの保存") + (save-a-mzscheme-stand-alone-executable "Racket スタンドアロン実行ファイルの保存") + (save-a-mred-distribution "GRacket 配布物の保存") + (save-a-mzscheme-distribution "Racket 配布物の保存") (definitions-not-saved "定義ウィンドウが保存されていません。実行ファイルでは定義ウィンドウの最新の保存が使われます。よろしいですか?") ;; The "-explanatory-label" variants are the labels used for the radio buttons in @@ -1147,14 +1147,14 @@ please adhere to these guidelines: ;;; version checker (version:update-menu-item "アップデートの確認...") (version:update-check "アップデートの確認") ; dialog title, with the next line - (version:connecting-server "PLT バージョン サーバーに接続しています") - (version:results-title "PLT バージョンの確認") - (version:do-periodic-checks "PLT Scheme の新しいバージョンを定期的に確認してください") + (version:connecting-server "Racket バージョン サーバーに接続しています") + (version:results-title "Racket バージョンの確認") + (version:do-periodic-checks "Racket の新しいバージョンを定期的に確認してください") (version:take-me-there "ダウンロードする") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "この PLT バージョンは最新です") + (version:plt-up-to-date "この Racket バージョンは最新です") (version:but-newer-alpha "しかし、これより新しいアルファ リリースが存在します") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "が次のサイトから入手できます") ;; insert menu @@ -1181,8 +1181,8 @@ please adhere to these guidelines: (module-browser-show-lib-paths/short "必要なライブラリを含める") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "更新") ;; button label in show module browser pane in drscheme window. (module-browser-refresh "再表示") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "モジュール ブラウザは PLT 言語、または、モジュール言語のプログラム (あるいは、それらの言語のモジュールを持つプログラム) でのみ利用可能です。") +; (module-browser-only-in-plt-and-module-langs +; "モジュール ブラウザは PLT 言語、または、モジュール言語のプログラム (あるいは、それらの言語のモジュールを持つプログラム) でのみ利用可能です。") (module-browser-name-length "名前の長さ") (module-browser-name-short "短い") (module-browser-name-medium "普通") @@ -1220,13 +1220,13 @@ please adhere to these guidelines: (snips-and-arrows-hide-all-snips-in-editor "Hide all snips in editor") (xml-tool-insert-xml-box "XML ボックスを挿入") - (xml-tool-insert-scheme-box "Scheme ボックスを挿入") - (xml-tool-insert-scheme-splice-box "Scheme Splice ボックスを挿入") + (xml-tool-insert-scheme-box "Racket ボックスを挿入") + (xml-tool-insert-scheme-splice-box "Racket Splice ボックスを挿入") (xml-tool-xml-box "XML ボックス") - (xml-tool-scheme-box "Scheme ボックス") - (xml-tool-scheme-splice-box "Scheme Splice ボックス") - (xml-tool-switch-to-scheme "Scheme ボックスに切り替え") - (xml-tool-switch-to-scheme-splice "Scheme Splice ボックスに切り替え") + (xml-tool-scheme-box "Racket ボックス") + (xml-tool-scheme-splice-box "Racket Splice ボックス") + (xml-tool-switch-to-scheme "Racket ボックスに切り替え") + (xml-tool-switch-to-scheme-splice "Racket Splice ボックスに切り替え") (xml-tool-eliminate-whitespace-in-empty-tags "空タグ内の空白を削除") (xml-tool-leave-whitespace-alone @@ -1359,7 +1359,7 @@ please adhere to these guidelines: ;;Following two appear in View menu, attach and free test report window from DrRacket frame (test-engine-dock-report "テスト結果を切り離して表示する") (test-engine-undock-report "テスト結果を統合して表示する") - ;;Following two appear in Scheme (Java, etc) menu, cause Tests to be Run automatically or not + ;;Following two appear in Racket (Java, etc) menu, cause Tests to be Run automatically or not (test-engine-enable-tests "テストを有効にする") (test-engine-disable-tests "テストを無効にする") @@ -1370,7 +1370,7 @@ please adhere to these guidelines: ;; Errors (test-case-empty-error "空のテストケース") (test-case-too-many-expressions-error "テストケース内に式が多過ぎます。") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "テストケースを挿入") (test-case-disable-all "すべてのテストケースを無効にする") (test-case-enable-all "すべてのテストケースを有効にする") diff --git a/collects/string-constants/portuguese-string-constants.rkt b/collects/string-constants/portuguese-string-constants.rkt index 150cb92b4c..06ce67ce98 100644 --- a/collects/string-constants/portuguese-string-constants.rkt +++ b/collects/string-constants/portuguese-string-constants.rkt @@ -134,7 +134,7 @@ please adhere to these guidelines: (web-materials "Sítios Web Relacionados") ;; menu item title (tool-web-sites "Sítios Web de Ferramentas") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "Como Usar o Scheme") ;; title of a book. (teachscheme!-homepage "AprenderScheme!") ;; probably this should be a `word' in all languages @@ -241,7 +241,7 @@ please adhere to these guidelines: ;; modes (mode-submenu-label "Modos") - (scheme-mode "Modo Scheme") + (scheme-mode "Modo Racket") (text-mode "Modo Texto") (scheme-mode-color-symbol "Símbolo") @@ -381,7 +381,7 @@ please adhere to these guidelines: (prefs-file-locked "The preferences file is locked (because the file ~a exists), so your preference change could not be saved. Cancel preference change?") (try-again "Tentar de novo") ;; button label (prefs-file-still-locked "O ficheiro de preferências continua trancado (porque o ficheiro ~a existe), logo as suas modificações não serão guardadas.") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Avisos") (editor-prefs-panel-label "Editar") (general-prefs-panel-label "Geral") @@ -444,7 +444,7 @@ please adhere to these guidelines: ; warning message when lockfile is around (waiting-for-pref-lock "À espera do ficheiro de tranca das preferências...") (pref-lock-not-gone - "O ficheiro de tranca:\n\n ~a\n\nprevine que as preferências de serem guardadas. Certifique-se que nenhum software PLT está a correr e apague este ficheiro.") + "O ficheiro de tranca:\n\n ~a\n\nprevine que as preferências de serem guardadas. Certifique-se que nenhum software Racket está a correr e apague este ficheiro.") (still-locked-exit-anyway? "As preferências não foram guardadas com sucesso. Pretende continuar?") ;;; indenting preferences panel @@ -770,7 +770,7 @@ please adhere to these guidelines: (language-menu-name "&Linguagem") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "Correr") (execute-menu-item-help-string "Reiniciar o programa na janela de definições") (break-menu-item-label "Parar") @@ -791,10 +791,10 @@ please adhere to these guidelines: (create-executable-menu-item-label "Criar Executável...") (create-executable-title "Criar Executável") (must-save-before-executable "Tem de gravar o seu programa antes de criar um executável.") - (save-a-mred-launcher "Save a MrEd Launcher") - (save-a-mzscheme-launcher "Save a MzScheme Launcher") - (save-a-mred-stand-alone-executable "Save a MrEd Stand-alone Executable") - (save-a-mzscheme-stand-alone-executable "Save a MzScheme Stand-alone Executable") + (save-a-mred-launcher "Save a GRacket Launcher") + (save-a-mzscheme-launcher "Save a Racket Launcher") + (save-a-mred-stand-alone-executable "Save a GRacket Stand-alone Executable") + (save-a-mzscheme-stand-alone-executable "Save a Racket Stand-alone Executable") (definitions-not-saved "The definitions window has not been saved. The executable will use the latest saved version of the definitions window. Continue?") (launcher "Launcher") @@ -1004,8 +1004,8 @@ please adhere to these guidelines: (module-browser-compiling-defns "Module Browser: compiling definitions") (module-browser-show-lib-paths/short "Follow lib requires") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "Refresh") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "The module browser is only available for programs in the PLT languages and in the module language (and only for programs that have modules in them).") +; (module-browser-only-in-plt-and-module-langs +; "The module browser is only available for programs in the PLT languages and in the module language (and only for programs that have modules in them).") (module-browser-name-length "Name length") (module-browser-name-short "Short") (module-browser-name-medium "Medium") @@ -1043,13 +1043,13 @@ please adhere to these guidelines: (snips-and-arrows-hide-all-snips-in-editor "Hide all snips in editor") (xml-tool-insert-xml-box "Inserir Caixa XML") - (xml-tool-insert-scheme-box "Inserir Caixa Scheme") - (xml-tool-insert-scheme-splice-box "Inserir Scheme Splice Box") + (xml-tool-insert-scheme-box "Inserir Caixa Racket") + (xml-tool-insert-scheme-splice-box "Inserir Racket Splice Box") (xml-tool-xml-box "Caixa XML") - (xml-tool-scheme-box "Caixa Scheme") - (xml-tool-scheme-splice-box "Scheme Splice Box") - (xml-tool-switch-to-scheme "Switch to Scheme box") - (xml-tool-switch-to-scheme-splice "Switch to Scheme splice box") + (xml-tool-scheme-box "Caixa Racket") + (xml-tool-scheme-splice-box "Racket Splice Box") + (xml-tool-switch-to-scheme "Switch to Racket box") + (xml-tool-switch-to-scheme-splice "Switch to Racket splice box") (xml-tool-eliminate-whitespace-in-empty-tags "Eliminiate whitespace in empty tags") (xml-tool-leave-whitespace-alone @@ -1126,7 +1126,7 @@ please adhere to these guidelines: ;; Errors (test-case-empty-error "Empty test case") (test-case-too-many-expressions-error "Too many expressions in a test case.") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "Insert Test Case") (test-case-disable-all "Disable all Test Cases") (test-case-enable-all "Enable all Test Cases") diff --git a/collects/string-constants/russian-string-constants.rkt b/collects/string-constants/russian-string-constants.rkt index b3b470b979..8063d9dc76 100644 --- a/collects/string-constants/russian-string-constants.rkt +++ b/collects/string-constants/russian-string-constants.rkt @@ -134,7 +134,7 @@ please adhere to these guidelines: (web-materials "Связанные Web-сайты") ;; menu item title (tool-web-sites "Web-сайты установленных инструментов") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "Как использовать Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -254,7 +254,7 @@ please adhere to these guidelines: ;; modes (mode-submenu-label "Режимы") - (scheme-mode "Режим Scheme") + (scheme-mode "Режим Racket") (text-mode "Режим текста") (scheme-mode-color-symbol "Символ") @@ -413,7 +413,7 @@ please adhere to these guidelines: (prefs-file-locked "Файл настроек пользователя заблокирован (так как файл ~a существует), поэтому измененные настройки не будут сохранены. Отменить изменения?") (try-again "Попытаться снова") ;; button label (prefs-file-still-locked "Файл настроек пользователя все еще заблокирован (так как файл ~a существует), поэтому изменения настроек не будут сохранены..") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Предупреждения") (editor-prefs-panel-label "Редактирование") (general-prefs-panel-label "Общее") @@ -483,7 +483,7 @@ please adhere to these guidelines: ; warning message when lockfile is around (waiting-for-pref-lock "Ожидание завершения блокировки настроек пользователя...") (pref-lock-not-gone - "Файл блокировки настроек пользователя: \n\n ~a\n\nне позволяет сохранить изменения настроек. Убедитесь в отсутствии работающего програмного обеспечения PLT и удалите этот файл.") + "Файл блокировки настроек пользователя: \n\n ~a\n\nне позволяет сохранить изменения настроек. Убедитесь в отсутствии работающего програмного обеспечения Racket и удалите этот файл.") (still-locked-exit-anyway? "Настройки не сохранены. Все равно выйти?") ;;; indenting preferences panel @@ -868,7 +868,7 @@ please adhere to these guidelines: (language-menu-name "&Язык") ;;; scheme-menu - (scheme-menu-name "&Scheme") + (scheme-menu-name "&Racket") (execute-menu-item-label "Выполнить") (execute-menu-item-help-string "Перезапустить программу в окне определений") (ask-quit-menu-item-label "Прервать программу") @@ -1157,14 +1157,14 @@ please adhere to these guidelines: ;;; version checker (version:update-menu-item "Проверить обновления...") (version:update-check "Проверка обновлений") ; dialog title, with the next line - (version:connecting-server "Соединение с сервером версии PLT") - (version:results-title "Проверка версии PLT") - (version:do-periodic-checks "Периодически проверять более новые версии PLT Scheme") + (version:connecting-server "Соединение с сервером версии Racket") + (version:results-title "Проверка версии Racket") + (version:do-periodic-checks "Периодически проверять более новые версии Racket") (version:take-me-there "Обновить") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "У Вас новейшая версия PLT") + (version:plt-up-to-date "У Вас новейшая версия Racket") (version:but-newer-alpha "однако заметьте, что есть более новая альфа-версия") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "теперь доступно в") ;; insert menu @@ -1191,8 +1191,8 @@ please adhere to these guidelines: (module-browser-show-lib-paths/short "Показывать пути к библиотекам") ;; check box label in show module browser pane in drscheme window. (module-browser-show-planet-paths/short "Показывать пути к PLanet") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "Обновить") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "Браузер модуля доступен только для программ на PLT-языках и на языке модуля (и только для программ, которые содержат модули).") +; (module-browser-only-in-plt-and-module-langs +; "Браузер модуля доступен только для программ на PLT-языках и на языке модуля (и только для программ, которые содержат модули).") (module-browser-name-length "Длина имени") (module-browser-name-short "Короткая") (module-browser-name-medium "Средняя") @@ -1231,13 +1231,13 @@ please adhere to these guidelines: (snips-and-arrows-hide-all-snips-in-editor "Скрыть все инструменты, вставленные в редактор") (xml-tool-insert-xml-box "Вставить блок XML") - (xml-tool-insert-scheme-box "Вставить блок Scheme") - (xml-tool-insert-scheme-splice-box "Присоединить блок Scheme") + (xml-tool-insert-scheme-box "Вставить блок Racket") + (xml-tool-insert-scheme-splice-box "Присоединить блок Racket") (xml-tool-xml-box "XML блок") - (xml-tool-scheme-box "Scheme блок") - (xml-tool-scheme-splice-box "Присоединенный блок Scheme") - (xml-tool-switch-to-scheme "Переключиться на блок Scheme") - (xml-tool-switch-to-scheme-splice "Переключиться присоединенный на блок Scheme") + (xml-tool-scheme-box "Racket блок") + (xml-tool-scheme-splice-box "Присоединенный блок Racket") + (xml-tool-switch-to-scheme "Переключиться на блок Racket") + (xml-tool-switch-to-scheme-splice "Переключиться присоединенный на блок Racket") (xml-tool-eliminate-whitespace-in-empty-tags "Убирать пробелы в пустых тегах") (xml-tool-leave-whitespace-alone @@ -1378,7 +1378,7 @@ please adhere to these guidelines: ;;Following two appear in View menu, attach and free test report window from DrRacket frame (test-engine-dock-report "Прикрепить отчет о тестировании") (test-engine-undock-report "Открепить отчет о тестировании") - ;;Following two appear in Scheme (Java, etc) menu, cause Tests to be Run automatically or not + ;;Following two appear in Racket (Java, etc) menu, cause Tests to be Run automatically or not (test-engine-enable-tests "Разрешить тестирование") (test-engine-disable-tests "Запретить тестирование") @@ -1445,7 +1445,7 @@ please adhere to these guidelines: ;; Errors (test-case-empty-error "Пустой тестовый набор") (test-case-too-many-expressions-error "Слишком много выражений в тестовом наборе.") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "Вставить тестовый набор") (test-case-disable-all "Отключить все тестовые наборы") (test-case-enable-all "Включить все тестовые наборы") diff --git a/collects/string-constants/simplified-chinese-string-constants.rkt b/collects/string-constants/simplified-chinese-string-constants.rkt index acd1e1b1ce..d2d57e5ca7 100644 --- a/collects/string-constants/simplified-chinese-string-constants.rkt +++ b/collects/string-constants/simplified-chinese-string-constants.rkt @@ -61,7 +61,7 @@ (web-materials "相关网站") ;; menu item title (tool-web-sites "Tools网站") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "How to Use Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -171,7 +171,7 @@ ;; modes (mode-submenu-label "模式") - (scheme-mode "Scheme模式") + (scheme-mode "Racket模式") (text-mode "文本模式") (scheme-mode-color-symbol "符号") @@ -330,7 +330,7 @@ (prefs-file-locked "存储参数的文件被锁定了(由于文件~a的存在),所以这些参数无法被保存。放弃修改?") (try-again "重试") ;; button label (prefs-file-still-locked "存储参数的文件仍然被锁定(由于文件~a的存在), 所以这些参数将不会被保存。") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "警告") (editor-prefs-panel-label "编辑") (general-prefs-panel-label "常规") @@ -400,7 +400,7 @@ ; warning message when lockfile is around (waiting-for-pref-lock "等待参数设置文件解锁...") (pref-lock-not-gone - "参数设置封锁文件:\n\n ~a\n\n禁止保存参数设置。请确定没有其他PLT软件正在运行中,然后删除该封锁文件。") + "参数设置封锁文件:\n\n ~a\n\n禁止保存参数设置。请确定没有其他Racket软件正在运行中,然后删除该封锁文件。") (still-locked-exit-anyway? "参数无法保存。仍然退出?") ;;; indenting preferences panel @@ -771,7 +771,7 @@ (language-menu-name "语言(&L)") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "运行") (execute-menu-item-help-string "运行定义视窗中的程序") (ask-quit-menu-item-label "中断") @@ -798,12 +798,12 @@ (create-executable-menu-item-label "创建可执行程序...") (create-executable-title "创建可执行程序") (must-save-before-executable "在创建可执行程序之前,你必须保存源程序") - (save-a-mred-launcher "保存为MrEd程序") - (save-a-mzscheme-launcher "保存为MzScheme程序") - (save-a-mred-stand-alone-executable "保存为MrEd可执行程序") - (save-a-mzscheme-stand-alone-executable "保存为MzScheme可执行程序") - (save-a-mred-distribution "保存为MrEd可发布程序") - (save-a-mzscheme-distribution "保存为MzScheme可发布程序") + (save-a-mred-launcher "保存为GRacket程序") + (save-a-mzscheme-launcher "保存为Racket程序") + (save-a-mred-stand-alone-executable "保存为GRacket可执行程序") + (save-a-mzscheme-stand-alone-executable "保存为Racket可执行程序") + (save-a-mred-distribution "保存为GRacket可发布程序") + (save-a-mzscheme-distribution "保存为Racket可发布程序") (definitions-not-saved "当前定义视窗中的程序并没有被保存过。将使用最近保存过的版本来生成可执行程序。是否继续?") ;; The "-explanatory-label" variants are the labels used for the radio buttons in @@ -1017,7 +1017,7 @@ ;;Following two appear in View menu, attach and free test report window from DrRacket frame (test-engine-dock-report "在面板中显示测试报告") (test-engine-undock-report "独立显示测试报告") - ;;Following two appear in Scheme (Java, etc) menu, cause Tests to be Run automatically or not + ;;Following two appear in Racket (Java, etc) menu, cause Tests to be Run automatically or not (test-engine-enable-tests "启用测试功能") (test-engine-disable-tests "停用测试功能") @@ -1064,14 +1064,14 @@ ;;; version checker (version:update-menu-item "检查更新...") (version:update-check "检查更新") ; dialog title, with the next line - (version:connecting-server "连接PLT版本服务器") - (version:results-title "PLT版本检查") - (version:do-periodic-checks "自动定期检查PLT Scheme版本更新") + (version:connecting-server "连接Racket版本服务器") + (version:results-title "Racket版本检查") + (version:do-periodic-checks "自动定期检查Racket版本更新") (version:take-me-there "下载") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "您现在使用的已经是当前版的PLT") + (version:plt-up-to-date "您现在使用的已经是当前版的Racket") (version:but-newer-alpha "但是还有一个更新的alpha版本") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "可以从这里获取:") ;; insert menu @@ -1098,8 +1098,8 @@ (module-browser-show-lib-paths/short "显示lib调用") ;; check box label in show module browser pane in drscheme window. (module-browser-show-planet-paths/short "显示planet调用") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "刷新") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "Module浏览器只能在PLT语言和module语言(并且要求程序中有module)中使用。") +; (module-browser-only-in-plt-and-module-langs +; "Module浏览器只能在PLT语言和module语言(并且要求程序中有module)中使用。") (module-browser-name-length "名称长度") (module-browser-name-short "短") (module-browser-name-medium "中") @@ -1129,13 +1129,13 @@ ;(mrflow-language-primitives-error "Wrong filename for language primitives types table: ~a") (xml-tool-insert-xml-box "插入XML框") - (xml-tool-insert-scheme-box "插入Scheme框") - (xml-tool-insert-scheme-splice-box "插入Scheme接合框") + (xml-tool-insert-scheme-box "插入Racket框") + (xml-tool-insert-scheme-splice-box "插入Racket接合框") (xml-tool-xml-box "XML框") - (xml-tool-scheme-box "Scheme框") - (xml-tool-scheme-splice-box "Scheme接合框") - (xml-tool-switch-to-scheme "转变成Scheme框") - (xml-tool-switch-to-scheme-splice "转变成Scheme接合框") + (xml-tool-scheme-box "Racket框") + (xml-tool-scheme-splice-box "Racket接合框") + (xml-tool-switch-to-scheme "转变成Racket框") + (xml-tool-switch-to-scheme-splice "转变成Racket接合框") (show-recent-items-window-menu-item "在单独视窗中显示最近使用的文件") (show-recent-items-window-label "最近使用的文件") @@ -1169,7 +1169,7 @@ (profj-insert-java-interactions-box "插入Java交互框") ;; The Test Suite Tool - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "插入Test Case") (test-case-disable-all "禁用所有Test Cases") (test-case-enable-all "允许所有Test Cases") diff --git a/collects/string-constants/spanish-string-constants.rkt b/collects/string-constants/spanish-string-constants.rkt index 98cee680ca..f3abdc8b6b 100644 --- a/collects/string-constants/spanish-string-constants.rkt +++ b/collects/string-constants/spanish-string-constants.rkt @@ -42,7 +42,7 @@ (web-materials "Sitios de Web Relacionados") (tool-web-sites "Sitios de Web de Herramientas") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "Cómo Usar Scheme") (teachscheme!-homepage "TeachScheme!") @@ -150,7 +150,7 @@ ;; modes (mode-submenu-label "Modos") - (scheme-mode "Modo Scheme") + (scheme-mode "Modo Racket") (text-mode "Modo Texto") (scheme-mode-color-symbol "Símbolo") @@ -282,7 +282,7 @@ (preferences "Preferencias") (error-saving-preferences "Error al salvar preferencias: ~a") (error-reading-preferences "Error al leer preferencias") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Advertencias") (editor-prefs-panel-label "Editando") (general-prefs-panel-label "General") @@ -342,7 +342,7 @@ ; warning message when lockfile is around (waiting-for-pref-lock "Esperando el archivo candado de las preferencias...") (pref-lock-not-gone - "El archivo candado de las preferencias:\n\n ~a\n\nevita que éstas sean salvadas. Asegúrate que ningún otro software de PLT esté corriendo y borra este archivo.") + "El archivo candado de las preferencias:\n\n ~a\n\nevita que éstas sean salvadas. Asegúrate que ningún otro software de Racket esté corriendo y borra este archivo.") (still-locked-exit-anyway? "Las preferencias no fueron salvadas exitosamente. ¿Salir de cualquier forma?") ;;; indenting preferences panel @@ -658,7 +658,7 @@ (language-menu-name "&Lenguaje") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "Ejecutar") (execute-menu-item-help-string "Reinicia el programa en la ventana de definiciones") (break-menu-item-label "Interrumpir") @@ -679,10 +679,10 @@ (create-executable-menu-item-label "Crear ejecutable...") (create-executable-title "Crear Ejecutable") (must-save-before-executable "Debes salvar tu programa antes de hacer un ejecutable.") - (save-a-mred-launcher "Salvar un lanzador de MrEd") - (save-a-mzscheme-launcher "Salvar un lanzador de MzScheme") - (save-a-mred-stand-alone-executable "Salvar un ejecutable autocontenido de MrEd") - (save-a-mzscheme-stand-alone-executable "Salvar un ejecutable autocontenido de MzScheme") + (save-a-mred-launcher "Salvar un lanzador de GRacket") + (save-a-mzscheme-launcher "Salvar un lanzador de Racket") + (save-a-mred-stand-alone-executable "Salvar un ejecutable autocontenido de GRacket") + (save-a-mzscheme-stand-alone-executable "Salvar un ejecutable autocontenido de Racket") (definitions-not-saved "La ventana de definiciones no ha sido salvada. El ejecutable usará la última versión salvada de la ventana de definiciones. ¿Desea continuar?") (launcher "Lanzador") @@ -920,8 +920,8 @@ (module-browser-show-lib-paths/short "Seguir los requires de bibliotecas (lib)") ;; check box label in show module browser pane in drscheme window. (module-browser-show-planet-paths/short "Seguir los requires de bibliotecas (planet)") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "Refrescar") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "El navegador de módulos está disponible para programas en los lenguajes PLT y en el lenguaje con módulos (y únicamente para programas que incluyan módulos).") +; (module-browser-only-in-plt-and-module-langs +; "El navegador de módulos está disponible para programas en los lenguajes PLT y en el lenguaje con módulos (y únicamente para programas que incluyan módulos).") (module-browser-name-length "Longitud de nombre") (module-browser-name-short "Corto") (module-browser-name-medium "Medio") @@ -955,14 +955,14 @@ (snips-and-arrows-user-action-disallowed "Cambios del usuario no son permitidos en editores que contienen partes insertadas por herramientas. Esconde todas las partes antes de modificar el contenido del editor.") (snips-and-arrows-hide-all-snips-in-editor "Esconder todas las partes en el editor") - (xml-tool-insert-scheme-box "Insertar Caja de Scheme") - (xml-tool-insert-scheme-splice-box "Insertar Caja de Unión de Scheme") + (xml-tool-insert-scheme-box "Insertar Caja de Racket") + (xml-tool-insert-scheme-splice-box "Insertar Caja de Unión de Racket") (xml-tool-insert-xml-box "Insertar Caja de XML") (xml-tool-xml-box "Caja de XML") - (xml-tool-scheme-box "Caja de Scheme") - (xml-tool-scheme-splice-box "Caja de Unión de Scheme") - (xml-tool-switch-to-scheme "Cambiar a caja de Scheme") - (xml-tool-switch-to-scheme-splice "Cambiar a caja de unión de Scheme") + (xml-tool-scheme-box "Caja de Racket") + (xml-tool-scheme-splice-box "Caja de Unión de Racket") + (xml-tool-switch-to-scheme "Cambiar a caja de Racket") + (xml-tool-switch-to-scheme-splice "Cambiar a caja de unión de Racket") (xml-tool-eliminate-whitespace-in-empty-tags "Eliminar blancos en etiquetas vacías") (xml-tool-leave-whitespace-alone "Dejar blancos por la paz") @@ -1034,7 +1034,7 @@ ;; Errors (test-case-empty-error "Caso de prueba vacío") (test-case-too-many-expressions-error "Demasiadas expresiones en el caso de prueba.") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "Insertar Caso de Prueba") (test-case-disable-all "Deshabilitar todos los Casos de Prueba") (test-case-enable-all "Habilitar todos los Casos de Prueba") diff --git a/collects/string-constants/string-constants.scrbl b/collects/string-constants/string-constants.scrbl index 926ad77c29..8a2d41d235 100644 --- a/collects/string-constants/string-constants.scrbl +++ b/collects/string-constants/string-constants.scrbl @@ -1,12 +1,12 @@ #lang scribble/doc @(require scribble/manual (for-label string-constants - scheme)) + racket)) @title{@bold{String Constants}: GUI Internationalization} This library provides the facility for multiple languages in -DrScheme's GUI. +DrRacket's GUI. @; ---------------------------------------------------------------------- @@ -15,12 +15,12 @@ DrScheme's GUI. @defform[(string-constant name)]{ -This form returns the string constant named @scheme[name].} +This form returns the string constant named @racket[name].} @defform[(string-constants name)]{ This form returns a list of string constants, one for each language -that DrScheme's GUI supports.} +that DrRacket's GUI supports.} @defform[(this-language)]{ @@ -29,20 +29,20 @@ This form returns the name of the current language as a symbol.} @defform[(all-languages)]{ This form returns a list of symbols (in the same order as those -returned from @scheme[string-constants]) naming each language.} +returned from @racket[string-constants]) naming each language.} @defproc[(set-language-pref [lang string?]) void?]{ -Sets the language for the next run of DrScheme to @scheme[lang], which -must be a symbol returned from @scheme[all-languages]. Does not affect the -running DrScheme.} +Sets the language for the next run of DrRacket to @racket[lang], which +must be a symbol returned from @racket[all-languages]. Does not affect the +running DrRacket.} @; ---------------------------------------------------------------------- @section{Adding String Constants} @defmodule[string-constants/string-constant-lang] -To add string constants to DrScheme, see the files: +To add string constants to DrRacket, see the files: @itemize[ @item{@filepath{english-string-constants.ss}} @@ -53,7 +53,7 @@ To add string constants to DrScheme, see the files: @item{@filepath{italian-string-constants.ss}}] Each file has the same format. They are each modules in the -@schememodname[string-constants/string-constant-lang] language. The +@racketmodname[string-constants/string-constant-lang] language. The body of each module is a finite mapping table that gives the mapping from the symbolic name of a string constant to its translation in the appropriate language. @@ -72,15 +72,15 @@ the context of the strings whose symbol name might not be clear. @item{@indexed-envvar{PLTSTRINGCONSTANTS}} @item{@indexed-envvar{STRINGCONSTANTS}}] -If either of these environment variables are set, DrScheme +If either of these environment variables are set, DrRacket shows you, during startup, which string constants are not yet defined for each language. You can also specify which languages you are interested in. If either environment variable is bound to a symbol (as -interpreted by @scheme[read]) you see only the corresponding +interpreted by @racket[read]) you see only the corresponding language's messages. If either one is bound to a list of -symbols (again, as interpreted by @scheme[read]) you see the +symbols (again, as interpreted by @racket[read]) you see the messages for all the languages in the list. If either is bound to anything else, you see all of the languages. diff --git a/collects/string-constants/traditional-chinese-string-constants.rkt b/collects/string-constants/traditional-chinese-string-constants.rkt index 8a789f80dc..9e3c3564df 100644 --- a/collects/string-constants/traditional-chinese-string-constants.rkt +++ b/collects/string-constants/traditional-chinese-string-constants.rkt @@ -60,7 +60,7 @@ (web-materials "相关网站") ;; menu item title (tool-web-sites "Tools网站") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "How to Use Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -170,7 +170,7 @@ ;; modes (mode-submenu-label "模式") - (scheme-mode "Scheme模式") + (scheme-mode "Racket模式") (text-mode "文本模式") (scheme-mode-color-symbol "符号") @@ -329,7 +329,7 @@ (prefs-file-locked "存储参数的文件被锁定了(由于文件~a的存在),所以这些参数无法被保存。放弃修改?") (try-again "重试") ;; button label (prefs-file-still-locked "存储参数的文件仍然被锁定(由于文件~a的存在), 所以这些参数将不会被保存。") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "警告") (editor-prefs-panel-label "编辑") (general-prefs-panel-label "常规") @@ -399,7 +399,7 @@ ; warning message when lockfile is around (waiting-for-pref-lock "等待参数设置文件解锁...") (pref-lock-not-gone - "参数设置封锁文件:\n\n ~a\n\n禁止保存参数设置。请确定没有其他PLT软件正在运行中,然后删除该封锁文件。") + "参数设置封锁文件:\n\n ~a\n\n禁止保存参数设置。请确定没有其他Racket软件正在运行中,然后删除该封锁文件。") (still-locked-exit-anyway? "参数无法保存。仍然退出?") ;;; indenting preferences panel @@ -770,7 +770,7 @@ (language-menu-name "语言(&L)") ;;; scheme-menu - (scheme-menu-name "S&cheme") + (scheme-menu-name "Ra&cket") (execute-menu-item-label "运行") (execute-menu-item-help-string "运行定义视窗中的程序") (ask-quit-menu-item-label "中断") @@ -797,12 +797,12 @@ (create-executable-menu-item-label "创建可执行程序...") (create-executable-title "创建可执行程序") (must-save-before-executable "在创建可执行程序之前,你必须保存源程序") - (save-a-mred-launcher "保存为MrEd程序") - (save-a-mzscheme-launcher "保存为MzScheme程序") - (save-a-mred-stand-alone-executable "保存为MrEd可执行程序") - (save-a-mzscheme-stand-alone-executable "保存为MzScheme可执行程序") - (save-a-mred-distribution "保存为MrEd可发布程序") - (save-a-mzscheme-distribution "保存为MzScheme可发布程序") + (save-a-mred-launcher "保存为GRacket程序") + (save-a-mzscheme-launcher "保存为Racket程序") + (save-a-mred-stand-alone-executable "保存为GRacket可执行程序") + (save-a-mzscheme-stand-alone-executable "保存为Racket可执行程序") + (save-a-mred-distribution "保存为GRacket可发布程序") + (save-a-mzscheme-distribution "保存为Racket可发布程序") (definitions-not-saved "当前定义视窗中的程序并没有被保存过。将使用最近保存过的版本来生成可执行程序。是否继续?") ;; The "-explanatory-label" variants are the labels used for the radio buttons in @@ -1014,7 +1014,7 @@ ;;Following two appear in View menu, attach and free test report window from DrRacket frame (test-engine-dock-report "在面板中显示测试报告") (test-engine-undock-report "独立显示测试报告") - ;;Following two appear in Scheme (Java, etc) menu, cause Tests to be Run automatically or not + ;;Following two appear in Racket (Java, etc) menu, cause Tests to be Run automatically or not (test-engine-enable-tests "启用测试功能") (test-engine-disable-tests "停用测试功能") @@ -1061,14 +1061,14 @@ ;;; version checker (version:update-menu-item "检查更新...") (version:update-check "检查更新") ; dialog title, with the next line - (version:connecting-server "连接PLT版本服务器") - (version:results-title "PLT版本检查") - (version:do-periodic-checks "自动定期检查PLT Scheme版本更新") + (version:connecting-server "连接Racket版本服务器") + (version:results-title "Racket版本检查") + (version:do-periodic-checks "自动定期检查Racket版本更新") (version:take-me-there "下载") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "您现在使用的已经是当前版的PLT") + (version:plt-up-to-date "您现在使用的已经是当前版的Racket") (version:but-newer-alpha "但是还有一个更新的alpha版本") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "可以从这里获取:") ;; insert menu @@ -1095,8 +1095,8 @@ (module-browser-show-lib-paths/short "显示lib调用") ;; check box label in show module browser pane in drscheme window. (module-browser-show-planet-paths/short "显示planet调用") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "刷新") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "Module浏览器只能在PLT语言和module语言(并且要求程序中有module)中使用。") +; (module-browser-only-in-plt-and-module-langs +; "Module浏览器只能在PLT语言和module语言(并且要求程序中有module)中使用。") (module-browser-name-length "名称长度") (module-browser-name-short "短") (module-browser-name-medium "中") @@ -1126,13 +1126,13 @@ ;(mrflow-language-primitives-error "Wrong filename for language primitives types table: ~a") (xml-tool-insert-xml-box "插入XML框") - (xml-tool-insert-scheme-box "插入Scheme框") - (xml-tool-insert-scheme-splice-box "插入Scheme接合框") + (xml-tool-insert-scheme-box "插入Racket框") + (xml-tool-insert-scheme-splice-box "插入Racket接合框") (xml-tool-xml-box "XML框") - (xml-tool-scheme-box "Scheme框") - (xml-tool-scheme-splice-box "Scheme接合框") - (xml-tool-switch-to-scheme "转变成Scheme框") - (xml-tool-switch-to-scheme-splice "转变成Scheme接合框") + (xml-tool-scheme-box "Racket框") + (xml-tool-scheme-splice-box "Racket接合框") + (xml-tool-switch-to-scheme "转变成Racket框") + (xml-tool-switch-to-scheme-splice "转变成Racket接合框") (show-recent-items-window-menu-item "在单独视窗中显示最近使用的文件") (show-recent-items-window-label "最近使用的文件") @@ -1166,7 +1166,7 @@ (profj-insert-java-interactions-box "插入Java交互框") ;; The Test Suite Tool - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "插入Test Case") (test-case-disable-all "禁用所有Test Cases") (test-case-enable-all "允许所有Test Cases") diff --git a/collects/string-constants/ukrainian-string-constants.rkt b/collects/string-constants/ukrainian-string-constants.rkt index f18da6979f..fe650ccc56 100644 --- a/collects/string-constants/ukrainian-string-constants.rkt +++ b/collects/string-constants/ukrainian-string-constants.rkt @@ -134,7 +134,7 @@ please adhere to these guidelines: (web-materials "Пов'язані Web-сайти") ;; menu item title (tool-web-sites "Web-сайти встановлених інструментів") ;; menu item title (drscheme-homepage "DrRacket") - (plt-homepage "PLT") + (plt-homepage "Racket") (how-to-use-scheme "Як використовувати Scheme") ;; title of a book. (teachscheme!-homepage "TeachScheme!") ;; probably this should be a `word' in all languages @@ -254,7 +254,7 @@ please adhere to these guidelines: ;; modes (mode-submenu-label "Режими") - (scheme-mode "Режим Scheme") + (scheme-mode "Режим Racket") (text-mode "Режим тексту") (scheme-mode-color-symbol "Символ") @@ -413,7 +413,7 @@ please adhere to these guidelines: (prefs-file-locked "Файл налаштувань користувача заблоковано (оскільки файл ~a існує), тому змінені налаштування не будуть збережені. Скасувати зміни?") (try-again "Спробувати знову") ;; button label (prefs-file-still-locked "Файл налаштувань користувача все ще заблоковано (оскільки файл ~a існує), тому змінені налаштування не будуть збережені..") - (scheme-prefs-panel-label "Scheme") + (scheme-prefs-panel-label "Racket") (warnings-prefs-panel-label "Попередження") (editor-prefs-panel-label "Редагування") (general-prefs-panel-label "Загальне") @@ -483,7 +483,7 @@ please adhere to these guidelines: ; warning message when lockfile is around (waiting-for-pref-lock "Очікування завершення блокування налаштувань користувача...") (pref-lock-not-gone - "Файл блокування налаштувань користувача: \n\n ~a\n\nне дозволяє зберегти зміни налаштувань. Переконайтесь у відсутності працюючого програмного забезпечення PLT та видаліть цей файл.") + "Файл блокування налаштувань користувача: \n\n ~a\n\nне дозволяє зберегти зміни налаштувань. Переконайтесь у відсутності працюючого програмного забезпечення Racket та видаліть цей файл.") (still-locked-exit-anyway? "Налаштування не збережені. Все одно вийти?") ;;; indenting preferences panel @@ -868,7 +868,7 @@ please adhere to these guidelines: (language-menu-name "&Мова") ;;; scheme-menu - (scheme-menu-name "&Scheme") + (scheme-menu-name "&Racket") (execute-menu-item-label "Виконати") (execute-menu-item-help-string "Перезапустити програму в вікні визначень") (ask-quit-menu-item-label "Перервати програму") @@ -1157,14 +1157,14 @@ please adhere to these guidelines: ;;; version checker (version:update-menu-item "Перевірка оновлень...") (version:update-check "Перевірка оновлень") ; dialog title, with the next line - (version:connecting-server "З'єднання з сервером версії PLT") - (version:results-title "Перевірка версії PLT") - (version:do-periodic-checks "Періодично перевіряти новіші версії PLT Scheme") + (version:connecting-server "З'єднання з сервером версії Racket") + (version:results-title "Перевірка версії Racket") + (version:do-periodic-checks "Періодично перевіряти новіші версії Racket") (version:take-me-there "Оновити") ; ...to the download website ;; the next one can appear alone, or followed by a comma and the one after that - (version:plt-up-to-date "У Вас найновіша версія PLT") + (version:plt-up-to-date "У Вас найновіша версія Racket") (version:but-newer-alpha "однак зауважте, що є новіша альфа-версія") - ;; This is used in this context: "PLT Scheme vNNN <<<*>>> http://download..." + ;; This is used in this context: "Racket vNNN <<<*>>> http://download..." (version:now-available-at "тепер є в") ;; insert menu @@ -1191,8 +1191,8 @@ please adhere to these guidelines: (module-browser-show-lib-paths/short "Показувати шляхи до бібліотек") ;; check box label in show module browser pane in drscheme window. (module-browser-show-planet-paths/short "Показувати шляхи до planet") ;; check box label in show module browser pane in drscheme window. (module-browser-refresh "Оновити") ;; button label in show module browser pane in drscheme window. - (module-browser-only-in-plt-and-module-langs - "Браузер модуля доступний лише для програм на PLT-мовах і на мові модуля (і лише для програм, які містять модулі).") +; (module-browser-only-in-plt-and-module-langs +; "Браузер модуля доступний лише для програм на PLT-мовах і на мові модуля (і лише для програм, які містять модулі).") (module-browser-name-length "Довжина імені") (module-browser-name-short "Коротка") (module-browser-name-medium "Середня") @@ -1231,13 +1231,13 @@ please adhere to these guidelines: (snips-and-arrows-hide-all-snips-in-editor "Сховати всі інструменти, що вставлені в редактор") (xml-tool-insert-xml-box "Вставити блок XML") - (xml-tool-insert-scheme-box "Вставити блок Scheme") - (xml-tool-insert-scheme-splice-box "Приєднати блок Scheme") + (xml-tool-insert-scheme-box "Вставити блок Racket") + (xml-tool-insert-scheme-splice-box "Приєднати блок Racket") (xml-tool-xml-box "XML блок") - (xml-tool-scheme-box "Scheme блок") - (xml-tool-scheme-splice-box "Приєднаний блок Scheme") - (xml-tool-switch-to-scheme "Перемкнутися на блок Scheme") - (xml-tool-switch-to-scheme-splice "Перемкнутися на приєднаний блок Scheme") + (xml-tool-scheme-box "Racket блок") + (xml-tool-scheme-splice-box "Приєднаний блок Racket") + (xml-tool-switch-to-scheme "Перемкнутися на блок Racket") + (xml-tool-switch-to-scheme-splice "Перемкнутися на приєднаний блок Racket") (xml-tool-eliminate-whitespace-in-empty-tags "Видаляти пробіли в пустих тегах") (xml-tool-leave-whitespace-alone @@ -1378,7 +1378,7 @@ please adhere to these guidelines: ;;Following two appear in View menu, attach and free test report window from DrRacket frame (test-engine-dock-report "Прикріпити звіт про тестування") (test-engine-undock-report "Відкріпити звіт про тестування") - ;;Following two appear in Scheme (Java, etc) menu, cause Tests to be Run automatically or not + ;;Following two appear in Racket (Java, etc) menu, cause Tests to be Run automatically or not (test-engine-enable-tests "Дозволити тестування") (test-engine-disable-tests "Заборонити тестування") @@ -1445,7 +1445,7 @@ please adhere to these guidelines: ;; Errors (test-case-empty-error "Пустий набір тестів") (test-case-too-many-expressions-error "Забагато виразів у наборі тестів.") - ;; Dr. Scheme window menu items + ;; DrRacket window menu items (test-case-insert "Вставити набір тестів") (test-case-disable-all "Відключити всі набори тестів") (test-case-enable-all "Ввімкнути всі набори тестів") diff --git a/collects/swindle/swindle.scrbl b/collects/swindle/swindle.scrbl index fb6a80805b..b0be705c85 100644 --- a/collects/swindle/swindle.scrbl +++ b/collects/swindle/swindle.scrbl @@ -5,7 +5,7 @@ @defmodulelang[swindle] -Swindle extends PLT Scheme with many additional features. The main +Swindle extends Racket with many additional features. The main feature that started this project is a CLOS-like object system based on Tiny-CLOS from Xerox, but there is a lot more. @@ -32,7 +32,7 @@ only a subset of the system is needed. simple ones like @scheme[inc!], and @scheme[push!]. (Available separately using @scheme[swindle/setf], where the names @scheme[setf!] and @scheme[psetf!] are used to avoid changing the - Scheme form)} + Racket form)} @item{Easy macro-defining macros --- simple @scheme[syntax-rules] macros with @scheme[defsubst], and a generic @scheme[defmacro] utility, all with a local @@ -57,7 +57,7 @@ only a subset of the system is needed. stand-alone methods, method-combination, and some MOP extensions. (Available without syntax bindings in @scheme[swindle/tiny-clos])} -@item{Good integration with the Scheme implementation: primitive +@item{Good integration with the Racket implementation: primitive values have corresponding Swindle classes, and struct types can also be used as type specializers. A Swindle class will be made when needed, and it will reflect the struct hierarchy. In addition, @@ -81,7 +81,7 @@ only a subset of the system is needed. @item{A language that can easily create HTML, where the result is human-editable. (@scheme[swindle/html])} -@item{Customizable syntax: easy to add customized languages to DrScheme. +@item{Customizable syntax: easy to add customized languages to DrRacket. (@scheme[custom])} ] @@ -133,8 +133,8 @@ whole Swindle environment. Compilation definitions.} @item{@scheme[swindle/tool] (module) --- - Setup for Swindle in DrScheme: makes some languages available in - DrScheme, including custom Swindle-based languages.} + Setup for Swindle in DrRacket: makes some languages available in + DrRacket, including custom Swindle-based languages.} @item{@scheme[swindle/custom] (module) --- A sample file that demonstrates how to create a Swindle-based diff --git a/collects/syntax/scribblings/kerncase.scrbl b/collects/syntax/scribblings/kerncase.scrbl index 196ac1a067..9401d894d6 100644 --- a/collects/syntax/scribblings/kerncase.scrbl +++ b/collects/syntax/scribblings/kerncase.scrbl @@ -17,7 +17,7 @@ @defform[(kernel-syntax-case stx-expr trans?-expr clause ...)]{ A syntactic form like @scheme[syntax-case*], except that the literals -are built-in as the names of the primitive PLT Scheme forms as +are built-in as the names of the primitive Racket forms as exported by @schememodname[scheme/base]; see @secref[#:doc refman "fully-expanded"]. @@ -37,7 +37,7 @@ is @scheme[mzscheme], since the binding of @mzscheme-if from A syntactic form like @scheme[kernel-syntax-case], except that it takes an additional list of extra literals that are in addition to the -primitive PLT Scheme forms.} +primitive Racket forms.} @defform[(kernel-syntax-case/phase stx-expr phase-expr clause ...)]{ @@ -56,8 +56,8 @@ level, as indicated by @scheme[phase-expr].} @defproc[(kernel-form-identifier-list) (listof identifier?)]{ Returns a list of identifiers that are bound normally, -@scheme[for-syntax], and @scheme[for-template] to the primitive PLT -Scheme forms for expressions, internal-definition positions, and +@scheme[for-syntax], and @scheme[for-template] to the primitive +Racket forms for expressions, internal-definition positions, and module-level and top-level positions. This function is useful for generating a list of stopping points to provide to @scheme[local-expand]. diff --git a/collects/syntax/scribblings/modread.scrbl b/collects/syntax/scribblings/modread.scrbl index f2c338eabf..ed96d290e5 100644 --- a/collects/syntax/scribblings/modread.scrbl +++ b/collects/syntax/scribblings/modread.scrbl @@ -18,7 +18,7 @@ values.} Inspects @scheme[stx] to check whether evaluating it will declare a module named @scheme[expected-module-sym]---at least if @scheme[module] is bound -in the top-level to MzScheme's @scheme[module]. The syntax object @scheme[stx] can +in the top-level to Racket's @scheme[module]. The syntax object @scheme[stx] can contain a compiled expression. Also, @scheme[stx] can be an end-of-file, on the grounds that @scheme[read-syntax] can produce an end-of-file. diff --git a/collects/syntax/scribblings/module-reader.scrbl b/collects/syntax/scribblings/module-reader.scrbl index c7fcf96ff4..02a774e99e 100644 --- a/collects/syntax/scribblings/module-reader.scrbl +++ b/collects/syntax/scribblings/module-reader.scrbl @@ -151,7 +151,7 @@ identifiers used by the @scheme[reader-option]s. @item{@scheme[#:info] specifies an implementation of reflective information that is used by external tools to manipulate the @emph{source} of modules in the language @scheme[_something]. For - example, DrScheme uses information from @scheme[#:info] to + example, DrRacket uses information from @scheme[#:info] to determine the style of syntax coloring that it should use for editing a module's source. @@ -178,7 +178,7 @@ identifiers used by the @scheme[reader-option]s. key, for which it returns @scheme[language-module]; it returns the given default value for any other key. - In the case of the DrScheme syntax-coloring example, DrScheme + In the case of the DrRacket syntax-coloring example, DrRacket supplies @scheme['color-lexer] as the symbol argument, and it supplies @scheme[#f] as the default. The default-filtering argument (i.e., the third argument to the @scheme[#:info] @@ -189,7 +189,7 @@ identifiers used by the @scheme[reader-option]s. reflective information that is used by external tools to manipulate the module in the language @scheme[_something] in its @emph{expanded}, @emph{compiled} or @emph{declared} form - (as opposed to source). For example, when MzScheme starts a + (as opposed to source). For example, when Racket starts a program, it uses information attached to the main module to initialize the run-time environment. @@ -219,8 +219,8 @@ identifiers used by the @scheme[reader-option]s. @scheme[language-data] are bound, the same as for @scheme[#:info]. - In the case of the MzScheme run-time configuration example, - MzScheme uses the @scheme[#:language-info] vector to obtain a + In the case of the Racket run-time configuration example, + Racket uses the @scheme[#:language-info] vector to obtain a function, and then it passes @scheme['configure-runtime] to the function to obtain information about configuring the runtime environment. See also @secref[#:doc refman "configure-runtime"].} diff --git a/collects/syntax/scribblings/stx.scrbl b/collects/syntax/scribblings/stx.scrbl index 537e27d9e6..84f759a85e 100644 --- a/collects/syntax/scribblings/stx.scrbl +++ b/collects/syntax/scribblings/stx.scrbl @@ -47,9 +47,9 @@ the same name (as extracted by @scheme[syntax-e]) and @scheme[a-id] has no binding other than at the top level. This procedure is useful in conjunction with @scheme[syntax-case*] to -match procedure names that are normally bound by MzScheme. For +match procedure names that are normally bound by Racket. For example, the @scheme[include] macro uses this procedure to recognize @scheme[build-path]; using @scheme[free-identifier=?] would not work well outside of @scheme[module], since the top-level -@scheme[build-path] is a distinct variable from the MzScheme export +@scheme[build-path] is a distinct variable from the @schememodname[racket/base] export (though it's bound to the same procedure, initially).} diff --git a/collects/test-engine/test-engine.scrbl b/collects/test-engine/test-engine.scrbl index b9de23e2d9..f11efda91b 100644 --- a/collects/test-engine/test-engine.scrbl +++ b/collects/test-engine/test-engine.scrbl @@ -16,7 +16,7 @@ @defmodule[test-engine/scheme-tests] -This module provides test forms for use in Scheme programs, as well +This module provides test forms for use in Racket programs, as well as parameters to configure the behavior of test reports. Each check form may only occur at the top-level; results are collected 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/tests/racket/mz-tests.rktl b/collects/tests/racket/mz-tests.rktl index dc88c7b3fb..90a7fc0f6e 100644 --- a/collects/tests/racket/mz-tests.rktl +++ b/collects/tests/racket/mz-tests.rktl @@ -5,6 +5,7 @@ (load-relative "unicode.rktl") (load-relative "rx.rktl") (load-relative "read.rktl") +(load-relative "print.rktl") (load-relative "macro.rktl") (load-relative "syntax.rktl") (load-relative "procs.rktl") diff --git a/collects/tests/racket/pretty.rktl b/collects/tests/racket/pretty.rktl index 40f68d31df..2d772cd6d8 100644 --- a/collects/tests/racket/pretty.rktl +++ b/collects/tests/racket/pretty.rktl @@ -14,7 +14,7 @@ (require mzlib/pretty) -(print-as-quasiquote #f) +(print-as-expression #f) (define (pprec-print pprec port write?) (define (print-one n port) @@ -325,6 +325,6 @@ (test #t 'use-regression? use-regression?) -(print-as-quasiquote #t) +(print-as-expression #t) (report-errs) diff --git a/collects/tests/racket/print.rktl b/collects/tests/racket/print.rktl new file mode 100644 index 0000000000..f3d525c1d4 --- /dev/null +++ b/collects/tests/racket/print.rktl @@ -0,0 +1,167 @@ + +;; Test printing in as-expression mode + +(load-relative "loadtest.rktl") + +(Section 'printing) + +(let ([ptest (lambda (s v) + (define (to-string v) + (format "~v" v)) + (define (to-pretty-string v) + (pretty-format v)) + (test (regexp-replace* #rx"\n *" s " ") to-string v) + (test s to-pretty-string v))]) + (define-struct a (x y)) + (define-struct b (x y) #:transparent) + (define-struct c (x y) #:prefab) + (define (custom-printer get-xy) + (lambda (v port mode) + (define-values (d-x d-y) (get-xy)) + (define (recur v) + (case mode + [(#f) (display v port)] + [(#t) (write v port)] + [else (print v port mode)])) + (write-char #\< port) + (write mode port) + (write-char #\space port) + (recur (d-x v)) + (write-char #\space port) + (recur (d-y v)) + (write-char #\> port))) + (define-struct d (x y) + #:property prop:custom-write (custom-printer (lambda () (values d-x d-y)))) + (define-struct e (x y) + #:property prop:custom-write (custom-printer (lambda () (values e-x e-y))) + #:property prop:custom-print-as-constructor #t) + + (ptest "1" 1) + (ptest "1/2" 1/2) + (ptest "#f" #f) + (ptest "#\\x" #\x) + (ptest "'apple" 'apple) + (ptest "'|apple banana|" '|apple banana|) + (ptest "'#:apple" '#:apple) + (ptest "\"apple\"" "apple") + (ptest "#\"apple\"" #"apple") + (ptest "#rx\"apple\"" #rx"apple") + (ptest "#rx#\"apple\"" #rx#"apple") + (ptest "'()" '()) + (ptest "#" add1) + + (ptest "'#&1" (box 1)) + (ptest "'(1 . 2)" (cons 1 2)) + (ptest "'(1 2)" (list 1 2)) + (ptest "'(1 2 . 3)" (list* 1 2 3)) + (ptest "'#(1 2 3)" (vector 1 2 3)) + + (ptest "'#hash((1 . 2))" (hash 1 2)) + (ptest "'#hash((1 . 2))" (make-hash (list (cons 1 2)))) + (ptest "'#hasheq((1 . 2))" (hasheq 1 2)) + (ptest "'#hasheq((1 . 2))" (make-hasheq (list (cons 1 2)))) + (ptest "'#hasheqv((1 . 2))" (hasheqv 1 2)) + (ptest "'#hasheqv((1 . 2))" (make-hasheqv (list (cons 1 2)))) + + (ptest "(mcons 1 2)" (mcons 1 2)) + + (ptest "#" (a 1 2)) + (ptest "(b 1 2)" (b 1 2)) + (ptest "'#s(c 1 2)" (c 1 2)) + + (ptest "'<1 1 2>" (d 1 2)) + (ptest "'<1 1 #>" (d 1 (a 1 2))) + (ptest "<0 1 (b 1 2)>" (d 1 (b 1 2))) + + (ptest "'#&#" (box (a 1 2))) + (ptest "(box (b 1 2))" (box (b 1 2))) + (ptest "'#&#s(c 1 2)" (box (c 1 2))) + + (ptest "'(#)" (list (a 1 2))) + (ptest "(list (b 1 2))" (list (b 1 2))) + (ptest "'(#s(c 1 2))" (list (c 1 2))) + (ptest "'(<1 1 2>)" (list (d 1 2))) + (ptest "(list <0 1 2>)" (list (e 1 2))) + + (ptest "'(0 . #)" (cons 0 (a 1 2))) + (ptest "(cons 0 (b 1 2))" (cons 0 (b 1 2))) + (ptest "'(0 . #s(c 1 2))" (cons 0 (c 1 2))) + + (ptest "'#(#)" (vector (a 1 2))) + (ptest "(vector (b 1 2))" (vector (b 1 2))) + (ptest "'#(#s(c 1 2))" (vector (c 1 2))) + + (ptest "'#hash((0 . #))" (hash 0 (a 1 2))) + (ptest "(hash 0 (b 1 2))" (hash 0 (b 1 2))) + (ptest "'#hash((0 . #s(c 1 2)))" (hash 0 (c 1 2))) + + (ptest "(mcons 0 #)" (mcons 0 (a 1 2))) + (ptest "(mcons 0 (b 1 2))" (mcons 0 (b 1 2))) + (ptest "(mcons 0 '#s(c 1 2))" (mcons 0 (c 1 2))) + + (ptest "(list '(1 2) # (b 1 2))" (list '(1 2) (a 1 2) (b 1 2))) + (ptest "(list* '(1 2) # (b 1 2))" (list* '(1 2) (a 1 2) (b 1 2))) + (ptest "(vector '(1 2) # (b 1 2))" (vector '(1 2) (a 1 2) (b 1 2))) + (ptest "(hash '(1 2) (b 1 2))" (hash '(1 2) (b 1 2))) + + (ptest "'(#)" (list add1)) + (ptest "'#(#)" (vector add1)) + + (ptest "#0='(#0#)" (read (open-input-string "#0=(#0#)"))) + (ptest "#0='(#0# #0#)" (read (open-input-string "#0=(#0# #0#)"))) + (ptest "#0='(#0# . #0#)" (read (open-input-string "#0=(#0# . #0#)"))) + (ptest "#0='(#0# #0# . #0#)" (read (open-input-string "#0=(#0# #0# . #0#)"))) + (ptest "#0='#(#0# #0#)" (read (open-input-string "#0=#(#0# #0#)"))) + (ptest "#0='#�#" (read (open-input-string "#0=#�#"))) + (ptest "#0=(list (b 1 2) #0#)" (let ([v (make-placeholder #f)]) + (placeholder-set! v (list (b 1 2) v)) + (make-reader-graph v))) + (ptest "#0=(list* (b 1 2) 8 #0#)" (let ([v (make-placeholder #f)]) + (placeholder-set! v (list* (b 1 2) 8 v)) + (make-reader-graph v))) + (ptest "#0=(cons (b 1 2) #0#)" (let ([v (make-placeholder #f)]) + (placeholder-set! v (cons (b 1 2) v)) + (make-reader-graph v))) + (ptest "#0=(vector (b 1 2) #0#)" (let ([v (make-placeholder #f)]) + (placeholder-set! v (vector (b 1 2) v)) + (make-reader-graph v))) + (ptest "#0='#s(c 1 #0#)" (let ([v (make-placeholder #f)]) + (placeholder-set! v (c 1 v)) + (make-reader-graph v))) + (ptest "#0=(c (b 1 2) #0#)" (let ([v (make-placeholder #f)]) + (placeholder-set! v (c (b 1 2) v)) + (make-reader-graph v))) + + (ptest "'(apple\n \"0000000000000000000000000000000000000000000000000000000000000000000000\")" + (list 'apple (make-string 70 #\0))) + (ptest "'#(apple\n \"0000000000000000000000000000000000000000000000000000000000000000000000\")" + (vector 'apple (make-string 70 #\0))) + (ptest "'(apple\n .\n \"0000000000000000000000000000000000000000000000000000000000000000000000\")" + (cons 'apple (make-string 70 #\0))) + (ptest "'#hash((apple\n .\n \"0000000000000000000000000000000000000000000000000000000000000000000000\"))" + (hash 'apple (make-string 70 #\0))) + + (ptest "(list\n (b 1 2)\n \"00000000000000000000000000000000000000000000000000000000000000000\")" + (list (b 1 2) (make-string 65 #\0))) + (ptest "(cons\n (b 1 2)\n \"00000000000000000000000000000000000000000000000000000000000000000\")" + (cons (b 1 2) (make-string 65 #\0))) + (ptest "(vector\n (b 1 2)\n \"00000000000000000000000000000000000000000000000000000000000000000\")" + (vector (b 1 2) (make-string 65 #\0))) + (ptest "(mcons\n (b 1 2)\n \"00000000000000000000000000000000000000000000000000000000000000000\")" + (mcons (b 1 2) (make-string 65 #\0))) + (ptest "(hash\n (b 1 2)\n \"00000000000000000000000000000000000000000000000000000000000000000\")" + (hash (b 1 2) (make-string 65 #\0))) + (ptest "(box\n (b 1 \"00000000000000000000000000000000000000000000000000000000000000000000\"))" + (box (b 1 (make-string 68 #\0)))) + + (ptest "#0='(#0#\n \"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\"\n #0#)" + (read (open-input-string "#0=(#0# \"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\" #0#)"))) + + (ptest "''a" ''a) + (ptest "'`a" '`a) + (ptest "'`,#,#`a" '`,#,#`a) + (ptest "'`,#,#`,@#,@a" '`,#,#`,@#,@a) + + (void)) + +(report-errs) diff --git a/collects/tests/racket/struct.rktl b/collects/tests/racket/struct.rktl index 06ea1e0f48..df47bf79f0 100644 --- a/collects/tests/racket/struct.rktl +++ b/collects/tests/racket/struct.rktl @@ -840,13 +840,13 @@ (let ([t (make-tuple (list (box 1) 2 "a"))]) (set-box! (car (tuple-ref t 0)) t) (write t)))) - (test "ack: here: <10, 2, \"a\">" with-output-string + (test "ack: here: '<10, 2, \"a\">" with-output-string (lambda () (with-handlers ([exn:fail? (lambda (exn) (printf "~a" (exn-message exn)))]) (error 'ack "here: ~e" (make-tuple (list 10 2 "a")))))) - (test "ack: here: <100000..." with-output-string + (test "ack: here: '<10000..." with-output-string (lambda () (parameterize ([error-print-width 10]) (with-handlers ([exn:fail? (lambda (exn) diff --git a/collects/tests/racket/syntax.rktl b/collects/tests/racket/syntax.rktl index b6bb1c231f..4e187177d4 100644 --- a/collects/tests/racket/syntax.rktl +++ b/collects/tests/racket/syntax.rktl @@ -1103,7 +1103,7 @@ (test 3 'non-top (parameterize ([current-namespace ns]) (eval '(+ 1 2)))) - (test '`(+ 1 2) 'repl-top + (test ''(+ 1 2) 'repl-top (let ([s (open-output-bytes)]) (parameterize ([current-input-port (open-input-string "(+ 1 2)")] [current-namespace ns] diff --git a/collects/tests/racunit/text-ui-test.rkt b/collects/tests/racunit/text-ui-test.rkt index 11ed11fd4d..11ee469ef9 100644 --- a/collects/tests/racunit/text-ui-test.rkt +++ b/collects/tests/racunit/text-ui-test.rkt @@ -119,7 +119,7 @@ (with-all-output-to-string (failing-binary-test/complex-params)))]) (check string-contains op - "`((0 1 2 3 4 5 6 7 8 9 10 11 12 13 14) + "'((0 1 2 3 4 5 6 7 8 9 10 11 12 13 14) (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14) (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14))"))) @@ -129,7 +129,7 @@ (with-all-output-to-string (failing-test/complex-params)))]) (check string-contains op - "`((0 1 2 3 4 5 6 7 8 9 10 11 12 13 14) + "'((0 1 2 3 4 5 6 7 8 9 10 11 12 13 14) (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14) (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14))"))) diff --git a/collects/trace/scribblings/trace.scrbl b/collects/trace/scribblings/trace.scrbl index 1822739078..14e1103972 100644 --- a/collects/trace/scribblings/trace.scrbl +++ b/collects/trace/scribblings/trace.scrbl @@ -18,8 +18,8 @@ depth of the continuation. @item{Throw away @filepath{.zo} versions of your source} @item{Prefix your program with @schemeblock[(require trace)] - perhaps by starting @exec{mzscheme} with - @commandline{mzscheme -l trace ...} + perhaps by starting @exec{racket} with + @commandline{racket -l trace ...} before arguments to load your program.} @item{Run your program} ] @@ -40,7 +40,7 @@ parameter. @defmodule[trace]{Invoking the @schememodname[trace] module sets the evaluation handler -(via @scheme[current-eval]) to instrument Scheme source code.} +(via @scheme[current-eval]) to instrument Racket source code.} NOTE: @schememodname[trace] has no effect on code loaded as compiled byte code (i.e., from a @filepath{.zo} file) or native code diff --git a/collects/typed-scheme/scribblings/begin.scrbl b/collects/typed-scheme/scribblings/begin.scrbl index 053b91d2ae..697c10561b 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.rkt" (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 b37d045c95..9a6123f409 100644 --- a/collects/typed-scheme/scribblings/more.scrbl +++ b/collects/typed-scheme/scribblings/more.scrbl @@ -2,109 +2,109 @@ @begin[(require "utils.rkt" 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. diff --git a/collects/typed-scheme/scribblings/quick.scrbl b/collects/typed-scheme/scribblings/quick.scrbl index 46cc16097e..f65dee19f0 100644 --- a/collects/typed-scheme/scribblings/quick.scrbl +++ b/collects/typed-scheme/scribblings/quick.scrbl @@ -1,18 +1,18 @@ #lang scribble/manual -@(require "utils.rkt" (for-label (only-meta-in 0 typed/scheme))) +@(require "utils.rkt" (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 7425104a1e..1c58c25c72 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.rkt" (for-label (only-meta-in 0 typed/scheme)))] +@begin[(require "utils.rkt" (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[] @@ -23,277 +23,3 @@ 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 diff --git a/collects/typed-scheme/scribblings/ts-reference.scrbl b/collects/typed-scheme/scribblings/ts-reference.scrbl index e1f9a43e4f..75044c772d 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.rkt" 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 8f530f5742..467bd7420f 100644 --- a/collects/typed-scheme/scribblings/types.scrbl +++ b/collects/typed-scheme/scribblings/types.scrbl @@ -2,21 +2,21 @@ @begin[(require "utils.rkt" 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 a893a2f8bf..13661fd231 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.rkt" (for-label typed/scheme/base))] +@begin[(require "utils.rkt" (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/collects/version/version.scrbl b/collects/version/version.scrbl index 3c7b55cc7f..b657ef38d4 100644 --- a/collects/version/version.scrbl +++ b/collects/version/version.scrbl @@ -10,10 +10,10 @@ @(define (selflink s) (link s (tt s))) -@title{@bold{Version}: PLT Version Checking} +@title{@bold{Version}: Racket Version Checking} The version collection contains several version-related pieces that -are used by PLT Scheme. See also @scheme[version] from +are used by Racket. See also @scheme[version] from @schememodname[scheme/base]. @; ---------------------------------------------------------------------- @@ -25,7 +25,7 @@ are used by PLT Scheme. See also @scheme[version] from @defthing[patchlevel exact-nonnegative-integer?]{ Indicates the current installed patch level, which is normally zero, -but may be updated by patches to DrScheme.} +but may be updated by patches to DrRacket.} @; ---------------------------------------- @@ -72,20 +72,20 @@ indicates the current state of the curent installation: @; ---------------------------------------------------------------------- -@section{DrScheme Version Tool} +@section{DrRacket Version Tool} @defmodule[version/tool] -The @scheme[version/tool] library implements a DrScheme tool that +The @scheme[version/tool] library implements a DrRacket tool that @itemize[ @item{makes the patchlevel display as a version @tt{p}@nonterm{N} - suffix in DrScheme (though the base verion reported by + suffix in DrRacket (though the base verion reported by @scheme[(version)] is not changed);} @item{if enabled by the user, periodically checks whether a - new PLT Scheme distribution is available for download.} + new Racket distribution is available for download.} ] @@ -97,11 +97,11 @@ The @scheme[version/tool] library implements a DrScheme tool that The @schememodname[version/utils] library provides a few of convenient utilities for dealing with version strings. Unless explicitly noted, -these functions do not handle legacy versions of PLT Scheme.} +these functions do not handle legacy versions of Racket.} @defproc[(valid-version? [str string?]) boolean?]{ -Returns @scheme[#t] if @scheme[str] is a valid PLT Scheme version +Returns @scheme[#t] if @scheme[str] is a valid Racket version string, @scheme[#f] otherwise.} @defproc[(version->list [str valid-version?]) @@ -131,7 +131,7 @@ alpha version. @scheme[str] is assumed to be a valid version.} Converts the version string into an integer. For version @scheme["X.YY.ZZZ.WWW"], the result will be @schemevalfont{XYYZZZWWW}. -This function works also for legacy PLT Scheme versions, by +This function works also for legacy Racket versions, by translating @scheme["XYY.ZZZ"] to @schemevalfont{XYYZZZ000}. The resulting integer can thefore be used to conveniently compare any two (valid) version strings. If the version string is invalid the 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/racket/src/cstartup.inc b/src/racket/src/cstartup.inc index 8a029f775d..4d6f880a48 100644 --- a/src/racket/src/cstartup.inc +++ b/src/racket/src/cstartup.inc @@ -1,44 +1,44 @@ { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,52,46,50,46,53,46,49,50,51,0,0,0,1,0,0,10,0,13, -0,22,0,29,0,33,0,46,0,53,0,57,0,62,0,65,0,70,0,75,0, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,52,46,50,46,53,46,49,52,51,0,0,0,1,0,0,10,0,13, +0,22,0,27,0,32,0,45,0,52,0,57,0,61,0,65,0,72,0,79,0, 82,0,88,0,102,0,116,0,119,0,125,0,129,0,131,0,142,0,144,0,158, 0,165,0,187,0,189,0,203,0,14,1,43,1,54,1,65,1,75,1,111,1, 144,1,177,1,236,1,46,2,124,2,190,2,195,2,215,2,106,3,126,3,177, 3,243,3,128,4,14,5,66,5,89,5,168,5,0,0,109,7,0,0,69,35, -37,109,105,110,45,115,116,120,29,11,11,68,104,101,114,101,45,115,116,120,66, -108,101,116,114,101,99,63,108,101,116,72,112,97,114,97,109,101,116,101,114,105, -122,101,66,100,101,102,105,110,101,63,97,110,100,64,108,101,116,42,62,111,114, -64,119,104,101,110,64,99,111,110,100,66,117,110,108,101,115,115,65,113,117,111, +37,109,105,110,45,115,116,120,29,11,11,68,104,101,114,101,45,115,116,120,64, +108,101,116,42,64,99,111,110,100,72,112,97,114,97,109,101,116,101,114,105,122, +101,66,108,101,116,114,101,99,64,119,104,101,110,63,108,101,116,63,97,110,100, +66,117,110,108,101,115,115,66,100,101,102,105,110,101,62,111,114,65,113,117,111, 116,101,29,94,2,14,68,35,37,107,101,114,110,101,108,11,29,94,2,14,68, 35,37,112,97,114,97,109,122,11,62,105,102,65,98,101,103,105,110,63,115,116, 120,61,115,70,108,101,116,45,118,97,108,117,101,115,61,120,73,108,101,116,114, 101,99,45,118,97,108,117,101,115,66,108,97,109,98,100,97,1,20,112,97,114, 97,109,101,116,101,114,105,122,97,116,105,111,110,45,107,101,121,61,118,73,100, -101,102,105,110,101,45,118,97,108,117,101,115,97,36,11,8,240,225,78,0,0, -95,159,2,16,36,36,159,2,15,36,36,159,2,15,36,36,16,20,2,5,2, -2,2,6,2,2,2,7,2,2,2,8,2,2,2,10,2,2,2,9,2,2, -2,4,2,2,2,11,2,2,2,12,2,2,2,13,2,2,97,37,11,8,240, -225,78,0,0,93,159,2,15,36,37,16,2,2,3,161,2,2,37,2,3,2, -2,2,3,96,11,11,8,240,225,78,0,0,16,0,96,38,11,8,240,225,78, +101,102,105,110,101,45,118,97,108,117,101,115,97,36,11,8,240,249,80,0,0, +95,159,2,16,36,36,159,2,15,36,36,159,2,15,36,36,16,20,2,4,2, +2,2,11,2,2,2,5,2,2,2,12,2,2,2,7,2,2,2,8,2,2, +2,9,2,2,2,10,2,2,2,6,2,2,2,13,2,2,97,37,11,8,240, +249,80,0,0,93,159,2,15,36,37,16,2,2,3,161,2,2,37,2,3,2, +2,2,3,96,11,11,8,240,249,80,0,0,16,0,96,38,11,8,240,249,80, 0,0,16,0,13,16,4,36,29,11,11,2,2,11,18,16,2,99,64,104,101, -114,101,8,32,8,31,8,30,8,29,8,28,93,8,224,232,78,0,0,95,9, -8,224,232,78,0,0,2,2,27,248,22,147,4,195,249,22,140,4,80,158,39, +114,101,8,32,8,31,8,30,8,29,8,28,93,8,224,0,81,0,0,95,9, +8,224,0,81,0,0,2,2,27,248,22,147,4,195,249,22,140,4,80,158,39, 36,251,22,81,2,17,248,22,96,199,12,249,22,71,2,18,248,22,98,201,27, 248,22,147,4,195,249,22,140,4,80,158,39,36,251,22,81,2,17,248,22,96, 199,249,22,71,2,18,248,22,98,201,12,27,248,22,73,248,22,147,4,196,28, 248,22,79,193,20,15,159,37,36,37,28,248,22,79,248,22,73,194,248,22,72, 193,249,22,140,4,80,158,39,36,251,22,81,2,17,248,22,72,199,249,22,71, -2,8,248,22,73,201,11,18,16,2,101,10,8,32,8,31,8,30,8,29,8, -28,16,4,11,11,2,19,3,1,8,101,110,118,49,50,54,53,50,16,4,11, -11,2,20,3,1,8,101,110,118,49,50,54,53,51,93,8,224,233,78,0,0, -95,9,8,224,233,78,0,0,2,2,27,248,22,73,248,22,147,4,196,28,248, +2,10,248,22,73,201,11,18,16,2,101,10,8,32,8,31,8,30,8,29,8, +28,16,4,11,11,2,19,3,1,8,101,110,118,49,50,55,52,54,16,4,11, +11,2,20,3,1,8,101,110,118,49,50,55,52,55,93,8,224,1,81,0,0, +95,9,8,224,1,81,0,0,2,2,27,248,22,73,248,22,147,4,196,28,248, 22,79,193,20,15,159,37,36,37,28,248,22,79,248,22,73,194,248,22,72,193, 249,22,140,4,80,158,39,36,250,22,81,2,21,248,22,81,249,22,81,248,22, -81,2,22,248,22,72,201,251,22,81,2,17,2,22,2,22,249,22,71,2,10, +81,2,22,248,22,72,201,251,22,81,2,17,2,22,2,22,249,22,71,2,13, 248,22,73,204,18,16,2,101,11,8,32,8,31,8,30,8,29,8,28,16,4, -11,11,2,19,3,1,8,101,110,118,49,50,54,53,53,16,4,11,11,2,20, -3,1,8,101,110,118,49,50,54,53,54,93,8,224,234,78,0,0,95,9,8, -224,234,78,0,0,2,2,248,22,147,4,193,27,248,22,147,4,194,249,22,71, +11,11,2,19,3,1,8,101,110,118,49,50,55,52,57,16,4,11,11,2,20, +3,1,8,101,110,118,49,50,55,53,48,93,8,224,2,81,0,0,95,9,8, +224,2,81,0,0,2,2,248,22,147,4,193,27,248,22,147,4,194,249,22,71, 248,22,81,248,22,72,196,248,22,73,195,27,248,22,73,248,22,147,4,23,197, 1,249,22,140,4,80,158,39,36,28,248,22,56,248,22,141,4,248,22,72,23, 198,2,27,249,22,2,32,0,89,162,8,44,37,43,9,222,33,40,248,22,147, @@ -52,7 +52,7 @@ 44,37,47,9,222,33,43,248,22,147,4,248,22,72,201,248,22,73,198,27,248, 22,73,248,22,147,4,196,27,248,22,147,4,248,22,72,195,249,22,140,4,80, 158,40,36,28,248,22,79,195,250,22,82,2,21,9,248,22,73,199,250,22,81, -2,5,248,22,81,248,22,72,199,250,22,82,2,9,248,22,73,201,248,22,73, +2,9,248,22,81,248,22,72,199,250,22,82,2,4,248,22,73,201,248,22,73, 202,27,248,22,73,248,22,147,4,23,197,1,27,249,22,1,22,85,249,22,2, 22,147,4,248,22,147,4,248,22,72,199,249,22,140,4,80,158,40,36,251,22, 81,1,22,119,105,116,104,45,99,111,110,116,105,110,117,97,116,105,111,110,45, @@ -63,13 +63,13 @@ 22,147,4,196,28,248,22,79,193,20,15,159,37,36,37,249,22,140,4,80,158, 39,36,27,248,22,147,4,248,22,72,197,28,249,22,181,8,62,61,62,248,22, 141,4,248,22,96,196,250,22,81,2,21,248,22,81,249,22,81,21,93,2,26, -248,22,72,199,250,22,82,2,12,249,22,81,2,26,249,22,81,248,22,105,203, +248,22,72,199,250,22,82,2,5,249,22,81,2,26,249,22,81,248,22,105,203, 2,26,248,22,73,202,251,22,81,2,17,28,249,22,181,8,248,22,141,4,248, 22,72,200,64,101,108,115,101,10,248,22,72,197,250,22,82,2,21,9,248,22, -73,200,249,22,71,2,12,248,22,73,202,100,8,32,8,31,8,30,8,29,8, -28,16,4,11,11,2,19,3,1,8,101,110,118,49,50,54,55,56,16,4,11, -11,2,20,3,1,8,101,110,118,49,50,54,55,57,93,8,224,235,78,0,0, -18,16,2,158,94,10,64,118,111,105,100,8,48,95,9,8,224,235,78,0,0, +73,200,249,22,71,2,5,248,22,73,202,100,8,32,8,31,8,30,8,29,8, +28,16,4,11,11,2,19,3,1,8,101,110,118,49,50,55,55,50,16,4,11, +11,2,20,3,1,8,101,110,118,49,50,55,55,51,93,8,224,3,81,0,0, +18,16,2,158,94,10,64,118,111,105,100,8,48,95,9,8,224,3,81,0,0, 2,2,27,248,22,73,248,22,147,4,196,249,22,140,4,80,158,39,36,28,248, 22,56,248,22,141,4,248,22,72,197,250,22,81,2,27,248,22,81,248,22,72, 199,248,22,96,198,27,248,22,141,4,248,22,72,197,250,22,81,2,27,248,22, @@ -81,25 +81,25 @@ 11,11,11,11,11,16,10,2,4,2,5,2,6,2,7,2,8,2,9,2,10, 2,11,2,12,2,13,36,46,37,11,11,11,16,0,16,0,16,0,36,36,11, 11,11,11,16,0,16,0,16,0,36,36,16,11,16,5,2,3,20,15,159,36, -36,36,36,20,105,159,36,16,0,16,1,33,33,10,16,5,2,13,89,162,8, +36,36,36,20,105,159,36,16,0,16,1,33,33,10,16,5,2,11,89,162,8, 44,37,53,9,223,0,33,34,36,20,105,159,36,16,1,2,3,16,0,11,16, -5,2,11,89,162,8,44,37,53,9,223,0,33,35,36,20,105,159,36,16,1, -2,3,16,0,11,16,5,2,8,89,162,8,44,37,53,9,223,0,33,36,36, -20,105,159,36,16,1,2,3,16,1,33,37,11,16,5,2,10,89,162,8,44, +5,2,8,89,162,8,44,37,53,9,223,0,33,35,36,20,105,159,36,16,1, +2,3,16,0,11,16,5,2,10,89,162,8,44,37,53,9,223,0,33,36,36, +20,105,159,36,16,1,2,3,16,1,33,37,11,16,5,2,13,89,162,8,44, 37,56,9,223,0,33,38,36,20,105,159,36,16,1,2,3,16,1,33,39,11, -16,5,2,5,89,162,8,44,37,58,9,223,0,33,42,36,20,105,159,36,16, -1,2,3,16,0,11,16,5,2,4,89,162,8,44,37,53,9,223,0,33,44, -36,20,105,159,36,16,1,2,3,16,0,11,16,5,2,9,89,162,8,44,37, +16,5,2,9,89,162,8,44,37,58,9,223,0,33,42,36,20,105,159,36,16, +1,2,3,16,0,11,16,5,2,7,89,162,8,44,37,53,9,223,0,33,44, +36,20,105,159,36,16,1,2,3,16,0,11,16,5,2,4,89,162,8,44,37, 54,9,223,0,33,45,36,20,105,159,36,16,1,2,3,16,0,11,16,5,2, 6,89,162,8,44,37,55,9,223,0,33,46,36,20,105,159,36,16,1,2,3, -16,0,11,16,5,2,12,89,162,8,44,37,58,9,223,0,33,47,36,20,105, -159,36,16,1,2,3,16,1,33,49,11,16,5,2,7,89,162,8,44,37,54, +16,0,11,16,5,2,5,89,162,8,44,37,58,9,223,0,33,47,36,20,105, +159,36,16,1,2,3,16,1,33,49,11,16,5,2,12,89,162,8,44,37,54, 9,223,0,33,50,36,20,105,159,36,16,1,2,3,16,0,11,16,0,94,2, 15,2,16,93,2,15,9,9,36,0}; EVAL_ONE_SIZED_STR((char *)expr, 2025); } { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,52,46,50,46,53,46,49,50,65,0,0,0,1,0,0,8,0,21, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,52,46,50,46,53,46,49,52,65,0,0,0,1,0,0,8,0,21, 0,26,0,43,0,58,0,76,0,92,0,102,0,120,0,140,0,156,0,174,0, 205,0,234,0,0,1,14,1,20,1,34,1,39,1,49,1,57,1,85,1,117, 1,123,1,168,1,213,1,237,1,20,2,22,2,188,2,22,4,63,4,136,5, @@ -132,231 +132,231 @@ 32,111,114,32,98,121,116,101,32,115,116,114,105,110,103,6,36,36,99,97,110, 110,111,116,32,97,100,100,32,97,32,115,117,102,102,105,120,32,116,111,32,97, 32,114,111,111,116,32,112,97,116,104,58,32,5,0,27,20,14,159,80,159,37, -51,38,250,80,159,40,52,38,249,22,27,11,80,159,42,51,38,22,150,13,10, +51,38,250,80,159,40,52,38,249,22,27,11,80,159,42,51,38,22,153,13,10, 248,22,173,5,23,196,2,28,248,22,170,6,23,194,2,12,87,94,248,22,187, 8,23,194,1,27,20,14,159,80,159,38,51,38,250,80,159,41,52,38,249,22, -27,11,80,159,43,51,38,22,150,13,10,248,22,173,5,23,197,2,28,248,22, +27,11,80,159,43,51,38,22,153,13,10,248,22,173,5,23,197,2,28,248,22, 170,6,23,194,2,12,87,94,248,22,187,8,23,194,1,27,20,14,159,80,159, -39,51,38,250,80,159,42,52,38,249,22,27,11,80,159,44,51,38,22,150,13, +39,51,38,250,80,159,42,52,38,249,22,27,11,80,159,44,51,38,22,153,13, 10,248,22,173,5,23,198,2,28,248,22,170,6,23,194,2,12,87,94,248,22, 187,8,23,194,1,248,80,159,40,54,37,197,28,248,22,79,23,195,2,9,27, -248,22,72,23,196,2,27,28,248,22,134,14,23,195,2,23,194,1,28,248,22, -133,14,23,195,2,249,22,135,14,23,196,1,250,80,158,43,49,248,22,150,14, -2,20,11,10,250,80,158,41,49,248,22,150,14,2,20,23,197,1,10,28,23, -193,2,249,22,71,248,22,137,14,249,22,135,14,23,198,1,247,22,151,14,27, +248,22,72,23,196,2,27,28,248,22,137,14,23,195,2,23,194,1,28,248,22, +136,14,23,195,2,249,22,138,14,23,196,1,250,80,158,43,49,248,22,153,14, +2,20,11,10,250,80,158,41,49,248,22,153,14,2,20,23,197,1,10,28,23, +193,2,249,22,71,248,22,140,14,249,22,138,14,23,198,1,247,22,154,14,27, 248,22,73,23,200,1,28,248,22,79,23,194,2,9,27,248,22,72,23,195,2, -27,28,248,22,134,14,23,195,2,23,194,1,28,248,22,133,14,23,195,2,249, -22,135,14,23,196,1,250,80,158,48,49,248,22,150,14,2,20,11,10,250,80, -158,46,49,248,22,150,14,2,20,23,197,1,10,28,23,193,2,249,22,71,248, -22,137,14,249,22,135,14,23,198,1,247,22,151,14,248,80,159,46,53,37,248, +27,28,248,22,137,14,23,195,2,23,194,1,28,248,22,136,14,23,195,2,249, +22,138,14,23,196,1,250,80,158,48,49,248,22,153,14,2,20,11,10,250,80, +158,46,49,248,22,153,14,2,20,23,197,1,10,28,23,193,2,249,22,71,248, +22,140,14,249,22,138,14,23,198,1,247,22,154,14,248,80,159,46,53,37,248, 22,73,23,199,1,87,94,23,193,1,248,80,159,44,53,37,248,22,73,23,197, 1,87,94,23,193,1,27,248,22,73,23,198,1,28,248,22,79,23,194,2,9, -27,248,22,72,23,195,2,27,28,248,22,134,14,23,195,2,23,194,1,28,248, -22,133,14,23,195,2,249,22,135,14,23,196,1,250,80,158,46,49,248,22,150, -14,2,20,11,10,250,80,158,44,49,248,22,150,14,2,20,23,197,1,10,28, -23,193,2,249,22,71,248,22,137,14,249,22,135,14,23,198,1,247,22,151,14, +27,248,22,72,23,195,2,27,28,248,22,137,14,23,195,2,23,194,1,28,248, +22,136,14,23,195,2,249,22,138,14,23,196,1,250,80,158,46,49,248,22,153, +14,2,20,11,10,250,80,158,44,49,248,22,153,14,2,20,23,197,1,10,28, +23,193,2,249,22,71,248,22,140,14,249,22,138,14,23,198,1,247,22,154,14, 248,80,159,44,53,37,248,22,73,23,199,1,248,80,159,42,53,37,248,22,73, -196,27,248,22,174,13,23,195,2,28,23,193,2,192,87,94,23,193,1,28,248, -22,175,6,23,195,2,27,248,22,132,14,195,28,192,192,248,22,133,14,195,11, -87,94,28,28,248,22,175,13,23,195,2,10,28,248,22,174,13,23,195,2,10, -28,248,22,175,6,23,195,2,28,248,22,132,14,23,195,2,10,248,22,133,14, +196,27,248,22,177,13,23,195,2,28,23,193,2,192,87,94,23,193,1,28,248, +22,175,6,23,195,2,27,248,22,135,14,195,28,192,192,248,22,136,14,195,11, +87,94,28,28,248,22,178,13,23,195,2,10,28,248,22,177,13,23,195,2,10, +28,248,22,175,6,23,195,2,28,248,22,135,14,23,195,2,10,248,22,136,14, 23,195,2,11,12,250,22,151,9,76,110,111,114,109,97,108,45,112,97,116,104, 45,99,97,115,101,6,42,42,112,97,116,104,32,40,102,111,114,32,97,110,121, 32,115,121,115,116,101,109,41,32,111,114,32,118,97,108,105,100,45,112,97,116, -104,32,115,116,114,105,110,103,23,197,2,28,28,248,22,175,13,23,195,2,249, -22,181,8,248,22,176,13,23,197,2,2,21,249,22,181,8,247,22,130,8,2, -21,27,28,248,22,175,6,23,196,2,23,195,2,248,22,184,7,248,22,179,13, -23,197,2,28,249,22,165,14,0,21,35,114,120,34,94,91,92,92,93,91,92, +104,32,115,116,114,105,110,103,23,197,2,28,28,248,22,178,13,23,195,2,249, +22,181,8,248,22,179,13,23,197,2,2,21,249,22,181,8,247,22,130,8,2, +21,27,28,248,22,175,6,23,196,2,23,195,2,248,22,184,7,248,22,182,13, +23,197,2,28,249,22,168,14,0,21,35,114,120,34,94,91,92,92,93,91,92, 92,93,91,63,93,91,92,92,93,34,23,195,2,28,248,22,175,6,195,248,22, -182,13,195,194,27,248,22,150,7,23,195,1,249,22,183,13,248,22,187,7,250, -22,173,14,0,6,35,114,120,34,47,34,28,249,22,165,14,0,22,35,114,120, +185,13,195,194,27,248,22,150,7,23,195,1,249,22,186,13,248,22,187,7,250, +22,176,14,0,6,35,114,120,34,47,34,28,249,22,168,14,0,22,35,114,120, 34,91,47,92,92,93,91,46,32,93,43,91,47,92,92,93,42,36,34,23,201, -2,23,199,1,250,22,173,14,0,19,35,114,120,34,91,32,46,93,43,40,91, +2,23,199,1,250,22,176,14,0,19,35,114,120,34,91,32,46,93,43,40,91, 47,92,92,93,42,41,36,34,23,202,1,6,2,2,92,49,80,159,44,37,38, -2,21,28,248,22,175,6,194,248,22,182,13,194,193,87,94,28,28,248,22,174, -13,23,195,2,10,28,248,22,175,6,23,195,2,28,248,22,132,14,23,195,2, -10,248,22,133,14,23,195,2,11,12,250,22,151,9,23,196,2,2,22,23,197, -2,28,248,22,132,14,23,195,2,12,248,22,190,11,249,22,132,11,248,22,140, +2,21,28,248,22,175,6,194,248,22,185,13,194,193,87,94,28,28,248,22,177, +13,23,195,2,10,28,248,22,175,6,23,195,2,28,248,22,135,14,23,195,2, +10,248,22,136,14,23,195,2,11,12,250,22,151,9,23,196,2,2,22,23,197, +2,28,248,22,135,14,23,195,2,12,248,22,129,12,249,22,135,11,248,22,140, 7,250,22,159,7,2,23,23,200,1,23,201,1,247,22,23,87,94,28,28,248, -22,174,13,23,195,2,10,28,248,22,175,6,23,195,2,28,248,22,132,14,23, -195,2,10,248,22,133,14,23,195,2,11,12,250,22,151,9,23,196,2,2,22, -23,197,2,28,248,22,132,14,23,195,2,12,248,22,190,11,249,22,132,11,248, +22,177,13,23,195,2,10,28,248,22,175,6,23,195,2,28,248,22,135,14,23, +195,2,10,248,22,136,14,23,195,2,11,12,250,22,151,9,23,196,2,2,22, +23,197,2,28,248,22,135,14,23,195,2,12,248,22,129,12,249,22,135,11,248, 22,140,7,250,22,159,7,2,23,23,200,1,23,201,1,247,22,23,87,94,87, -94,28,28,248,22,174,13,23,195,2,10,28,248,22,175,6,23,195,2,28,248, -22,132,14,23,195,2,10,248,22,133,14,23,195,2,11,12,250,22,151,9,195, -2,22,23,197,2,28,248,22,132,14,23,195,2,12,248,22,190,11,249,22,132, +94,28,28,248,22,177,13,23,195,2,10,28,248,22,175,6,23,195,2,28,248, +22,135,14,23,195,2,10,248,22,136,14,23,195,2,11,12,250,22,151,9,195, +2,22,23,197,2,28,248,22,135,14,23,195,2,12,248,22,129,12,249,22,135, 11,248,22,140,7,250,22,159,7,2,23,199,23,201,1,247,22,23,249,22,3, -89,162,8,44,37,50,9,223,2,33,35,196,87,94,28,28,248,22,174,13,23, -194,2,10,28,248,22,175,6,23,194,2,28,248,22,132,14,23,194,2,10,248, -22,133,14,23,194,2,11,12,250,22,151,9,2,7,2,22,23,196,2,28,248, -22,132,14,23,194,2,12,248,22,190,11,249,22,132,11,248,22,140,7,250,22, +89,162,8,44,37,50,9,223,2,33,35,196,87,94,28,28,248,22,177,13,23, +194,2,10,28,248,22,175,6,23,194,2,28,248,22,135,14,23,194,2,10,248, +22,136,14,23,194,2,11,12,250,22,151,9,2,7,2,22,23,196,2,28,248, +22,135,14,23,194,2,12,248,22,129,12,249,22,135,11,248,22,140,7,250,22, 159,7,2,23,2,7,23,200,1,247,22,23,32,38,89,162,8,44,40,55,2, -24,222,33,39,28,248,22,79,23,197,2,87,94,23,196,1,248,22,190,11,249, -22,165,11,251,22,159,7,2,25,2,7,28,248,22,79,23,203,2,87,94,23, -202,1,23,201,1,250,22,1,22,128,14,23,204,1,23,205,1,23,200,1,247, -22,23,27,249,22,128,14,248,22,72,23,200,2,23,197,2,28,248,22,187,13, -23,194,2,27,250,22,1,22,128,14,23,197,1,199,28,248,22,187,13,193,192, +24,222,33,39,28,248,22,79,23,197,2,87,94,23,196,1,248,22,129,12,249, +22,168,11,251,22,159,7,2,25,2,7,28,248,22,79,23,203,2,87,94,23, +202,1,23,201,1,250,22,1,22,131,14,23,204,1,23,205,1,23,200,1,247, +22,23,27,249,22,131,14,248,22,72,23,200,2,23,197,2,28,248,22,190,13, +23,194,2,27,250,22,1,22,131,14,23,197,1,199,28,248,22,190,13,193,192, 251,2,38,198,199,200,248,22,73,202,251,2,38,197,198,199,248,22,73,201,87, -94,87,94,87,94,28,28,248,22,174,13,193,10,28,248,22,175,6,193,28,248, -22,132,14,193,10,248,22,133,14,193,11,12,250,22,151,9,2,7,2,22,195, -28,248,22,132,14,193,12,248,22,190,11,249,22,132,11,248,22,140,7,250,22, +94,87,94,87,94,28,28,248,22,177,13,193,10,28,248,22,175,6,193,28,248, +22,135,14,193,10,248,22,136,14,193,11,12,250,22,151,9,2,7,2,22,195, +28,248,22,135,14,193,12,248,22,129,12,249,22,135,11,248,22,140,7,250,22, 159,7,2,23,2,7,199,247,22,23,249,22,3,32,0,89,162,8,44,37,49, -9,222,33,37,195,27,247,22,152,14,251,2,38,196,197,198,196,32,41,89,162, +9,222,33,37,195,27,247,22,155,14,251,2,38,196,197,198,196,32,41,89,162, 44,42,59,2,24,222,33,42,28,248,22,79,23,199,2,87,94,23,198,1,248, 23,196,1,251,22,159,7,2,25,23,199,1,28,248,22,79,23,203,2,87,94, -23,202,1,23,201,1,250,22,1,22,128,14,23,204,1,23,205,1,23,198,1, -27,249,22,128,14,248,22,72,23,202,2,23,199,2,28,248,22,187,13,23,194, -2,27,250,22,1,22,128,14,23,197,1,23,202,2,28,248,22,187,13,23,194, +23,202,1,23,201,1,250,22,1,22,131,14,23,204,1,23,205,1,23,198,1, +27,249,22,131,14,248,22,72,23,202,2,23,199,2,28,248,22,190,13,23,194, +2,27,250,22,1,22,131,14,23,197,1,23,202,2,28,248,22,190,13,23,194, 2,192,87,94,23,193,1,27,248,22,73,23,202,1,28,248,22,79,23,194,2, 87,94,23,193,1,248,23,199,1,251,22,159,7,2,25,23,202,1,28,248,22, -79,23,206,2,87,94,23,205,1,23,204,1,250,22,1,22,128,14,23,207,1, -23,208,1,23,201,1,27,249,22,128,14,248,22,72,23,197,2,23,202,2,28, -248,22,187,13,23,194,2,27,250,22,1,22,128,14,23,197,1,204,28,248,22, -187,13,193,192,253,2,41,203,204,205,206,23,15,248,22,73,201,253,2,41,202, +79,23,206,2,87,94,23,205,1,23,204,1,250,22,1,22,131,14,23,207,1, +23,208,1,23,201,1,27,249,22,131,14,248,22,72,23,197,2,23,202,2,28, +248,22,190,13,23,194,2,27,250,22,1,22,131,14,23,197,1,204,28,248,22, +190,13,193,192,253,2,41,203,204,205,206,23,15,248,22,73,201,253,2,41,202, 203,204,205,206,248,22,73,200,87,94,23,193,1,27,248,22,73,23,201,1,28, 248,22,79,23,194,2,87,94,23,193,1,248,23,198,1,251,22,159,7,2,25, 23,201,1,28,248,22,79,23,205,2,87,94,23,204,1,23,203,1,250,22,1, -22,128,14,23,206,1,23,207,1,23,200,1,27,249,22,128,14,248,22,72,23, -197,2,23,201,2,28,248,22,187,13,23,194,2,27,250,22,1,22,128,14,23, -197,1,203,28,248,22,187,13,193,192,253,2,41,202,203,204,205,206,248,22,73, -201,253,2,41,201,202,203,204,205,248,22,73,200,27,247,22,152,14,253,2,41, -198,199,200,201,202,198,87,95,28,28,248,22,175,13,23,194,2,10,28,248,22, -174,13,23,194,2,10,28,248,22,175,6,23,194,2,28,248,22,132,14,23,194, -2,10,248,22,133,14,23,194,2,11,12,252,22,151,9,23,200,2,2,26,36, +22,131,14,23,206,1,23,207,1,23,200,1,27,249,22,131,14,248,22,72,23, +197,2,23,201,2,28,248,22,190,13,23,194,2,27,250,22,1,22,131,14,23, +197,1,203,28,248,22,190,13,193,192,253,2,41,202,203,204,205,206,248,22,73, +201,253,2,41,201,202,203,204,205,248,22,73,200,27,247,22,155,14,253,2,41, +198,199,200,201,202,198,87,95,28,28,248,22,178,13,23,194,2,10,28,248,22, +177,13,23,194,2,10,28,248,22,175,6,23,194,2,28,248,22,135,14,23,194, +2,10,248,22,136,14,23,194,2,11,12,252,22,151,9,23,200,2,2,26,36, 23,198,2,23,199,2,28,28,248,22,175,6,23,195,2,10,248,22,163,7,23, 195,2,87,94,23,194,1,12,252,22,151,9,23,200,2,2,27,37,23,198,2, -23,199,1,91,159,39,11,90,161,39,36,11,248,22,131,14,23,197,2,87,94, +23,199,1,91,159,39,11,90,161,39,36,11,248,22,134,14,23,197,2,87,94, 23,195,1,87,94,28,192,12,250,22,152,9,23,201,1,2,28,23,199,1,249, -22,7,194,195,91,159,38,11,90,161,38,36,11,87,95,28,28,248,22,175,13, -23,196,2,10,28,248,22,174,13,23,196,2,10,28,248,22,175,6,23,196,2, -28,248,22,132,14,23,196,2,10,248,22,133,14,23,196,2,11,12,252,22,151, +22,7,194,195,91,159,38,11,90,161,38,36,11,87,95,28,28,248,22,178,13, +23,196,2,10,28,248,22,177,13,23,196,2,10,28,248,22,175,6,23,196,2, +28,248,22,135,14,23,196,2,10,248,22,136,14,23,196,2,11,12,252,22,151, 9,2,10,2,26,36,23,200,2,23,201,2,28,28,248,22,175,6,23,197,2, 10,248,22,163,7,23,197,2,12,252,22,151,9,2,10,2,27,37,23,200,2, -23,201,2,91,159,39,11,90,161,39,36,11,248,22,131,14,23,199,2,87,94, +23,201,2,91,159,39,11,90,161,39,36,11,248,22,134,14,23,199,2,87,94, 23,195,1,87,94,28,192,12,250,22,152,9,2,10,2,28,23,201,2,249,22, -7,194,195,27,249,22,184,13,250,22,172,14,0,20,35,114,120,35,34,40,63, -58,91,46,93,91,94,46,93,42,124,41,36,34,248,22,180,13,23,201,1,28, +7,194,195,27,249,22,187,13,250,22,175,14,0,20,35,114,120,35,34,40,63, +58,91,46,93,91,94,46,93,42,124,41,36,34,248,22,183,13,23,201,1,28, 248,22,175,6,23,203,2,249,22,187,7,23,204,1,8,63,23,202,1,28,248, -22,175,13,23,199,2,248,22,176,13,23,199,1,87,94,23,198,1,247,22,177, -13,28,248,22,174,13,194,249,22,128,14,195,194,192,91,159,38,11,90,161,38, -36,11,87,95,28,28,248,22,175,13,23,196,2,10,28,248,22,174,13,23,196, -2,10,28,248,22,175,6,23,196,2,28,248,22,132,14,23,196,2,10,248,22, -133,14,23,196,2,11,12,252,22,151,9,2,11,2,26,36,23,200,2,23,201, +22,178,13,23,199,2,248,22,179,13,23,199,1,87,94,23,198,1,247,22,180, +13,28,248,22,177,13,194,249,22,131,14,195,194,192,91,159,38,11,90,161,38, +36,11,87,95,28,28,248,22,178,13,23,196,2,10,28,248,22,177,13,23,196, +2,10,28,248,22,175,6,23,196,2,28,248,22,135,14,23,196,2,10,248,22, +136,14,23,196,2,11,12,252,22,151,9,2,11,2,26,36,23,200,2,23,201, 2,28,28,248,22,175,6,23,197,2,10,248,22,163,7,23,197,2,12,252,22, 151,9,2,11,2,27,37,23,200,2,23,201,2,91,159,39,11,90,161,39,36, -11,248,22,131,14,23,199,2,87,94,23,195,1,87,94,28,192,12,250,22,152, -9,2,11,2,28,23,201,2,249,22,7,194,195,27,249,22,184,13,249,22,173, -7,250,22,173,14,0,9,35,114,120,35,34,91,46,93,34,248,22,180,13,23, +11,248,22,134,14,23,199,2,87,94,23,195,1,87,94,28,192,12,250,22,152, +9,2,11,2,28,23,201,2,249,22,7,194,195,27,249,22,187,13,249,22,173, +7,250,22,176,14,0,9,35,114,120,35,34,91,46,93,34,248,22,183,13,23, 203,1,6,1,1,95,28,248,22,175,6,23,202,2,249,22,187,7,23,203,1, -8,63,23,201,1,28,248,22,175,13,23,199,2,248,22,176,13,23,199,1,87, -94,23,198,1,247,22,177,13,28,248,22,174,13,194,249,22,128,14,195,194,192, +8,63,23,201,1,28,248,22,178,13,23,199,2,248,22,179,13,23,199,1,87, +94,23,198,1,247,22,180,13,28,248,22,177,13,194,249,22,131,14,195,194,192, 249,247,22,142,5,194,11,249,80,159,38,47,37,9,9,249,80,159,38,47,37, -195,9,27,247,22,154,14,249,80,158,39,48,28,23,195,2,27,248,22,128,8, +195,9,27,247,22,157,14,249,80,158,39,48,28,23,195,2,27,248,22,128,8, 6,11,11,80,76,84,67,79,76,76,69,67,84,83,28,192,192,6,0,0,6, -0,0,27,28,23,196,1,250,22,128,14,248,22,150,14,69,97,100,100,111,110, +0,0,27,28,23,196,1,250,22,131,14,248,22,153,14,69,97,100,100,111,110, 45,100,105,114,247,22,190,7,6,8,8,99,111,108,108,101,99,116,115,11,27, -248,80,159,42,53,37,250,22,85,23,203,1,248,22,81,248,22,150,14,72,99, +248,80,159,42,53,37,250,22,85,23,203,1,248,22,81,248,22,153,14,72,99, 111,108,108,101,99,116,115,45,100,105,114,23,204,1,28,193,249,22,71,195,194, -192,32,51,89,162,8,44,39,8,31,2,19,222,33,52,27,249,22,161,14,23, +192,32,51,89,162,8,44,39,8,31,2,19,222,33,52,27,249,22,164,14,23, 197,2,23,198,2,28,23,193,2,87,94,23,196,1,27,248,22,96,23,195,2, -27,27,248,22,105,23,197,1,27,249,22,161,14,23,201,2,23,196,2,28,23, +27,27,248,22,105,23,197,1,27,249,22,164,14,23,201,2,23,196,2,28,23, 193,2,87,94,23,194,1,27,248,22,96,23,195,2,27,27,248,22,105,23,197, -1,27,249,22,161,14,23,205,2,23,196,2,28,23,193,2,87,94,23,194,1, -27,248,22,96,23,195,2,27,27,248,22,105,23,197,1,27,249,22,161,14,23, +1,27,249,22,164,14,23,205,2,23,196,2,28,23,193,2,87,94,23,194,1, +27,248,22,96,23,195,2,27,27,248,22,105,23,197,1,27,249,22,164,14,23, 209,2,23,196,2,28,23,193,2,87,94,23,194,1,27,248,22,96,23,195,2, -27,27,248,22,105,23,197,1,27,249,22,161,14,23,213,2,23,196,2,28,23, +27,27,248,22,105,23,197,1,27,249,22,164,14,23,213,2,23,196,2,28,23, 193,2,87,94,23,194,1,27,248,22,96,23,195,2,27,250,2,51,23,215,2, 23,216,1,248,22,105,23,199,1,28,249,22,169,7,23,196,2,2,29,249,22, -85,23,214,2,194,249,22,71,248,22,183,13,23,197,1,194,87,95,23,211,1, +85,23,214,2,194,249,22,71,248,22,186,13,23,197,1,194,87,95,23,211,1, 23,193,1,28,249,22,169,7,23,196,2,2,29,249,22,85,23,212,2,9,249, -22,71,248,22,183,13,23,197,1,9,28,249,22,169,7,23,196,2,2,29,249, -22,85,23,210,2,194,249,22,71,248,22,183,13,23,197,1,194,87,94,23,193, +22,71,248,22,186,13,23,197,1,9,28,249,22,169,7,23,196,2,2,29,249, +22,85,23,210,2,194,249,22,71,248,22,186,13,23,197,1,194,87,94,23,193, 1,28,249,22,169,7,23,196,2,2,29,249,22,85,23,208,2,9,249,22,71, -248,22,183,13,23,197,1,9,28,249,22,169,7,23,196,2,2,29,249,22,85, -23,206,2,194,249,22,71,248,22,183,13,23,197,1,194,87,94,23,193,1,28, +248,22,186,13,23,197,1,9,28,249,22,169,7,23,196,2,2,29,249,22,85, +23,206,2,194,249,22,71,248,22,186,13,23,197,1,194,87,94,23,193,1,28, 249,22,169,7,23,196,2,2,29,249,22,85,23,204,2,9,249,22,71,248,22, -183,13,23,197,1,9,28,249,22,169,7,23,196,2,2,29,249,22,85,23,202, -2,194,249,22,71,248,22,183,13,23,197,1,194,87,94,23,193,1,28,249,22, -169,7,23,196,2,2,29,249,22,85,23,200,2,9,249,22,71,248,22,183,13, +186,13,23,197,1,9,28,249,22,169,7,23,196,2,2,29,249,22,85,23,202, +2,194,249,22,71,248,22,186,13,23,197,1,194,87,94,23,193,1,28,249,22, +169,7,23,196,2,2,29,249,22,85,23,200,2,9,249,22,71,248,22,186,13, 23,197,1,9,28,249,22,169,7,23,196,2,2,29,249,22,85,197,194,87,94, -23,196,1,249,22,71,248,22,183,13,23,197,1,194,87,94,23,193,1,28,249, +23,196,1,249,22,71,248,22,186,13,23,197,1,194,87,94,23,193,1,28,249, 22,169,7,23,198,2,2,29,249,22,85,195,9,87,94,23,194,1,249,22,71, -248,22,183,13,23,199,1,9,87,95,28,28,248,22,163,7,194,10,248,22,175, +248,22,186,13,23,199,1,9,87,95,28,28,248,22,163,7,194,10,248,22,175, 6,194,12,250,22,151,9,2,14,6,21,21,98,121,116,101,32,115,116,114,105, 110,103,32,111,114,32,115,116,114,105,110,103,196,28,28,248,22,80,195,249,22, -4,22,174,13,196,11,12,250,22,151,9,2,14,6,13,13,108,105,115,116,32, +4,22,177,13,196,11,12,250,22,151,9,2,14,6,13,13,108,105,115,116,32, 111,102,32,112,97,116,104,115,197,250,2,51,197,195,28,248,22,175,6,197,248, 22,186,7,197,196,32,54,89,162,8,44,39,53,70,102,111,117,110,100,45,101, 120,101,99,222,33,57,32,55,89,162,8,44,40,58,64,110,101,120,116,222,33, -56,27,248,22,136,14,23,196,2,28,249,22,183,8,23,195,2,23,197,1,11, -28,248,22,132,14,23,194,2,27,249,22,128,14,23,197,1,23,196,1,28,23, -197,2,91,159,39,11,90,161,39,36,11,248,22,131,14,23,197,2,87,95,23, -195,1,23,194,1,27,28,23,202,2,27,248,22,136,14,23,199,2,28,249,22, -183,8,23,195,2,23,200,2,11,28,248,22,132,14,23,194,2,250,2,54,23, -205,2,23,206,2,249,22,128,14,23,200,2,23,198,1,250,2,54,23,205,2, +56,27,248,22,139,14,23,196,2,28,249,22,183,8,23,195,2,23,197,1,11, +28,248,22,135,14,23,194,2,27,249,22,131,14,23,197,1,23,196,1,28,23, +197,2,91,159,39,11,90,161,39,36,11,248,22,134,14,23,197,2,87,95,23, +195,1,23,194,1,27,28,23,202,2,27,248,22,139,14,23,199,2,28,249,22, +183,8,23,195,2,23,200,2,11,28,248,22,135,14,23,194,2,250,2,54,23, +205,2,23,206,2,249,22,131,14,23,200,2,23,198,1,250,2,54,23,205,2, 23,206,2,23,196,1,11,28,23,193,2,192,87,94,23,193,1,27,28,248,22, -174,13,23,196,2,27,249,22,128,14,23,198,2,23,205,2,28,28,248,22,187, -13,193,10,248,22,186,13,193,192,11,11,28,23,193,2,192,87,94,23,193,1, -28,23,203,2,11,27,248,22,136,14,23,200,2,28,249,22,183,8,23,195,2, -23,201,1,11,28,248,22,132,14,23,194,2,250,2,54,23,206,1,23,207,1, -249,22,128,14,23,201,1,23,198,1,250,2,54,205,206,195,192,87,94,23,194, -1,28,23,196,2,91,159,39,11,90,161,39,36,11,248,22,131,14,23,197,2, -87,95,23,195,1,23,194,1,27,28,23,201,2,27,248,22,136,14,23,199,2, -28,249,22,183,8,23,195,2,23,200,2,11,28,248,22,132,14,23,194,2,250, -2,54,23,204,2,23,205,2,249,22,128,14,23,200,2,23,198,1,250,2,54, +177,13,23,196,2,27,249,22,131,14,23,198,2,23,205,2,28,28,248,22,190, +13,193,10,248,22,189,13,193,192,11,11,28,23,193,2,192,87,94,23,193,1, +28,23,203,2,11,27,248,22,139,14,23,200,2,28,249,22,183,8,23,195,2, +23,201,1,11,28,248,22,135,14,23,194,2,250,2,54,23,206,1,23,207,1, +249,22,131,14,23,201,1,23,198,1,250,2,54,205,206,195,192,87,94,23,194, +1,28,23,196,2,91,159,39,11,90,161,39,36,11,248,22,134,14,23,197,2, +87,95,23,195,1,23,194,1,27,28,23,201,2,27,248,22,139,14,23,199,2, +28,249,22,183,8,23,195,2,23,200,2,11,28,248,22,135,14,23,194,2,250, +2,54,23,204,2,23,205,2,249,22,131,14,23,200,2,23,198,1,250,2,54, 23,204,2,23,205,2,23,196,1,11,28,23,193,2,192,87,94,23,193,1,27, -28,248,22,174,13,23,196,2,27,249,22,128,14,23,198,2,23,204,2,28,28, -248,22,187,13,193,10,248,22,186,13,193,192,11,11,28,23,193,2,192,87,94, -23,193,1,28,23,202,2,11,27,248,22,136,14,23,200,2,28,249,22,183,8, -23,195,2,23,201,1,11,28,248,22,132,14,23,194,2,250,2,54,23,205,1, -23,206,1,249,22,128,14,23,201,1,23,198,1,250,2,54,204,205,195,192,28, -23,193,2,91,159,39,11,90,161,39,36,11,248,22,131,14,23,199,2,87,95, +28,248,22,177,13,23,196,2,27,249,22,131,14,23,198,2,23,204,2,28,28, +248,22,190,13,193,10,248,22,189,13,193,192,11,11,28,23,193,2,192,87,94, +23,193,1,28,23,202,2,11,27,248,22,139,14,23,200,2,28,249,22,183,8, +23,195,2,23,201,1,11,28,248,22,135,14,23,194,2,250,2,54,23,205,1, +23,206,1,249,22,131,14,23,201,1,23,198,1,250,2,54,204,205,195,192,28, +23,193,2,91,159,39,11,90,161,39,36,11,248,22,134,14,23,199,2,87,95, 23,195,1,23,194,1,27,28,23,198,2,251,2,55,23,198,2,23,203,2,23, -201,2,23,202,2,11,28,23,193,2,192,87,94,23,193,1,27,28,248,22,174, -13,195,27,249,22,128,14,197,200,28,28,248,22,187,13,193,10,248,22,186,13, +201,2,23,202,2,11,28,23,193,2,192,87,94,23,193,1,27,28,248,22,177, +13,195,27,249,22,131,14,197,200,28,28,248,22,190,13,193,10,248,22,189,13, 193,192,11,11,28,192,192,28,198,11,251,2,55,198,203,201,202,194,32,58,89, 162,8,44,40,8,31,2,19,222,33,59,28,248,22,79,23,197,2,11,27,248, -22,135,14,248,22,72,23,199,2,27,249,22,128,14,23,196,1,23,197,2,28, -248,22,186,13,23,194,2,250,2,54,198,199,195,87,94,23,193,1,27,248,22, -73,23,200,1,28,248,22,79,23,194,2,11,27,248,22,135,14,248,22,72,23, -196,2,27,249,22,128,14,23,196,1,23,200,2,28,248,22,186,13,23,194,2, +22,138,14,248,22,72,23,199,2,27,249,22,131,14,23,196,1,23,197,2,28, +248,22,189,13,23,194,2,250,2,54,198,199,195,87,94,23,193,1,27,248,22, +73,23,200,1,28,248,22,79,23,194,2,11,27,248,22,138,14,248,22,72,23, +196,2,27,249,22,131,14,23,196,1,23,200,2,28,248,22,189,13,23,194,2, 250,2,54,201,202,195,87,94,23,193,1,27,248,22,73,23,197,1,28,248,22, -79,23,194,2,11,27,248,22,135,14,248,22,72,23,196,2,27,249,22,128,14, -23,196,1,23,203,2,28,248,22,186,13,23,194,2,250,2,54,204,205,195,87, +79,23,194,2,11,27,248,22,138,14,248,22,72,23,196,2,27,249,22,131,14, +23,196,1,23,203,2,28,248,22,189,13,23,194,2,250,2,54,204,205,195,87, 94,23,193,1,27,248,22,73,23,197,1,28,248,22,79,23,194,2,11,27,248, -22,135,14,248,22,72,23,196,2,27,249,22,128,14,23,196,1,23,206,2,28, -248,22,186,13,23,194,2,250,2,54,23,15,23,16,195,87,94,23,193,1,27, -248,22,73,23,197,1,28,248,22,79,23,194,2,11,27,248,22,135,14,248,22, -72,23,196,2,27,249,22,128,14,23,196,1,23,209,2,28,248,22,186,13,23, +22,138,14,248,22,72,23,196,2,27,249,22,131,14,23,196,1,23,206,2,28, +248,22,189,13,23,194,2,250,2,54,23,15,23,16,195,87,94,23,193,1,27, +248,22,73,23,197,1,28,248,22,79,23,194,2,11,27,248,22,138,14,248,22, +72,23,196,2,27,249,22,131,14,23,196,1,23,209,2,28,248,22,189,13,23, 194,2,250,2,54,23,18,23,19,195,87,94,23,193,1,27,248,22,73,23,197, -1,28,248,22,79,23,194,2,11,27,248,22,135,14,248,22,72,195,27,249,22, -128,14,23,196,1,23,19,28,248,22,186,13,193,250,2,54,23,21,23,22,195, -251,2,58,23,21,23,22,23,23,248,22,73,199,87,95,28,28,248,22,174,13, -23,195,2,10,28,248,22,175,6,23,195,2,28,248,22,132,14,23,195,2,10, -248,22,133,14,23,195,2,11,12,250,22,151,9,2,15,6,25,25,112,97,116, +1,28,248,22,79,23,194,2,11,27,248,22,138,14,248,22,72,195,27,249,22, +131,14,23,196,1,23,19,28,248,22,189,13,193,250,2,54,23,21,23,22,195, +251,2,58,23,21,23,22,23,23,248,22,73,199,87,95,28,28,248,22,177,13, +23,195,2,10,28,248,22,175,6,23,195,2,28,248,22,135,14,23,195,2,10, +248,22,136,14,23,195,2,11,12,250,22,151,9,2,15,6,25,25,112,97,116, 104,32,111,114,32,115,116,114,105,110,103,32,40,115,97,110,115,32,110,117,108, -41,23,197,2,28,28,23,195,2,28,28,248,22,174,13,23,196,2,10,28,248, -22,175,6,23,196,2,28,248,22,132,14,23,196,2,10,248,22,133,14,23,196, -2,11,248,22,132,14,23,196,2,11,10,12,250,22,151,9,2,15,6,29,29, +41,23,197,2,28,28,23,195,2,28,28,248,22,177,13,23,196,2,10,28,248, +22,175,6,23,196,2,28,248,22,135,14,23,196,2,10,248,22,136,14,23,196, +2,11,248,22,135,14,23,196,2,11,10,12,250,22,151,9,2,15,6,29,29, 35,102,32,111,114,32,114,101,108,97,116,105,118,101,32,112,97,116,104,32,111, -114,32,115,116,114,105,110,103,23,198,2,28,28,248,22,132,14,23,195,2,91, -159,39,11,90,161,39,36,11,248,22,131,14,23,198,2,249,22,181,8,194,68, +114,32,115,116,114,105,110,103,23,198,2,28,28,248,22,135,14,23,195,2,91, +159,39,11,90,161,39,36,11,248,22,134,14,23,198,2,249,22,181,8,194,68, 114,101,108,97,116,105,118,101,11,27,248,22,128,8,6,4,4,80,65,84,72, 27,28,23,194,2,27,249,80,159,41,48,38,23,197,1,9,28,249,22,181,8, -247,22,130,8,2,21,249,22,71,248,22,183,13,5,1,46,194,192,87,94,23, -194,1,9,28,248,22,79,23,194,2,11,27,248,22,135,14,248,22,72,23,196, -2,27,249,22,128,14,23,196,1,23,200,2,28,248,22,186,13,23,194,2,250, +247,22,130,8,2,21,249,22,71,248,22,186,13,5,1,46,194,192,87,94,23, +194,1,9,28,248,22,79,23,194,2,11,27,248,22,138,14,248,22,72,23,196, +2,27,249,22,131,14,23,196,1,23,200,2,28,248,22,189,13,23,194,2,250, 2,54,201,202,195,87,94,23,193,1,27,248,22,73,23,197,1,28,248,22,79, -23,194,2,11,27,248,22,135,14,248,22,72,23,196,2,27,249,22,128,14,23, -196,1,23,203,2,28,248,22,186,13,23,194,2,250,2,54,204,205,195,87,94, +23,194,2,11,27,248,22,138,14,248,22,72,23,196,2,27,249,22,131,14,23, +196,1,23,203,2,28,248,22,189,13,23,194,2,250,2,54,204,205,195,87,94, 23,193,1,27,248,22,73,23,197,1,28,248,22,79,23,194,2,11,27,248,22, -135,14,248,22,72,195,27,249,22,128,14,23,196,1,205,28,248,22,186,13,193, +138,14,248,22,72,195,27,249,22,131,14,23,196,1,205,28,248,22,189,13,193, 250,2,54,23,15,23,16,195,251,2,58,23,15,23,16,23,17,248,22,73,199, -27,248,22,135,14,23,196,1,28,248,22,186,13,193,250,2,54,198,199,195,11, +27,248,22,138,14,23,196,1,28,248,22,189,13,193,250,2,54,198,199,195,11, 250,80,159,39,49,37,196,197,11,250,80,159,39,49,37,196,11,11,87,94,249, 22,166,6,247,22,138,5,195,248,22,128,6,249,22,184,3,36,249,22,168,3, 197,198,27,28,23,197,2,87,95,23,196,1,23,195,1,23,197,1,87,94,23, -197,1,27,248,22,150,14,2,20,27,249,80,159,41,49,37,23,196,1,11,27, +197,1,27,248,22,153,14,2,20,27,249,80,159,41,49,37,23,196,1,11,27, 27,248,22,187,3,23,200,1,28,192,192,36,27,27,248,22,187,3,23,202,1, 28,192,192,36,249,22,169,5,23,197,1,83,158,40,20,100,95,89,162,8,44, 36,48,9,224,3,2,33,63,23,195,1,23,196,1,27,248,22,154,5,23,195, @@ -388,7 +388,7 @@ 222,33,47,80,159,36,46,37,83,158,36,16,2,83,158,39,20,99,96,2,13, 89,162,44,36,44,9,223,0,33,48,89,162,44,37,45,9,223,0,33,49,89, 162,44,38,55,9,223,0,33,50,80,159,36,47,37,83,158,36,16,2,27,248, -22,157,14,248,22,186,7,27,28,249,22,181,8,247,22,130,8,2,21,6,1, +22,160,14,248,22,186,7,27,28,249,22,181,8,247,22,130,8,2,21,6,1, 1,59,6,1,1,58,250,22,159,7,6,14,14,40,91,94,126,97,93,42,41, 126,97,40,46,42,41,23,196,2,23,196,1,89,162,8,44,38,48,2,14,223, 0,33,53,80,159,36,48,37,83,158,36,16,2,83,158,39,20,99,96,2,15, @@ -400,13 +400,13 @@ EVAL_ONE_SIZED_STR((char *)expr, 6246); } { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,52,46,50,46,53,46,49,50,9,0,0,0,1,0,0,10,0,16, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,52,46,50,46,53,46,49,52,9,0,0,0,1,0,0,10,0,16, 0,29,0,44,0,58,0,72,0,86,0,128,0,0,0,57,1,0,0,69,35, 37,98,117,105,108,116,105,110,65,113,117,111,116,101,29,94,2,2,67,35,37, 117,116,105,108,115,11,29,94,2,2,69,35,37,110,101,116,119,111,114,107,11, 29,94,2,2,68,35,37,112,97,114,97,109,122,11,29,94,2,2,68,35,37, 101,120,112,111,98,115,11,29,94,2,2,68,35,37,107,101,114,110,101,108,11, -97,36,11,8,240,103,79,0,0,98,159,2,3,36,36,159,2,4,36,36,159, +97,36,11,8,240,127,81,0,0,98,159,2,3,36,36,159,2,4,36,36,159, 2,5,36,36,159,2,6,36,36,159,2,7,36,36,159,2,7,36,36,16,0, 159,36,20,105,159,36,16,1,11,16,0,83,158,42,20,103,145,2,1,2,1, 29,11,11,11,11,11,18,96,11,44,44,44,36,80,158,36,36,20,105,159,36, @@ -420,7 +420,7 @@ EVAL_ONE_SIZED_STR((char *)expr, 353); } { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,52,46,50,46,53,46,49,50,74,0,0,0,1,0,0,7,0,18, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,52,46,50,46,53,46,49,52,74,0,0,0,1,0,0,7,0,18, 0,45,0,51,0,64,0,73,0,80,0,102,0,124,0,150,0,162,0,180,0, 200,0,212,0,228,0,251,0,7,1,38,1,45,1,50,1,55,1,60,1,65, 1,70,1,79,1,84,1,88,1,94,1,101,1,107,1,115,1,124,1,145,1, @@ -446,40 +446,40 @@ 97,109,101,5,3,46,122,111,5,3,46,122,111,6,6,6,110,97,116,105,118, 101,64,108,111,111,112,63,108,105,98,6,3,3,46,115,115,6,4,4,46,114, 107,116,5,4,46,114,107,116,67,105,103,110,111,114,101,100,249,22,14,195,80, -159,38,46,38,250,22,128,14,23,197,1,23,199,1,249,80,159,43,39,38,23, -198,1,2,23,250,22,128,14,23,197,1,23,199,1,249,80,159,43,39,38,23, -198,1,2,24,252,22,128,14,23,199,1,23,201,1,2,25,247,22,131,8,249, -80,159,45,39,38,23,200,1,80,159,45,36,38,252,22,128,14,23,199,1,23, +159,38,46,38,250,22,131,14,23,197,1,23,199,1,249,80,159,43,39,38,23, +198,1,2,23,250,22,131,14,23,197,1,23,199,1,249,80,159,43,39,38,23, +198,1,2,24,252,22,131,14,23,199,1,23,201,1,2,25,247,22,131,8,249, +80,159,45,39,38,23,200,1,80,159,45,36,38,252,22,131,14,23,199,1,23, 201,1,2,25,247,22,131,8,249,80,159,45,39,38,23,200,1,80,159,45,36, -38,27,252,22,128,14,23,200,1,23,202,1,2,25,247,22,131,8,249,80,159, -46,39,38,23,201,1,80,159,46,36,38,27,250,22,145,14,196,11,32,0,89, -162,8,44,36,41,9,222,11,28,192,249,22,71,195,194,11,27,252,22,128,14, +38,27,252,22,131,14,23,200,1,23,202,1,2,25,247,22,131,8,249,80,159, +46,39,38,23,201,1,80,159,46,36,38,27,250,22,148,14,196,11,32,0,89, +162,8,44,36,41,9,222,11,28,192,249,22,71,195,194,11,27,252,22,131,14, 23,200,1,23,202,1,2,25,247,22,131,8,249,80,159,46,39,38,23,201,1, -80,159,46,36,38,27,250,22,145,14,196,11,32,0,89,162,8,44,36,41,9, -222,11,28,192,249,22,71,195,194,11,27,250,22,128,14,23,198,1,23,200,1, -249,80,159,44,39,38,23,199,1,2,23,27,250,22,145,14,196,11,32,0,89, -162,8,44,36,41,9,222,11,28,192,249,22,71,195,194,11,27,250,22,128,14, -23,198,1,23,200,1,249,80,159,44,39,38,23,199,1,2,24,27,250,22,145, +80,159,46,36,38,27,250,22,148,14,196,11,32,0,89,162,8,44,36,41,9, +222,11,28,192,249,22,71,195,194,11,27,250,22,131,14,23,198,1,23,200,1, +249,80,159,44,39,38,23,199,1,2,23,27,250,22,148,14,196,11,32,0,89, +162,8,44,36,41,9,222,11,28,192,249,22,71,195,194,11,27,250,22,131,14, +23,198,1,23,200,1,249,80,159,44,39,38,23,199,1,2,24,27,250,22,148, 14,196,11,32,0,89,162,8,44,36,41,9,222,11,28,192,249,22,71,195,194, 11,87,94,28,248,80,159,37,38,38,23,195,2,12,250,22,151,9,77,108,111, 97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,6,25,25,112,97,116, 104,32,111,114,32,118,97,108,105,100,45,112,97,116,104,32,115,116,114,105,110, -103,23,197,2,91,159,46,11,90,161,37,36,11,28,248,22,134,14,23,205,2, -23,204,2,27,247,22,143,5,28,23,193,2,249,22,135,14,23,207,2,23,195, -1,23,205,2,90,161,39,37,11,248,22,131,14,23,205,1,87,94,23,196,1, -90,161,38,40,11,28,23,205,2,27,248,22,179,13,23,197,2,27,248,22,166, +103,23,197,2,91,159,46,11,90,161,37,36,11,28,248,22,137,14,23,205,2, +23,204,2,27,247,22,143,5,28,23,193,2,249,22,138,14,23,207,2,23,195, +1,23,205,2,90,161,39,37,11,248,22,134,14,23,205,1,87,94,23,196,1, +90,161,38,40,11,28,23,205,2,27,248,22,182,13,23,197,2,27,248,22,166, 7,23,195,2,28,28,249,22,180,3,23,195,2,40,249,22,169,7,5,4,46, 114,107,116,249,22,172,7,23,198,2,249,22,168,3,23,199,2,40,11,249,22, -7,23,199,2,248,22,183,13,249,22,173,7,250,22,172,7,23,202,1,36,249, +7,23,199,2,248,22,186,13,249,22,173,7,250,22,172,7,23,202,1,36,249, 22,168,3,23,203,1,40,5,3,46,115,115,249,22,7,23,199,2,11,249,22, 7,23,197,2,11,90,161,37,42,11,28,249,22,181,8,23,199,2,23,197,2, -23,193,2,249,22,128,14,23,196,2,23,199,2,90,161,37,43,11,28,23,198, +23,193,2,249,22,131,14,23,196,2,23,199,2,90,161,37,43,11,28,23,198, 2,28,249,22,181,8,23,200,2,23,197,1,23,193,1,87,94,23,193,1,249, -22,128,14,23,196,2,23,200,2,87,94,23,195,1,11,90,161,37,44,11,28, +22,131,14,23,196,2,23,200,2,87,94,23,195,1,11,90,161,37,44,11,28, 249,22,181,8,23,196,2,68,114,101,108,97,116,105,118,101,87,94,23,194,1, -2,22,23,194,1,90,161,37,45,11,247,22,153,14,27,27,250,22,145,14,23, +2,22,23,194,1,90,161,37,45,11,247,22,156,14,27,27,250,22,148,14,23, 204,2,11,32,0,89,162,8,44,36,41,9,222,11,28,192,249,22,71,23,203, -2,194,11,27,28,23,202,2,28,23,194,2,11,27,250,22,145,14,23,206,2, +2,194,11,27,28,23,202,2,28,23,194,2,11,27,250,22,148,14,23,206,2, 11,32,0,89,162,8,44,36,41,9,222,11,28,192,249,22,71,23,205,2,194, 11,11,27,28,23,195,2,23,195,2,23,194,2,27,89,162,44,37,50,62,122, 111,225,14,12,8,33,33,27,89,162,44,37,50,66,97,108,116,45,122,111,225, @@ -494,8 +494,8 @@ 1,23,199,1,23,198,1,23,196,1,23,195,1,23,194,1,20,14,159,80,159, 56,40,38,250,80,159,59,41,38,249,22,27,11,80,159,8,25,40,38,22,167, 4,11,20,14,159,80,159,56,40,38,250,80,159,59,41,38,249,22,27,11,80, -159,8,25,40,38,22,143,5,28,248,22,174,13,23,215,2,23,214,1,87,94, -23,214,1,247,22,151,14,249,247,22,156,14,248,22,72,195,23,24,87,94,23, +159,8,25,40,38,22,143,5,28,248,22,177,13,23,215,2,23,214,1,87,94, +23,214,1,247,22,154,14,249,247,22,159,14,248,22,72,195,23,24,87,94,23, 193,1,27,28,23,195,2,28,23,197,1,27,249,22,5,89,162,8,44,37,53, 9,225,24,22,19,33,38,23,216,2,27,28,23,204,2,11,193,28,192,192,28, 193,28,203,28,249,22,180,3,248,22,73,196,248,22,73,206,193,11,11,11,11, @@ -503,8 +503,8 @@ 23,208,1,23,201,1,23,200,1,23,199,1,23,196,1,23,195,1,20,14,159, 80,159,57,40,38,250,80,159,8,24,41,38,249,22,27,11,80,159,8,26,40, 38,22,167,4,23,214,1,20,14,159,80,159,57,40,38,250,80,159,8,24,41, -38,249,22,27,11,80,159,8,26,40,38,22,143,5,28,248,22,174,13,23,216, -2,23,215,1,87,94,23,215,1,247,22,151,14,249,247,22,156,14,248,22,72, +38,249,22,27,11,80,159,8,26,40,38,22,143,5,28,248,22,177,13,23,216, +2,23,215,1,87,94,23,215,1,247,22,154,14,249,247,22,159,14,248,22,72, 195,23,25,87,94,23,193,1,27,28,23,197,2,28,23,201,1,27,249,22,5, 83,158,40,20,100,94,89,162,8,44,37,51,9,225,25,23,19,33,39,23,212, 1,23,217,2,27,28,23,204,2,11,193,28,192,192,28,193,28,23,204,2,28, @@ -513,8 +513,8 @@ 23,211,1,23,210,1,23,202,1,23,200,1,23,197,1,23,196,1,20,14,159, 80,159,58,40,38,250,80,159,8,25,41,38,249,22,27,11,80,159,8,27,40, 38,22,167,4,11,20,14,159,80,159,58,40,38,250,80,159,8,25,41,38,249, -22,27,11,80,159,8,27,40,38,22,143,5,28,248,22,174,13,23,217,2,23, -216,1,87,94,23,216,1,247,22,151,14,249,247,22,141,5,248,22,72,195,23, +22,27,11,80,159,8,27,40,38,22,143,5,28,248,22,177,13,23,217,2,23, +216,1,87,94,23,216,1,247,22,154,14,249,247,22,141,5,248,22,72,195,23, 26,87,94,23,193,1,27,28,23,197,1,28,23,201,1,27,249,22,5,83,158, 40,20,100,94,89,162,8,44,37,51,9,225,26,24,21,33,40,23,214,1,23, 218,1,27,28,23,205,2,11,193,28,192,192,28,193,28,204,28,249,22,180,3, @@ -522,21 +522,21 @@ 11,87,94,23,201,1,11,28,23,193,2,87,95,23,212,1,23,198,1,20,14, 159,80,159,59,40,38,250,80,159,8,26,41,38,249,22,27,11,80,159,8,28, 40,38,22,167,4,23,216,1,20,14,159,80,159,59,40,38,250,80,159,8,26, -41,38,249,22,27,11,80,159,8,28,40,38,22,143,5,28,248,22,174,13,23, -218,2,23,217,1,87,94,23,217,1,247,22,151,14,249,247,22,141,5,248,22, +41,38,249,22,27,11,80,159,8,28,40,38,22,143,5,28,248,22,177,13,23, +218,2,23,217,1,87,94,23,217,1,247,22,154,14,249,247,22,141,5,248,22, 72,195,23,27,87,94,23,193,1,27,28,23,199,2,87,94,23,214,1,23,213, 1,87,94,23,213,1,23,214,1,20,14,159,80,159,8,24,40,38,250,80,159, 8,27,41,38,249,22,27,11,80,159,8,29,40,38,22,167,4,28,23,29,28, 23,202,1,11,195,87,94,23,202,1,11,20,14,159,80,159,8,24,40,38,250, 80,159,8,27,41,38,249,22,27,11,80,159,8,29,40,38,22,143,5,28,248, -22,174,13,23,219,2,23,218,1,87,94,23,218,1,247,22,151,14,249,247,22, +22,177,13,23,219,2,23,218,1,87,94,23,218,1,247,22,154,14,249,247,22, 141,5,194,23,28,0,17,35,114,120,34,94,40,46,42,63,41,47,40,46,42, -41,36,34,32,43,89,162,8,44,37,59,2,26,222,33,44,27,249,22,161,14, +41,36,34,32,43,89,162,8,44,37,59,2,26,222,33,44,27,249,22,164,14, 2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248,22,96,23, -196,2,27,248,22,105,23,197,1,27,249,22,161,14,2,42,23,196,2,28,23, +196,2,27,248,22,105,23,197,1,27,249,22,164,14,2,42,23,196,2,28,23, 193,2,87,94,23,194,1,249,22,71,248,22,96,23,196,2,27,248,22,105,23, -197,1,27,249,22,161,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1, -249,22,71,248,22,96,23,196,2,27,248,22,105,23,197,1,27,249,22,161,14, +197,1,27,249,22,164,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1, +249,22,71,248,22,96,23,196,2,27,248,22,105,23,197,1,27,249,22,164,14, 2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248,22,96,23, 196,2,248,2,43,248,22,105,23,197,1,248,22,81,194,248,22,81,194,248,22, 81,194,248,22,81,194,32,45,89,162,44,37,55,2,26,222,33,46,28,248,22, @@ -546,12 +546,12 @@ 22,79,248,22,73,23,195,2,249,22,7,9,248,22,72,195,91,159,38,11,90, 161,38,36,11,248,2,45,248,22,73,196,249,22,7,249,22,71,248,22,72,199, 196,195,249,22,7,249,22,71,248,22,72,199,196,195,249,22,7,249,22,71,248, -22,72,199,196,195,27,27,249,22,161,14,2,42,23,197,2,28,23,193,2,87, +22,72,199,196,195,27,27,249,22,164,14,2,42,23,197,2,28,23,193,2,87, 94,23,195,1,249,22,71,248,22,96,23,196,2,27,248,22,105,23,197,1,27, -249,22,161,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71, -248,22,96,23,196,2,27,248,22,105,23,197,1,27,249,22,161,14,2,42,23, +249,22,164,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71, +248,22,96,23,196,2,27,248,22,105,23,197,1,27,249,22,164,14,2,42,23, 196,2,28,23,193,2,87,94,23,194,1,249,22,71,248,22,96,23,196,2,27, -248,22,105,23,197,1,27,249,22,161,14,2,42,23,196,2,28,23,193,2,87, +248,22,105,23,197,1,27,249,22,164,14,2,42,23,196,2,28,23,193,2,87, 94,23,194,1,249,22,71,248,22,96,23,196,2,248,2,43,248,22,105,23,197, 1,248,22,81,194,248,22,81,194,248,22,81,194,248,22,81,195,28,23,195,1, 192,28,248,22,79,248,22,73,23,195,2,249,22,7,9,248,22,72,195,91,159, @@ -563,20 +563,20 @@ 249,22,71,248,22,72,199,196,195,87,95,28,248,22,185,4,195,12,250,22,151, 9,2,18,6,20,20,114,101,115,111,108,118,101,100,45,109,111,100,117,108,101, 45,112,97,116,104,197,28,24,193,2,248,24,194,1,195,87,94,23,193,1,12, -27,27,250,22,150,2,80,159,42,43,38,248,22,186,14,247,22,154,12,11,28, +27,27,250,22,150,2,80,159,42,43,38,248,22,189,14,247,22,157,12,11,28, 23,193,2,192,87,94,23,193,1,27,247,22,130,2,87,94,250,22,148,2,80, -159,43,43,38,248,22,186,14,247,22,154,12,195,192,250,22,148,2,195,198,66, +159,43,43,38,248,22,189,14,247,22,157,12,195,192,250,22,148,2,195,198,66, 97,116,116,97,99,104,251,211,197,198,199,10,28,192,250,22,150,9,11,196,195, 248,22,148,9,194,32,51,89,162,44,37,52,2,26,222,33,52,28,248,22,79, 248,22,73,23,195,2,249,22,7,9,248,22,72,195,91,159,38,11,90,161,38, 36,11,27,248,22,73,196,28,248,22,79,248,22,73,23,195,2,249,22,7,9, 248,22,72,195,91,159,38,11,90,161,38,36,11,248,2,51,248,22,73,196,249, 22,7,249,22,71,248,22,72,199,196,195,249,22,7,249,22,71,248,22,72,199, -196,195,32,53,89,162,8,44,37,55,2,26,222,33,54,27,249,22,161,14,2, +196,195,32,53,89,162,8,44,37,55,2,26,222,33,54,27,249,22,164,14,2, 42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248,22,96,23,196, -2,27,248,22,105,23,197,1,27,249,22,161,14,2,42,23,196,2,28,23,193, +2,27,248,22,105,23,197,1,27,249,22,164,14,2,42,23,196,2,28,23,193, 2,87,94,23,194,1,249,22,71,248,22,96,23,196,2,27,248,22,105,23,197, -1,27,249,22,161,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249, +1,27,249,22,164,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249, 22,71,248,22,96,23,196,2,248,2,53,248,22,105,23,197,1,248,22,81,194, 248,22,81,194,248,22,81,194,32,55,89,162,44,37,52,2,26,222,33,56,28, 248,22,79,248,22,73,23,195,2,249,22,7,9,248,22,72,195,91,159,38,11, @@ -584,10 +584,10 @@ 22,7,9,248,22,72,195,91,159,38,11,90,161,38,36,11,248,2,55,248,22, 73,196,249,22,7,249,22,71,248,22,72,199,196,195,249,22,7,249,22,71,248, 22,72,199,196,195,32,57,89,162,8,44,37,55,2,26,222,33,58,27,249,22, -161,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248,22, -96,23,196,2,27,248,22,105,23,197,1,27,249,22,161,14,2,42,23,196,2, +164,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248,22, +96,23,196,2,27,248,22,105,23,197,1,27,249,22,164,14,2,42,23,196,2, 28,23,193,2,87,94,23,194,1,249,22,71,248,22,96,23,196,2,27,248,22, -105,23,197,1,27,249,22,161,14,2,42,23,196,2,28,23,193,2,87,94,23, +105,23,197,1,27,249,22,164,14,2,42,23,196,2,28,23,193,2,87,94,23, 194,1,249,22,71,248,22,96,23,196,2,248,2,57,248,22,105,23,197,1,248, 22,81,194,248,22,81,194,248,22,81,194,28,249,22,181,6,194,6,1,1,46, 2,22,28,249,22,181,6,194,6,2,2,46,46,62,117,112,192,0,11,35,114, @@ -597,16 +597,16 @@ 249,22,7,9,248,22,72,195,91,159,38,11,90,161,38,36,11,248,2,61,248, 22,73,196,249,22,7,249,22,71,248,22,72,199,196,195,249,22,7,249,22,71, 248,22,72,199,196,195,32,63,89,162,8,44,37,55,2,26,222,33,64,27,249, -22,161,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248, -22,96,23,196,2,27,248,22,105,23,197,1,27,249,22,161,14,2,42,23,196, +22,164,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248, +22,96,23,196,2,27,248,22,105,23,197,1,27,249,22,164,14,2,42,23,196, 2,28,23,193,2,87,94,23,194,1,249,22,71,248,22,96,23,196,2,27,248, -22,105,23,197,1,27,249,22,161,14,2,42,23,196,2,28,23,193,2,87,94, +22,105,23,197,1,27,249,22,164,14,2,42,23,196,2,28,23,193,2,87,94, 23,194,1,249,22,71,248,22,96,23,196,2,248,2,63,248,22,105,23,197,1, 248,22,81,194,248,22,81,194,248,22,81,194,32,65,89,162,8,44,37,55,2, -26,222,33,66,27,249,22,161,14,2,42,23,196,2,28,23,193,2,87,94,23, +26,222,33,66,27,249,22,164,14,2,42,23,196,2,28,23,193,2,87,94,23, 194,1,249,22,71,248,22,96,23,196,2,27,248,22,105,23,197,1,27,249,22, -161,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248,22, -96,23,196,2,27,248,22,105,23,197,1,27,249,22,161,14,2,42,23,196,2, +164,14,2,42,23,196,2,28,23,193,2,87,94,23,194,1,249,22,71,248,22, +96,23,196,2,27,248,22,105,23,197,1,27,249,22,164,14,2,42,23,196,2, 28,23,193,2,87,94,23,194,1,249,22,71,248,22,96,23,196,2,248,2,65, 248,22,105,23,197,1,248,22,81,194,248,22,81,194,248,22,81,194,27,248,2, 65,23,195,1,192,28,249,22,183,8,248,22,73,23,200,2,23,197,1,28,249, @@ -614,9 +614,9 @@ 99,121,99,108,101,32,105,110,32,108,111,97,100,105,110,103,32,97,116,32,126, 101,58,32,126,101,23,200,1,249,22,2,22,73,248,22,86,249,22,71,23,206, 1,23,202,1,12,12,247,192,20,14,159,80,159,40,45,38,249,22,71,248,22, -186,14,247,22,154,12,23,197,1,20,14,159,80,159,40,40,38,250,80,159,43, +189,14,247,22,157,12,23,197,1,20,14,159,80,159,40,40,38,250,80,159,43, 41,38,249,22,27,11,80,159,45,40,38,22,166,4,23,196,1,249,247,22,142, -5,23,198,1,248,22,59,248,22,178,13,23,198,1,87,94,28,28,248,22,174, +5,23,198,1,248,22,59,248,22,181,13,23,198,1,87,94,28,28,248,22,177, 13,23,196,2,10,248,22,129,5,23,196,2,12,28,23,197,2,250,22,150,9, 11,6,15,15,98,97,100,32,109,111,100,117,108,101,32,112,97,116,104,23,200, 2,250,22,151,9,2,18,6,19,19,109,111,100,117,108,101,45,112,97,116,104, @@ -630,77 +630,77 @@ 12,252,212,199,200,201,202,80,158,42,50,87,94,23,193,1,27,89,162,8,44, 37,46,79,115,104,111,119,45,99,111,108,108,101,99,116,105,111,110,45,101,114, 114,223,5,33,50,27,28,248,22,56,23,198,2,27,250,22,150,2,80,159,43, -44,38,249,22,71,23,203,2,247,22,152,14,11,28,23,193,2,192,87,94,23, +44,38,249,22,71,23,203,2,247,22,155,14,11,28,23,193,2,192,87,94,23, 193,1,91,159,38,11,90,161,38,36,11,27,248,22,62,23,202,2,248,2,51, 248,2,53,23,195,1,27,251,80,159,47,54,38,2,18,23,202,1,28,248,22, 79,23,199,2,23,199,2,248,22,72,23,199,2,28,248,22,79,23,199,2,9, -248,22,73,23,199,2,249,22,128,14,23,195,1,28,248,22,79,23,197,1,87, +248,22,73,23,199,2,249,22,131,14,23,195,1,28,248,22,79,23,197,1,87, 94,23,197,1,6,8,8,109,97,105,110,46,114,107,116,249,22,134,7,23,199, 1,6,4,4,46,114,107,116,28,248,22,175,6,23,198,2,87,94,23,194,1, 27,27,28,23,200,2,28,249,22,181,8,23,202,2,80,158,43,47,80,158,41, -48,27,248,22,187,4,23,202,2,28,248,22,174,13,23,194,2,91,159,39,11, -90,161,39,36,11,248,22,131,14,23,197,1,87,95,83,160,38,11,80,158,45, +48,27,248,22,187,4,23,202,2,28,248,22,177,13,23,194,2,91,159,39,11, +90,161,39,36,11,248,22,134,14,23,197,1,87,95,83,160,38,11,80,158,45, 47,23,204,2,83,160,38,11,80,158,45,48,192,192,11,11,28,23,193,2,192, 87,94,23,193,1,27,247,22,143,5,28,23,193,2,192,87,94,23,193,1,247, -22,151,14,27,250,22,150,2,80,159,44,44,38,249,22,71,23,204,2,23,199, +22,154,14,27,250,22,150,2,80,159,44,44,38,249,22,71,23,204,2,23,199, 2,11,28,23,193,2,192,87,94,23,193,1,91,159,38,11,90,161,38,36,11, -248,2,55,248,2,57,23,203,2,250,22,1,22,128,14,23,199,1,249,22,85, +248,2,55,248,2,57,23,203,2,250,22,1,22,131,14,23,199,1,249,22,85, 249,22,2,32,0,89,162,8,44,37,44,9,222,33,59,23,200,1,248,22,81, 27,248,22,178,6,23,202,2,28,249,22,180,3,194,39,28,249,22,181,6,2, 28,249,22,133,7,204,249,22,168,3,198,39,249,22,134,7,250,22,133,7,205, -36,249,22,168,3,199,39,2,29,200,200,28,248,22,174,13,23,198,2,87,94, -23,194,1,28,248,22,133,14,23,198,2,91,159,39,11,90,161,39,36,11,248, -22,131,14,23,201,2,87,95,23,195,1,23,193,1,28,249,22,161,14,2,60, -248,22,179,13,23,197,1,249,80,159,44,53,38,23,202,2,2,30,23,200,2, +36,249,22,168,3,199,39,2,29,200,200,28,248,22,177,13,23,198,2,87,94, +23,194,1,28,248,22,136,14,23,198,2,91,159,39,11,90,161,39,36,11,248, +22,134,14,23,201,2,87,95,23,195,1,23,193,1,28,249,22,164,14,2,60, +248,22,182,13,23,197,1,249,80,159,44,53,38,23,202,2,2,30,23,200,2, 248,22,81,6,26,26,32,40,97,32,112,97,116,104,32,109,117,115,116,32,98, 101,32,97,98,115,111,108,117,116,101,41,28,249,22,181,8,248,22,72,23,200, 2,2,27,27,250,22,150,2,80,159,43,44,38,249,22,71,23,203,2,247,22, -152,14,11,28,23,193,2,192,87,94,23,193,1,91,159,39,11,90,161,38,36, +155,14,11,28,23,193,2,192,87,94,23,193,1,91,159,39,11,90,161,38,36, 11,27,248,22,96,23,203,2,248,2,61,248,2,63,23,195,1,90,161,37,38, -11,28,248,22,79,248,22,98,23,203,2,28,248,22,79,23,194,2,249,22,165, +11,28,248,22,79,248,22,98,23,203,2,28,248,22,79,23,194,2,249,22,168, 14,0,8,35,114,120,34,91,46,93,34,23,196,2,11,10,27,27,28,23,197, 2,249,22,85,28,248,22,79,248,22,98,23,207,2,21,93,6,5,5,109,122, 108,105,98,249,22,1,22,85,249,22,2,32,0,89,162,8,44,37,44,9,222, 33,67,248,22,98,23,210,2,23,197,2,28,248,22,79,23,196,2,248,22,81, 23,197,2,23,195,2,251,80,159,49,54,38,2,18,23,204,1,248,22,72,23, -198,2,248,22,73,23,198,1,249,22,128,14,23,195,1,28,23,198,1,87,94, +198,2,248,22,73,23,198,1,249,22,131,14,23,195,1,28,23,198,1,87,94, 23,196,1,27,248,22,178,6,23,199,2,28,249,22,180,3,194,39,28,249,22, 181,6,2,28,249,22,133,7,201,249,22,168,3,198,39,249,22,134,7,250,22, 133,7,202,36,249,22,168,3,199,39,2,29,197,197,28,248,22,79,23,197,1, -87,94,23,197,1,6,8,8,109,97,105,110,46,114,107,116,28,249,22,165,14, +87,94,23,197,1,6,8,8,109,97,105,110,46,114,107,116,28,249,22,168,14, 0,8,35,114,120,34,91,46,93,34,23,199,2,27,248,22,178,6,23,199,2, 28,249,22,180,3,194,39,28,249,22,181,6,2,28,249,22,133,7,201,249,22, 168,3,198,39,249,22,134,7,250,22,133,7,202,36,249,22,168,3,199,39,2, 29,197,197,249,22,134,7,23,199,1,6,4,4,46,114,107,116,28,249,22,181, -8,248,22,72,23,200,2,64,102,105,108,101,27,249,22,135,14,248,22,139,14, +8,248,22,72,23,200,2,64,102,105,108,101,27,249,22,138,14,248,22,142,14, 248,22,96,23,202,2,27,28,23,202,2,28,249,22,181,8,23,204,2,80,158, -45,47,80,158,43,48,27,248,22,187,4,23,204,2,28,248,22,174,13,23,194, -2,91,159,39,11,90,161,39,36,11,248,22,131,14,23,197,1,87,95,83,160, +45,47,80,158,43,48,27,248,22,187,4,23,204,2,28,248,22,177,13,23,194, +2,91,159,39,11,90,161,39,36,11,248,22,134,14,23,197,1,87,95,83,160, 38,11,80,158,47,47,23,206,2,83,160,38,11,80,158,47,48,192,192,11,11, 28,23,193,2,192,87,94,23,193,1,27,247,22,143,5,28,23,193,2,192,87, -94,23,193,1,247,22,151,14,91,159,39,11,90,161,39,36,11,248,22,131,14, -23,197,2,87,95,23,195,1,23,193,1,28,249,22,161,14,2,60,248,22,179, +94,23,193,1,247,22,154,14,91,159,39,11,90,161,39,36,11,248,22,134,14, +23,197,2,87,95,23,195,1,23,193,1,28,249,22,164,14,2,60,248,22,182, 13,23,197,1,249,80,159,45,53,38,23,198,1,2,30,195,12,87,94,28,28, -248,22,174,13,23,194,2,10,248,22,133,8,23,194,2,87,94,23,199,1,12, +248,22,177,13,23,194,2,10,248,22,133,8,23,194,2,87,94,23,199,1,12, 28,23,199,2,250,22,150,9,67,114,101,113,117,105,114,101,249,22,159,7,6, 17,17,98,97,100,32,109,111,100,117,108,101,32,112,97,116,104,126,97,28,23, 198,2,248,22,72,23,199,2,6,0,0,23,202,1,87,94,23,199,1,250,22, 151,9,2,18,249,22,159,7,6,13,13,109,111,100,117,108,101,32,112,97,116, 104,126,97,28,23,198,2,248,22,72,23,199,2,6,0,0,23,200,2,27,28, -248,22,133,8,23,195,2,249,22,138,8,23,196,2,36,249,22,137,14,248,22, -138,14,23,197,2,11,27,28,248,22,133,8,23,196,2,249,22,138,8,23,197, +248,22,133,8,23,195,2,249,22,138,8,23,196,2,36,249,22,140,14,248,22, +141,14,23,197,2,11,27,28,248,22,133,8,23,196,2,249,22,138,8,23,197, 2,37,248,80,159,42,55,38,23,195,2,91,159,39,11,90,161,39,36,11,28, 248,22,133,8,23,199,2,250,22,7,2,31,249,22,138,8,23,203,2,38,2, -31,248,22,131,14,23,198,2,87,95,23,195,1,23,193,1,27,28,248,22,133, +31,248,22,134,14,23,198,2,87,95,23,195,1,23,193,1,27,28,248,22,133, 8,23,200,2,249,22,138,8,23,201,2,39,249,80,159,47,53,38,23,197,2, 5,0,27,28,248,22,133,8,23,201,2,249,22,138,8,23,202,2,40,248,22, -186,4,23,200,2,27,27,250,22,150,2,80,159,51,43,38,248,22,186,14,247, -22,154,12,11,28,23,193,2,192,87,94,23,193,1,27,247,22,130,2,87,94, -250,22,148,2,80,159,52,43,38,248,22,186,14,247,22,154,12,195,192,87,95, +186,4,23,200,2,27,27,250,22,150,2,80,159,51,43,38,248,22,189,14,247, +22,157,12,11,28,23,193,2,192,87,94,23,193,1,27,247,22,130,2,87,94, +250,22,148,2,80,159,52,43,38,248,22,189,14,247,22,157,12,195,192,87,95, 28,23,208,1,27,250,22,150,2,23,197,2,197,11,28,23,193,1,12,87,95, 27,27,28,248,22,17,80,159,51,46,38,80,159,50,46,38,247,22,19,250,22, -25,248,22,23,23,197,2,80,159,53,45,38,23,196,1,27,248,22,186,14,247, -22,154,12,249,22,3,83,158,40,20,100,94,89,162,8,44,37,55,9,226,12, +25,248,22,23,23,197,2,80,159,53,45,38,23,196,1,27,248,22,189,14,247, +22,157,12,249,22,3,83,158,40,20,100,94,89,162,8,44,37,55,9,226,12, 11,2,3,33,68,23,195,1,23,196,1,248,28,248,22,17,80,159,50,46,38, 32,0,89,162,44,37,42,9,222,33,69,80,159,49,59,37,89,162,44,36,51, 9,227,13,9,8,4,3,33,70,250,22,148,2,23,197,1,197,10,12,28,28, @@ -709,14 +709,14 @@ 2,27,11,250,22,148,2,80,159,50,44,38,28,248,22,175,6,23,209,2,249, 22,71,23,210,1,27,28,23,212,2,28,249,22,181,8,23,214,2,80,158,55, 47,87,94,23,212,1,80,158,53,48,27,248,22,187,4,23,214,2,28,248,22, -174,13,23,194,2,91,159,39,11,90,161,39,36,11,248,22,131,14,23,197,1, +177,13,23,194,2,91,159,39,11,90,161,39,36,11,248,22,134,14,23,197,1, 87,95,83,160,38,11,80,158,57,47,23,23,83,160,38,11,80,158,57,48,192, 192,11,11,28,23,193,2,192,87,94,23,193,1,27,247,22,143,5,28,23,193, -2,192,87,94,23,193,1,247,22,151,14,249,22,71,23,210,1,247,22,152,14, +2,192,87,94,23,193,1,247,22,154,14,249,22,71,23,210,1,247,22,155,14, 252,22,135,8,23,208,1,23,207,1,23,205,1,23,203,1,201,12,193,87,96, 83,160,38,11,80,158,36,50,248,80,159,37,58,38,249,22,27,11,80,159,39, 52,38,248,22,165,4,80,159,37,51,38,248,22,142,5,80,159,37,37,37,248, -22,145,13,80,159,37,42,37,83,160,38,11,80,158,36,50,248,80,159,37,58, +22,148,13,80,159,37,42,37,83,160,38,11,80,158,36,50,248,80,159,37,58, 38,249,22,27,11,80,159,39,52,38,159,36,20,105,159,36,16,1,11,16,0, 83,158,42,20,103,145,2,1,2,1,29,11,11,11,11,11,10,38,80,158,36, 36,20,105,159,37,16,23,2,2,2,3,30,2,5,72,112,97,116,104,45,115, diff --git a/src/racket/src/mzmark.c b/src/racket/src/mzmark.c index adc252cbf6..01a7bfc361 100644 --- a/src/racket/src/mzmark.c +++ b/src/racket/src/mzmark.c @@ -3404,6 +3404,7 @@ static int place_async_channel_val_SIZE(void *p, struct NewGC *gc) { static int place_async_channel_val_MARK(void *p, struct NewGC *gc) { Scheme_Place_Async_Channel *pac = (Scheme_Place_Async_Channel *)p; int i; + gcMARK2(pac->msgs, gc); for (i = pac->size; i--; ) gcMARK2(pac->msgs[i], gc); @@ -3414,6 +3415,7 @@ static int place_async_channel_val_MARK(void *p, struct NewGC *gc) { static int place_async_channel_val_FIXUP(void *p, struct NewGC *gc) { Scheme_Place_Async_Channel *pac = (Scheme_Place_Async_Channel *)p; int i; + gcFIXUP2(pac->msgs, gc); for (i = pac->size; i--; ) gcFIXUP2(pac->msgs[i], gc); @@ -3834,6 +3836,7 @@ static int mark_print_params_MARK(void *p, struct NewGC *gc) { gcMARK2(pp->print_port, gc); gcMARK2(pp->print_buffer, gc); gcMARK2(pp->depth_delta, gc); + gcMARK2(pp->uq_ht, gc); return gcBYTES_TO_WORDS(sizeof(PrintParams)); } @@ -3844,6 +3847,7 @@ static int mark_print_params_FIXUP(void *p, struct NewGC *gc) { gcFIXUP2(pp->print_port, gc); gcFIXUP2(pp->print_buffer, gc); gcFIXUP2(pp->depth_delta, gc); + gcFIXUP2(pp->uq_ht, gc); return gcBYTES_TO_WORDS(sizeof(PrintParams)); } diff --git a/src/racket/src/mzmarksrc.c b/src/racket/src/mzmarksrc.c index 989a484072..2397b5419e 100644 --- a/src/racket/src/mzmarksrc.c +++ b/src/racket/src/mzmarksrc.c @@ -1564,6 +1564,7 @@ mark_print_params { gcMARK2(pp->print_port, gc); gcMARK2(pp->print_buffer, gc); gcMARK2(pp->depth_delta, gc); + gcMARK2(pp->uq_ht, gc); size: gcBYTES_TO_WORDS(sizeof(PrintParams)); } diff --git a/src/racket/src/portfun.c b/src/racket/src/portfun.c index e0dcf9f082..45af607608 100644 --- a/src/racket/src/portfun.c +++ b/src/racket/src/portfun.c @@ -3697,8 +3697,10 @@ static Scheme_Object *sch_default_global_port_print_handler(int argc, Scheme_Obj { if (!SCHEME_OUTPUT_PORTP(argv[1])) scheme_wrong_type("default-global-port-print-handler", "output-port", 1, argc, argv); - if ((argc > 2) && !scheme_nonneg_exact_p(argv[2])) - scheme_wrong_type("default-global-port-print-handler", "non-negative exact integer", + if ((argc > 2) + && !SAME_OBJ(argv[2], scheme_make_integer(0)) + && !SAME_OBJ(argv[2], scheme_make_integer(1))) + scheme_wrong_type("default-global-port-print-handler", "0 or 1", 2, argc, argv); if (argc == 2) { @@ -3772,8 +3774,9 @@ display_write(char *name, if (argc > 2) { h = argv[2]; - if (!scheme_nonneg_exact_p(h)) - scheme_wrong_type(name, "non-negative exact integer", 2, argc, argv); + if (!SAME_OBJ(h, scheme_make_integer(0)) + && !SAME_OBJ(h, scheme_make_integer(1))) + scheme_wrong_type(name, "0 or 1", 2, argc, argv); } else h = scheme_make_integer(0); diff --git a/src/racket/src/print.c b/src/racket/src/print.c index d452d64dfd..26a505b7b6 100644 --- a/src/racket/src/print.c +++ b/src/racket/src/print.c @@ -95,6 +95,7 @@ typedef struct Scheme_Print_Params { Scheme_Object *print_port; mz_jmp_buf *print_escape; Scheme_Object *depth_delta; /* for large qq depth */ + Scheme_Hash_Table *uq_ht; } PrintParams; #ifdef MZ_PRECISE_GC @@ -475,8 +476,12 @@ static Scheme_Object *check_cycle_k(void) #endif static int check_cycles(Scheme_Object *obj, int for_write, Scheme_Hash_Table *ht, PrintParams *pp) +/* Results: 0x2 = cycle bit + 0x1 = unquote bit */ { Scheme_Type t; + Scheme_Object *val; + int res, res2; #ifdef DO_STACK_CHECK { @@ -507,17 +512,27 @@ static int check_cycles(Scheme_Object *obj, int for_write, Scheme_Hash_Table *ht || (pp->print_hash_table && (SAME_TYPE(t, scheme_hash_table_type) || SAME_TYPE(t, scheme_hash_tree_type)))) { - if (scheme_hash_get(ht, obj)) - return 1; - scheme_hash_set(ht, obj, (Scheme_Object *)0x1); + val = scheme_hash_get(ht, obj); + if (val) + return SCHEME_INT_VAL(val); + scheme_hash_set(ht, obj, scheme_make_integer(0x2)); } else return 0; - - if (SCHEME_PAIRP(obj) || SCHEME_MUTABLE_PAIRP(obj)) { - if (check_cycles(SCHEME_CAR(obj), for_write, ht, pp)) - return 1; - if (check_cycles(SCHEME_CDR(obj), for_write, ht, pp)) - return 1; + + if (SCHEME_PAIRP(obj)) { + res = check_cycles(SCHEME_CAR(obj), for_write, ht, pp); + if ((for_write < 3) && res) + return res; + res2 = check_cycles(SCHEME_CDR(obj), for_write, ht, pp); + res |= res2; + } else if (SCHEME_MUTABLE_PAIRP(obj)) { + res = check_cycles(SCHEME_CAR(obj), for_write, ht, pp); + if ((for_write < 3) && res) + return res; + res2 = check_cycles(SCHEME_CDR(obj), for_write, ht, pp); + res |= res2; + if (for_write >= 3) + res |= 0x1; /* always escape for qq printing */ } else if (SCHEME_CHAPERONE_BOXP(obj)) { /* got here => printable */ Scheme_Object *v; @@ -525,8 +540,7 @@ static int check_cycles(Scheme_Object *obj, int for_write, Scheme_Hash_Table *ht v = SCHEME_BOX_VAL(obj); else v = scheme_unbox(obj); - if (check_cycles(v, for_write, ht, pp)) - return 1; + res = check_cycles(v, for_write, ht, pp); } else if (SCHEME_CHAPERONE_VECTORP(obj)) { int i, len; Scheme_Object *v; @@ -535,29 +549,47 @@ static int check_cycles(Scheme_Object *obj, int for_write, Scheme_Hash_Table *ht len = SCHEME_VEC_SIZE(obj); else len = SCHEME_VEC_SIZE(SCHEME_CHAPERONE_VAL(obj)); + res = 0; for (i = 0; i < len; i++) { if (SCHEME_VECTORP(obj)) v = SCHEME_VEC_ELS(obj)[i]; else v = scheme_chaperone_vector_ref(obj, i); - if (check_cycles(v, for_write, ht, pp)) { - return 1; - } + res2 = check_cycles(v, for_write, ht, pp); + res |= res2; + if ((for_write < 3) && res) + return res; } } else if (SAME_TYPE(t, scheme_structure_type) || SAME_TYPE(t, scheme_proc_struct_type)) { - if (scheme_is_writable_struct(obj)) { - if (check_cycles(writable_struct_subs(obj, for_write, pp), for_write, ht, pp)) - return 1; + if (scheme_is_print_as_constructor_struct(obj)) { + /* Struct wants to be unquoted. */ + if (pp->print_unreadable) { + res = check_cycles(writable_struct_subs(obj, for_write, pp), for_write, ht, pp); + if (for_write >= 3) + res |= 0x1; + } else + res = 0; + } else if (scheme_is_writable_struct(obj)) { + /* A "writeable" struct can be quoted or not. */ + if (pp->print_unreadable) + res = check_cycles(writable_struct_subs(obj, for_write, pp), for_write, ht, pp); + else + res = 0; } else { /* got here => printable */ int i = SCHEME_STRUCT_NUM_SLOTS(obj); + if ((for_write >= 3) && !SCHEME_PREFABP(obj)) + res = 0x1; + else + res = 0; while (i--) { if (scheme_inspector_sees_part(obj, pp->inspector, i)) { - if (check_cycles(((Scheme_Structure *)obj)->slots[i], for_write, ht, pp)) { - return 1; - } + res2 = check_cycles(((Scheme_Structure *)obj)->slots[i], for_write, ht, pp); + res |= res2; + if ((for_write < 3) && res) + return res; } } } @@ -574,6 +606,7 @@ static int check_cycles(Scheme_Object *obj, int for_write, Scheme_Hash_Table *ht keys = t->keys; vals = t->vals; + res = 0; for (i = 0; i < t->size; i++) { if (vals[i]) { key = keys[i]; @@ -582,10 +615,14 @@ static int check_cycles(Scheme_Object *obj, int for_write, Scheme_Hash_Table *ht else val = vals[i]; if (val) { - if (check_cycles(key, for_write, ht, pp)) - return 1; - if (check_cycles(val, for_write, ht, pp)) - return 1; + res2 = check_cycles(key, for_write, ht, pp); + res |= res2; + if ((for_write < 3) && res) + return res; + res2 = check_cycles(val, for_write, ht, pp); + res |= res2; + if ((for_write < 3) && res) + return res; } } } @@ -600,31 +637,42 @@ static int check_cycles(Scheme_Object *obj, int for_write, Scheme_Hash_Table *ht else t = (Scheme_Hash_Tree *)obj; + res = 0; i = scheme_hash_tree_next(t, -1); while (i != -1) { scheme_hash_tree_index(t, i, &key, &val); if (!SAME_OBJ((Scheme_Object *)t, obj)) val = scheme_chaperone_hash_traversal_get(obj, key); - if (check_cycles(key, for_write, ht, pp)) - return 1; - if (check_cycles(val, for_write, ht, pp)) - return 1; + res2 = check_cycles(key, for_write, ht, pp); + res |= res2; + if ((for_write < 3) && res) + return res; + res2 = check_cycles(val, for_write, ht, pp); + res |= res2; + if ((for_write < 3) && res) + return res; i = scheme_hash_tree_next(t, i); } - } + } else + res = 0; - scheme_hash_set(ht, obj, NULL); + scheme_hash_set(ht, obj, scheme_make_integer(res)); - return 0; + return res; } /* The fast cycle-checker plays a dangerous game: it changes type tags. No GCs can occur here, and no thread switches. If the fast version takes to long, we back out to the general case. (We don't - even check for stack overflow, so keep the max limit low.) */ + even check for stack overflow, so keep the max limit low.) + + A 0 result means no cycles, a 1 result means cycles, and a -1 result + means "unknown" (i.e., try slow path). When write is >= 3 (implying + qq-based printing), then a 0 result also implies that no expression + escapes are needed. */ #if !defined(MZ_USE_PLACES) -static int check_cycles_fast(Scheme_Object *obj, PrintParams *pp, int *fast_checker_counter) +static int check_cycles_fast(Scheme_Object *obj, PrintParams *pp, int *fast_checker_counter, int write) XFORM_SKIP_PROC { Scheme_Type t; @@ -637,15 +685,23 @@ static int check_cycles_fast(Scheme_Object *obj, PrintParams *pp, int *fast_chec if ((*fast_checker_counter)-- < 0) return -1; - if (SCHEME_PAIRP(obj) || SCHEME_MUTABLE_PAIRP(obj)) { + if (SCHEME_PAIRP(obj) || ((write < 3) && SCHEME_MUTABLE_PAIRP(obj))) { obj->type = -t; - cycle = check_cycles_fast(SCHEME_CAR(obj), pp, fast_checker_counter); + cycle = check_cycles_fast(SCHEME_CAR(obj), pp, fast_checker_counter, write); if (!cycle) - cycle = check_cycles_fast(SCHEME_CDR(obj), pp, fast_checker_counter); + cycle = check_cycles_fast(SCHEME_CDR(obj), pp, fast_checker_counter, write); + obj->type = t; + } else if (SCHEME_MUTABLE_PAIRP(obj)) { + if (write >= 3) + return -1; + obj->type = -t; + cycle = check_cycles_fast(SCHEME_CAR(obj), pp, fast_checker_counter, write); + if (!cycle) + cycle = check_cycles_fast(SCHEME_CDR(obj), pp, fast_checker_counter, write); obj->type = t; } else if (pp->print_box && SCHEME_BOXP(obj)) { obj->type = -t; - cycle = check_cycles_fast(SCHEME_BOX_VAL(obj), pp, fast_checker_counter); + cycle = check_cycles_fast(SCHEME_BOX_VAL(obj), pp, fast_checker_counter, write); obj->type = t; } else if (SCHEME_VECTORP(obj)) { int i, len; @@ -653,7 +709,7 @@ static int check_cycles_fast(Scheme_Object *obj, PrintParams *pp, int *fast_chec obj->type = -t; len = SCHEME_VEC_SIZE(obj); for (i = 0; i < len; i++) { - cycle = check_cycles_fast(SCHEME_VEC_ELS(obj)[i], pp, fast_checker_counter); + cycle = check_cycles_fast(SCHEME_VEC_ELS(obj)[i], pp, fast_checker_counter, write); if (cycle) break; } @@ -668,11 +724,14 @@ static int check_cycles_fast(Scheme_Object *obj, PrintParams *pp, int *fast_chec cycle = -1; } else if (pp->print_struct && PRINTABLE_STRUCT(obj, pp)) { int i = SCHEME_STRUCT_NUM_SLOTS(obj); + + if ((write >= 3) && !SCHEME_PREFABP(obj)) + return -1; obj->type = -t; while (i--) { if (scheme_inspector_sees_part(obj, pp->inspector, i)) { - cycle = check_cycles_fast(((Scheme_Structure *)obj)->slots[i], pp, fast_checker_counter); + cycle = check_cycles_fast(((Scheme_Structure *)obj)->slots[i], pp, fast_checker_counter, write); if (cycle) break; } @@ -890,6 +949,7 @@ print_to_string(Scheme_Object *obj, Scheme_Object *qq_depth) { Scheme_Hash_Table * volatile ht; + Scheme_Hash_Table *uq_ht; Scheme_Object *v; char *ca; int cycles; @@ -994,19 +1054,22 @@ print_to_string(Scheme_Object *obj, params.inspector = v; } - if (params.print_graph) + uq_ht = NULL; + + if (params.print_graph && (write < 3)) cycles = 1; else { #ifdef MZ_USE_PLACES cycles = -1; #else int fast_checker_counter = 50; - cycles = check_cycles_fast(obj, (PrintParams *)¶ms, &fast_checker_counter); + cycles = check_cycles_fast(obj, (PrintParams *)¶ms, &fast_checker_counter, write); #endif - if (cycles == -1) { - ht = scheme_make_hash_table(SCHEME_hash_ptr); - cycles = check_cycles(obj, write, ht, (PrintParams *)¶ms); - } + if ((cycles == -1) || (cycles && (write >= 3))) { + uq_ht = scheme_make_hash_table(SCHEME_hash_ptr); + cycles = check_cycles(obj, write, uq_ht, (PrintParams *)¶ms); + } else if (!cycles && params.print_graph) + cycles = 1; } if (cycles) @@ -1019,6 +1082,8 @@ print_to_string(Scheme_Object *obj, else params.print_escape = NULL; + params.uq_ht = uq_ht; + if ((maxl <= PRINT_MAXLEN_MIN) || !scheme_setjmp(escape)) print(obj, write, 0, ht, NULL, (PrintParams *)¶ms); @@ -1654,22 +1719,35 @@ static void always_scheme(PrintParams *pp, int reset) } } -static int to_quoted(PrintParams *pp, int notdisplay, const char *quote) +static int to_quoted(Scheme_Object *obj, PrintParams *pp, int notdisplay) { if (notdisplay == 3) { - print_utf8_string(pp, quote, 0, 1); - return notdisplay + 1; + if (!obj || !pp->uq_ht) + obj = scheme_make_integer(0); + else { + obj = scheme_hash_get(pp->uq_ht, obj); + if (!obj) obj = scheme_make_integer(0); + } + + if (!(SCHEME_INT_VAL(obj) & 0x1)) { + print_utf8_string(pp, "'", 0, 1); + return notdisplay + 1; + } else + return notdisplay; } else return notdisplay; } -static int to_unquoted(PrintParams *pp, int notdisplay) +static int is_graph_point(Scheme_Hash_Table *ht, Scheme_Object *obj) { - while (notdisplay > 3) { - print_utf8_string(pp, ",", 0, 1); - --notdisplay; - } - return notdisplay; + if (ht) { + long v; + v = (long)scheme_hash_get(ht, obj); + if ((v == 0) || (v == 1)) + return 0; + return 1; + } else + return 0; } static int @@ -1841,14 +1919,8 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, if (notdisplay >= 3) { if (SAME_OBJ(qq_ellipses, obj)) { /* no quoting */ - } else if (notdisplay == 4) { - if (SAME_OBJ(obj, unquote_symbol) - || SAME_OBJ(obj, unquote_splicing_symbol)) - print_utf8_string(pp, ",'", 0, 2); - else - notdisplay = to_quoted(pp, notdisplay, "'"); } else - notdisplay = to_quoted(pp, notdisplay, "'"); + notdisplay = to_quoted(NULL, pp, notdisplay); } if (is_kw) @@ -1976,7 +2048,7 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, if (compact) { print_compact(pp, CPT_NULL); } else { - notdisplay = to_quoted(pp, notdisplay, "'"); + notdisplay = to_quoted(NULL, pp, notdisplay); if (pp->honu_mode) print_utf8_string(pp, "null", 0, 4); else @@ -1986,13 +2058,12 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, } else if (SCHEME_PAIRP(obj)) { - notdisplay = to_quoted(pp, notdisplay, "`"); + notdisplay = to_quoted(obj, pp, notdisplay); print_pair(obj, notdisplay, compact, ht, mt, pp, scheme_pair_type, !pp->print_pair_curly, 0); closed = 1; } else if (SCHEME_MUTABLE_PAIRP(obj)) { - notdisplay = to_quoted(pp, notdisplay, "`"); if (compact || !pp->print_unreadable) cannot_print(pp, notdisplay, obj, ht, compact); print_pair(obj, notdisplay, compact, ht, mt, pp, scheme_mutable_pair_type, !pp->print_mpair_curly, 0); @@ -2000,7 +2071,7 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, } else if (SCHEME_CHAPERONE_VECTORP(obj)) { - notdisplay = to_quoted(pp, notdisplay, "`"); + notdisplay = to_quoted(obj, pp, notdisplay); print_vector(obj, notdisplay, compact, ht, mt, pp, 0); closed = 1; } @@ -2014,14 +2085,19 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, print_compact(pp, CPT_BOX); else { always_scheme(pp, 1); - notdisplay = to_quoted(pp, notdisplay, "`"); - print_utf8_string(pp, "#&", 0, 2); + notdisplay = to_quoted(obj, pp, notdisplay); + if (notdisplay == 3) + print_utf8_string(pp, "(box ", 0, 5); + else + print_utf8_string(pp, "#&", 0, 2); } if (SCHEME_BOXP(obj)) content = SCHEME_BOX_VAL(obj); else content = scheme_unbox(obj); closed = print(content, notdisplay, compact, ht, mt, pp); + if (notdisplay == 3) + print_utf8_string(pp, ")", 0, 1); } } else if ((compact || pp->print_hash_table) @@ -2048,8 +2124,11 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, print_compact_number(pp, 0); } else { always_scheme(pp, 1); - notdisplay = to_quoted(pp, notdisplay, "`"); - print_utf8_string(pp, "#hash", 0, 5); + notdisplay = to_quoted(obj, pp, notdisplay); + if (notdisplay == 3) + print_utf8_string(pp, "(hash ", 0, 6); + else + print_utf8_string(pp, "#hash", 0, 5); if (SCHEME_HASHTP(obj)) { if (!scheme_is_hash_table_equal(obj)) { if (scheme_is_hash_table_eqv(obj)) @@ -2065,7 +2144,8 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, print_utf8_string(pp, "eq", 0, 2); } } - print_utf8_string(pp, "(", 0, 1); + if (notdisplay != 3) + print_utf8_string(pp, "(", 0, 1); } if (SCHEME_HASHTP(obj)) { @@ -2108,21 +2188,28 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, if (!compact) { if (did_one) print_utf8_string(pp, " ", 0, 1); - print_utf8_string(pp, "(", 0, 1); + if (notdisplay != 3) + print_utf8_string(pp, "(", 0, 1); } print(key, notdisplay, compact, ht, mt, pp); - if (!compact) - print_utf8_string(pp, " . ", 0, 3); + if (!compact) { + if (notdisplay == 3) + print_utf8_string(pp, " ", 0, 1); + else + print_utf8_string(pp, " . ", 0, 3); + } print(val, notdisplay, compact, ht, mt, pp); - if (!compact) + if (!compact && (notdisplay != 3)) print_utf8_string(pp, ")", 0, 1); did_one++; } } } - if (!compact) + if (!compact && (notdisplay != 3)) print_utf8_string(pp, ")", 0, 1); + if (notdisplay == 3) + print_utf8_string(pp, ")", 0, 1); closed = 1; } @@ -2167,6 +2254,8 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, } else if (compact || !pp->print_unreadable) { cannot_print(pp, notdisplay, obj, ht, compact); } else if (scheme_is_writable_struct(obj)) { + if ((notdisplay == 3) && !scheme_is_print_as_constructor_struct(obj)) + notdisplay = to_quoted(obj, pp, notdisplay); custom_write_struct(obj, ht, mt, pp, notdisplay); } else { int pb; @@ -2177,16 +2266,15 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, Scheme_Object *vec, *prefab; prefab = ((Scheme_Structure *)obj)->stype->prefab_key; vec = scheme_struct_to_vector(obj, (notdisplay >= 3) ? qq_ellipses : NULL, pp->inspector); - if ((notdisplay >= 3) && !prefab) { - notdisplay = to_unquoted(pp, notdisplay); + if (prefab) + notdisplay = to_quoted(obj, pp, notdisplay); + if (notdisplay == 3) { vec = scheme_vector_to_list(vec); vec = scheme_make_pair(scheme_object_name(obj), SCHEME_CDR(vec)); print_pair(vec, notdisplay, compact, ht, mt, pp, scheme_pair_type, !pp->print_pair_curly, 1); } else { - if (prefab) { + if (prefab) SCHEME_VEC_ELS(vec)[0] = SCHEME_CDR(prefab); - notdisplay = to_quoted(pp, notdisplay, "`"); - } print_vector(vec, notdisplay, compact, ht, mt, pp, !!prefab); } closed = 1; @@ -3195,7 +3283,7 @@ static int is_special_reader_form(PrintParams *pp, int notdisplay, Scheme_Object { Scheme_Object *v; - if (notdisplay && pp->print_reader) { + if (notdisplay && (notdisplay != 3) && pp->print_reader) { v = SCHEME_CAR(p); p = SCHEME_CDR(p); if (!SCHEME_PAIRP(p)) return 0; @@ -3204,8 +3292,8 @@ static int is_special_reader_form(PrintParams *pp, int notdisplay, Scheme_Object if (SCHEME_SYMBOLP(v)) { if (SAME_OBJ(v, quote_symbol) || SAME_OBJ(v, quasiquote_symbol) - || (SAME_OBJ(v, unquote_symbol) && (notdisplay != 4)) - || (SAME_OBJ(v, unquote_splicing_symbol) && (notdisplay != 4)) + || SAME_OBJ(v, unquote_symbol) + || SAME_OBJ(v, unquote_splicing_symbol) || SAME_OBJ(v, syntax_symbol) || SAME_OBJ(v, quasisyntax_symbol) || SAME_OBJ(v, unsyntax_symbol) @@ -3217,7 +3305,7 @@ static int is_special_reader_form(PrintParams *pp, int notdisplay, Scheme_Object return 0; } -static int print_special_reader_form(Scheme_Object *v, PrintParams *pp, int notdisplay) +static void print_special_reader_form(Scheme_Object *v, PrintParams *pp, int notdisplay) { const char *str; int len; @@ -3228,15 +3316,12 @@ static int print_special_reader_form(Scheme_Object *v, PrintParams *pp, int notd } else if (SAME_OBJ(v, quasiquote_symbol)) { str = "`"; len = 1; - notdisplay++; } else if (SAME_OBJ(v, unquote_symbol)) { str = ","; len = 1; - --notdisplay; } else if (SAME_OBJ(v, unquote_splicing_symbol)) { str = ",@"; len = 2; - --notdisplay; } else if (SAME_OBJ(v, syntax_symbol)) { str = "#'"; len = 2; @@ -3255,8 +3340,6 @@ static int print_special_reader_form(Scheme_Object *v, PrintParams *pp, int notd } print_utf8_string(pp, str, 0, len); - - return notdisplay; } static void @@ -3276,7 +3359,7 @@ print_pair(Scheme_Object *pair, int notdisplay, int compact, pr = pair; while (SAME_TYPE(SCHEME_TYPE(pr), pair_type)) { if (ht) - if ((long)scheme_hash_get(ht, pr) != 1) { + if (is_graph_point(ht, pr)) { c = -1; break; } @@ -3303,7 +3386,7 @@ print_pair(Scheme_Object *pair, int notdisplay, int compact, cdr = SCHEME_CDR(pair); while (SAME_TYPE(SCHEME_TYPE(cdr), pair_type)) { if (ht) { - if ((long)scheme_hash_get(ht, cdr) != 1) { + if (is_graph_point(ht, cdr)) { /* This needs a tag */ break; } @@ -3330,7 +3413,7 @@ print_pair(Scheme_Object *pair, int notdisplay, int compact, while (SAME_TYPE(SCHEME_TYPE(cdr), pair_type)) { print_utf8_string(pp, ", ", 0, 2); if (ht) { - if ((long)scheme_hash_get(ht, cdr) != 1) { + if (is_graph_point(ht, cdr)) { /* This needs a tag */ (void)print(cdr, notdisplay, compact, ht, mt, pp); break; @@ -3355,13 +3438,28 @@ print_pair(Scheme_Object *pair, int notdisplay, int compact, if (!super_compact) print_compact(pp, CPT_PAIR); } else { - if (round_parens) { - if (!first_unquoted && is_special_reader_form(pp, notdisplay, pair)) { - notdisplay = print_special_reader_form(SCHEME_CAR(pair), pp, notdisplay); - (void)print(SCHEME_CADR(pair), notdisplay, compact, ht, mt, pp); - return; - } else - print_utf8_string(pp,"(", 0, 1); + if (round_parens + && !first_unquoted + && is_special_reader_form(pp, notdisplay, pair)) { + print_special_reader_form(SCHEME_CAR(pair), pp, notdisplay); + (void)print(SCHEME_CADR(pair), notdisplay, compact, ht, mt, pp); + return; + } else if ((notdisplay == 3) && !first_unquoted) { + if (SAME_TYPE(pair_type, scheme_pair_type)) { + if (scheme_is_list(pair)) + print_utf8_string(pp,"(list ", 0, 6); + else if (!SCHEME_PAIRP(SCHEME_CDR(pair)) + || is_graph_point(ht, SCHEME_CDR(pair))) + print_utf8_string(pp,"(cons ", 0, 6); + else + print_utf8_string(pp,"(list* ", 0, 7); + } else { + pair_type = -1; + print_utf8_string(pp,"(mcons ", 0, 7); + } + round_parens = 1; + } else if (round_parens) { + print_utf8_string(pp,"(", 0, 1); } else print_utf8_string(pp,"{", 0, 1); } @@ -3372,10 +3470,14 @@ print_pair(Scheme_Object *pair, int notdisplay, int compact, while (SAME_TYPE(SCHEME_TYPE(cdr), pair_type) && !is_special_reader_form(pp, notdisplay, pair)) { if (ht && !super_compact) { - if ((long)scheme_hash_get(ht, cdr) != 1) { + if (is_graph_point(ht, cdr)) { /* This needs a tag */ - if (!compact) - print_utf8_string(pp, " . ", 0, 3); + if (!compact) { + if (notdisplay == 3) + print_utf8_string(pp, " ", 0, 1); + else + print_utf8_string(pp, " . ", 0, 3); + } (void)print(cdr, notdisplay, compact, ht, mt, pp); if (!compact) { if (round_parens) @@ -3395,8 +3497,12 @@ print_pair(Scheme_Object *pair, int notdisplay, int compact, } if (!SCHEME_NULLP(cdr)) { - if (!compact) - print_utf8_string(pp, " . ", 0, 3); + if (!compact) { + if (notdisplay == 3) + print_utf8_string(pp, " ", 0, 1); + else + print_utf8_string(pp, " . ", 0, 3); + } print(cdr, notdisplay, compact, ht, mt, pp); } else if (compact && (super_compact < 1)) print_compact(pp, CPT_NULL); @@ -3440,7 +3546,7 @@ print_vector(Scheme_Object *vec, int notdisplay, int compact, if (as_prefab) { print_utf8_string(pp, "#s(", 0, 3); - } else if (notdisplay && pp->print_vec_shorthand) { + } else if (notdisplay && pp->print_vec_shorthand && (notdisplay != 3)) { if (size == 0) { if (pp->honu_mode) print_utf8_string(pp, "vectorN(0", 0, 7); @@ -3454,6 +3560,8 @@ print_vector(Scheme_Object *vec, int notdisplay, int compact, } } else if (pp->honu_mode) print_utf8_string(pp, "vector(", 0, 7); + else if (notdisplay == 3) + print_utf8_string(pp, "(vector ", 0, 8); else print_utf8_string(pp, "#(", 0, 2); } @@ -3597,7 +3705,8 @@ static Scheme_Object *accum_write(void *_b, int argc, Scheme_Object **argv) static Scheme_Object *writable_struct_subs(Scheme_Object *s, int for_write, PrintParams *pp) { - Scheme_Object *v, *o, *a[3], *b, *accum_proc; + Scheme_Object *v, *o, *a[3], *b; + Scheme_Object *d_accum_proc, *w_accum_proc, *p_accum_proc; Scheme_Output_Port *op; v = scheme_is_writable_struct(s); @@ -3608,14 +3717,22 @@ static Scheme_Object *writable_struct_subs(Scheme_Object *s, int for_write, Prin op = (Scheme_Output_Port *)o; b = scheme_box(scheme_null); - accum_proc = scheme_make_closed_prim_w_arity(accum_write, + d_accum_proc = scheme_make_closed_prim_w_arity(accum_write, b, - "custom-write-recur-handler", + "custom-display-recur-handler", 2, 2); + w_accum_proc = scheme_make_closed_prim_w_arity(accum_write, + b, + "custom-write-recur-handler", + 2, 2); + p_accum_proc = scheme_make_closed_prim_w_arity(accum_write, + b, + "custom-print-recur-handler", + 2, 3); - op->display_handler = accum_proc; - op->write_handler = accum_proc; - op->print_handler = accum_proc; + op->display_handler = d_accum_proc; + op->write_handler = w_accum_proc; + op->print_handler = p_accum_proc; a[0] = s; a[1] = o; @@ -3651,7 +3768,7 @@ static Scheme_Object *custom_recur(int notdisplay, void *_vec, int argc, Scheme_ if (!SCHEME_OUTPORTP(argv[1])) { scheme_wrong_type((notdisplay > 1) ? "print/recursive" - : (notdisplay ? "write/recusrive" : "display/recursive"), + : (notdisplay ? "write/recursive" : "display/recursive"), "output-port", 1, argc, argv); return NULL; } diff --git a/src/racket/src/read.c b/src/racket/src/read.c index 2c5854b9c4..cd6e61412b 100644 --- a/src/racket/src/read.c +++ b/src/racket/src/read.c @@ -539,7 +539,7 @@ void scheme_init_read(Scheme_Env *env) GLOBAL_PARAMETER("print-honu", print_honu, MZCONFIG_HONU_MODE, env); GLOBAL_PARAMETER("print-syntax-width", print_syntax_width, MZCONFIG_PRINT_SYNTAX_WIDTH, env); GLOBAL_PARAMETER("print-reader-abbreviations", print_reader, MZCONFIG_PRINT_READER, env); - GLOBAL_PARAMETER("print-as-quasiquote", print_as_qq, MZCONFIG_PRINT_AS_QQ, env); + GLOBAL_PARAMETER("print-as-expression", print_as_qq, MZCONFIG_PRINT_AS_QQ, env); GLOBAL_PRIM_W_ARITY("make-readtable", make_readtable, 1, -1, env); GLOBAL_FOLDING_PRIM("readtable?", readtable_p, 1, 1, 1, env); @@ -766,7 +766,7 @@ print_reader(int argc, Scheme_Object *argv[]) static Scheme_Object * print_as_qq(int argc, Scheme_Object *argv[]) { - DO_CHAR_PARAM("print-as-quasiquote", MZCONFIG_PRINT_AS_QQ); + DO_CHAR_PARAM("print-as-expression", MZCONFIG_PRINT_AS_QQ); } static Scheme_Object *good_syntax_width(int c, Scheme_Object **argv) diff --git a/src/racket/src/schminc.h b/src/racket/src/schminc.h index a2b9d1a3aa..5e8568479a 100644 --- a/src/racket/src/schminc.h +++ b/src/racket/src/schminc.h @@ -11,9 +11,9 @@ EXPECTED_PRIM_COUNT to the new value, and then USE_COMPILED_STARTUP can be set to 1 again. */ -#define USE_COMPILED_STARTUP 0 +#define USE_COMPILED_STARTUP 1 -#define EXPECTED_PRIM_COUNT 992 +#define EXPECTED_PRIM_COUNT 995 #define EXPECTED_UNSAFE_COUNT 65 #define EXPECTED_FLFXNUM_COUNT 53 diff --git a/src/racket/src/schpriv.h b/src/racket/src/schpriv.h index 032e5dc5fa..95e28c5e61 100644 --- a/src/racket/src/schpriv.h +++ b/src/racket/src/schpriv.h @@ -719,6 +719,7 @@ Scheme_Object *scheme_proc_struct_name_source(Scheme_Object *a); Scheme_Object *scheme_object_name(Scheme_Object *a); Scheme_Object *scheme_is_writable_struct(Scheme_Object *s); +Scheme_Object *scheme_is_print_as_constructor_struct(Scheme_Object *s); #define SCHEME_STRUCT_INSPECTOR(obj) (((Scheme_Structure *)obj)->stype->inspector) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 26253c89f2..6cb3169978 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "4.2.5.13" +#define MZSCHEME_VERSION "4.2.5.14" #define MZSCHEME_VERSION_X 4 #define MZSCHEME_VERSION_Y 2 #define MZSCHEME_VERSION_Z 5 -#define MZSCHEME_VERSION_W 13 +#define MZSCHEME_VERSION_W 14 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) diff --git a/src/racket/src/struct.c b/src/racket/src/struct.c index 31026c2cc3..e575ccc94c 100644 --- a/src/racket/src/struct.c +++ b/src/racket/src/struct.c @@ -40,6 +40,7 @@ READ_ONLY Scheme_Object *scheme_write_special_symbol; READ_ONLY static Scheme_Object *location_struct; READ_ONLY static Scheme_Object *write_property; +READ_ONLY static Scheme_Object *print_as_constructor_property; READ_ONLY static Scheme_Object *evt_property; READ_ONLY static Scheme_Object *proc_property; READ_ONLY static Scheme_Object *rename_transformer_property; @@ -87,6 +88,7 @@ static Scheme_Object *chaperone_property_p(int argc, Scheme_Object *argv[]); static Scheme_Object *check_evt_property_value_ok(int argc, Scheme_Object *argv[]); static Scheme_Object *check_equal_property_value_ok(int argc, Scheme_Object *argv[]); static Scheme_Object *check_write_property_value_ok(int argc, Scheme_Object *argv[]); +static Scheme_Object *check_print_as_constructor_property_value_ok(int argc, Scheme_Object *argv[]); static Scheme_Object *check_input_port_property_value_ok(int argc, Scheme_Object *argv[]); static Scheme_Object *check_output_port_property_value_ok(int argc, Scheme_Object *argv[]); static Scheme_Object *check_rename_transformer_property_value_ok(int argc, Scheme_Object *argv[]); @@ -283,6 +285,22 @@ scheme_init_struct (Scheme_Env *env) scheme_add_global_constant("custom-write?", pred, env); scheme_add_global_constant("custom-write-accessor", access, env); } + + REGISTER_SO(print_as_constructor_property); + { + Scheme_Object *a[2], *pred, *access; + guard = scheme_make_prim_w_arity(check_print_as_constructor_property_value_ok, + "guard-for-prop:custom-print-as-constructor", + 2, 2); + + a[0] = scheme_intern_symbol("custom-print-as-constructor"); + a[1] = guard; + print_as_constructor_property = make_struct_type_property_from_c(2, a, &pred, &access, + scheme_struct_property_type); + scheme_add_global_constant("prop:custom-print-as-constructor", print_as_constructor_property, env); + scheme_add_global_constant("custom-print-as-constructor?", pred, env); + scheme_add_global_constant("custom-print-as-constructor-accessor", access, env); + } REGISTER_SO(evt_property); { @@ -1463,11 +1481,26 @@ static Scheme_Object *check_write_property_value_ok(int argc, Scheme_Object *arg return v; } +static Scheme_Object *check_print_as_constructor_property_value_ok(int argc, Scheme_Object *argv[]) +{ + if (SCHEME_TRUEP(argv[0])) + return scheme_true; + else + return scheme_false; +} + Scheme_Object *scheme_is_writable_struct(Scheme_Object *s) { return scheme_struct_type_property_ref(write_property, s); } +Scheme_Object *scheme_is_print_as_constructor_struct(Scheme_Object *s) +{ + s = scheme_struct_type_property_ref(print_as_constructor_property, s); + if (!s || SCHEME_FALSEP(s)) return NULL; + return scheme_true; +} + /*========================================================================*/ /* rename and set! transformer properties */ /*========================================================================*/ 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..36d5f4c963 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..b76fa4ac7c 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,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" 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.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/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..e6f15cc680 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,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 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..3038c91823 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,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 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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +