Merge remote branch 'origin/master' into samth/new-logic2

Conflicts:
	collects/typed-scheme/scribblings/begin.scrbl
	collects/typed-scheme/scribblings/quick.scrbl
	collects/typed-scheme/scribblings/ts-guide.scrbl
	collects/typed-scheme/scribblings/ts-reference.scrbl
	collects/typed-scheme/scribblings/varargs.scrbl
This commit is contained in:
Sam Tobin-Hochstadt 2010-05-10 10:36:21 -04:00
commit 82ee73ab51
281 changed files with 10822 additions and 10060 deletions

View File

@ -9,32 +9,42 @@
(printf "a positive number") (printf "a positive number")
rate0) rate0)
;; String String Syntax[id] -> Syntax ;; Syntax String String Syntax[id] -> Syntax
(define (pre-post-name pre post name) (define (pre-post-name stx pre post name)
(datum->syntax (datum->syntax
name (string->symbol (string-append pre (symbol->string (syntax-e name)) post)))) name (string->symbol (string-append pre (symbol->string (syntax-e name)) post))))
(provide (all-defined-out))) (provide (all-defined-out))
(module clauses scheme
(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)) (for-template scheme/base 'auxs))
(provide define-clause)
(define-syntax (define-clause stx) (define-syntax (define-clause stx)
(syntax-case stx () (syntax-case stx ()
[(_ name (proc p-ctc) (rate r-ctc) ...) [(_ 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 ...))]) [(rate0 ...) (generate-temporaries #'(rate ...))])
(with-syntax ([((thing ...) ...) #'((#:with rate #'(r-ctc rate0)) ...)]) (with-syntax ([((thing ...) ...) #'((#:with rate #'(r-ctc rate0)) ...)])
#` #`
(begin (begin
(provide name name-clause) (provide name name-clause)
(define-syntax (name . x)
(raise-syntax-error 'name "used out of context" x))
(define-syntax-class name-clause (define-syntax-class name-clause
#:description (format "~a" 'name) #:description (format "~a" 'name)
#:literals (name) #:literals (name)
@ -43,75 +53,33 @@
#:with (rate0 ...) (map (lambda (x) #'0) '(rate0 ...)) #:with (rate0 ...) (map (lambda (x) #'0) '(rate0 ...))
#:with proc #'(world->world proc0) #:with proc #'(world->world proc0)
thing ... ...) thing ... ...)
(pattern (on-tick proc0:expr (~var rate0 expr) ...) (pattern (name proc0:expr (~var rate0 expr) ...)
#:with proc #'(world->world> proc0) #:with proc #'(world->world> proc0)
thing ... ...)) thing ... ...))
)))])) )))]))
(define-clause on-mouse (proc world-nat-nat-mouse->world)) (define-clause on-mouse (proc world-nat-nat-mouse->world))
(define-clause on-tick (proc world->world) (rate (lambda (x) 1/28))) (define-clause on-tick (proc world->world))
)
;; --- 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))
(module utest scheme (module utest scheme
(require (for-syntax syntax/parse 'clauses)) (require 'clauses (for-syntax 'clauses syntax/parse) (for-template 'clauses))
(define-syntax (big-bang stx) (define-syntax (big-bang stx)
(syntax-parse stx (syntax-parse stx
[(big-bang world0:expr [(big-bang world0:expr
(~or (~optional otc:on-tick-clause) (~or (~optional otk:on-tick-clause)
; (~optional omc:on-mouse-clause) (~optional omc:on-mouse-clause))
(~optional odc:on-draw-clause))
...) ...)
#`(printf "~s\n" #`(printf "~s\n"
'(bb world0 '(bb world0
#,(if (attribute otc) #,(if (attribute omc) "mouse" "no mouse")
#'otc.rate #,(if (attribute otk) "tick" "no tick")))]))
#'1/28)
#,(if (attribute odc)
#'odc.proc
#''not-draw)))]))
(big-bang 0) (big-bang 0)
(big-bang 1 (on-tick add1)) (big-bang 1 (on-tick +) (on-mouse -))
(big-bang 2 (on-tick add1 1/2)) (big-bang 2 (on-tick +))
(big-bang 3 (on-draw add1 1/2 1/3)) (big-bang 3 (on-mouse +))
; (big-bang 4 (on-mouse add1 1 2))
) )
(require 'utest) (require 'utest)

View File

@ -6,13 +6,13 @@
@section{Implementation} @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 the ``Revised Report on the Algorithmic Language Algol 60,'' edited
by Peter Naur. by Peter Naur.
@section{Including Algol 60 Programs} @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 @scheme[include-algol] supports limited use of Algol 60 programs in
larger programs. larger programs.
@ -21,14 +21,14 @@ larger programs.
@defform[(include-algol path-string)]{ @defform[(include-algol path-string)]{
Includes the Algol 60 program indicated by @scheme[path-string] as an 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), closed (i.e., it doesn't see any bindings in the included context),
and the result is always @|void-const|.} and the result is always @|void-const|.}
@section{Language} @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: the Algol 60 specification in the following minor ways:
@(itemize (item "Strings are not permitted to contain nested quotes.") @(itemize (item "Strings are not permitted to contain nested quotes.")
@ -66,6 +66,6 @@ are supported:
printn(E) prints the number E printn(E) prints the number E
printnln(E) prints the number E followed by a newline") 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. for the Algol 60 language.

View File

@ -118,6 +118,6 @@
`(module m algol60/base `(module m algol60/base
,code)) ,code))
(list "-mvqe" "(require m)")))))) (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 ())))))) (super-instantiate ()))))))

View File

@ -7,52 +7,52 @@
browser/htmltext browser/htmltext
browser/external browser/external
browser/tool browser/tool
scheme/base racket/base
scheme/contract racket/contract
scheme/class racket/class
scheme/gui/base racket/gui/base
net/url net/url
framework/framework)) framework/framework))
@(define-syntax-rule (def-ext id) @(define-syntax-rule (def-ext id)
(begin (begin
(require (for-label net/sendurl)) (require (for-label net/sendurl))
(define id (scheme send-url)))) (define id (racket send-url))))
@(def-ext net-send-url) @(def-ext net-send-url)
@title{@bold{Browser}: Simple HTML Rendering} @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 and classes for parsing and viewing HTML files. The
@schememodname[browser/htmltext] library provides a simplified interface @racketmodname[browser/htmltext] library provides a simplified interface
for rendering to a subclass of the MrEd @scheme[text%] class. The for rendering to a subclass of the GRacket @racket[text%] class. The
@schememodname[browser/external] library provides utilities for @racketmodname[browser/external] library provides utilities for
launching an external browser (such as Firefox). launching an external browser (such as Firefox).
@section[#:tag "browser"]{Browser} @section[#:tag "browser"]{Browser}
@defmodule[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{<A MZSCHEME=sexpr>...</A>}. When the user clicks of the form @litchar{<A MZSCHEME=sexpr>...</A>}. When the user clicks
on such a link, the string @scheme[sexpr] is parsed as a Scheme program on such a link, the string @racket[sexpr] is parsed as a Racket program
and evaluated. Since @scheme[sexpr] is likely to contain Scheme and evaluated. Since @racket[sexpr] is likely to contain Racket
strings, and since escape characters are difficult for people to read, a 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, character before it is parsed. Thus,
@verbatim[#:indent 2]{ @verbatim[#:indent 2]{
<A MZSCHEME="|This goes nowhere.|">Nowhere</A> <A MZSCHEME="|This goes nowhere.|">Nowhere</A>
} }
creates a ``Nowhere'' hyperlink, which executes the Scheme program creates a ``Nowhere'' hyperlink, which executes the Racket program
@schemeblock[ @racketblock[
"This goes nowhere." "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 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 clicks on ``Nowhere,'' the result is a new page that says ``This goes
nowhere.'' nowhere.''
@ -75,16 +75,16 @@ of a string, it replaces the comment in the document. Other types of
return values are ignored. return values are ignored.
If the html file is being accessed as a @litchar{file:} url, the If the html file is being accessed as a @litchar{file:} url, the
@scheme[current-load-relative-directory] parameter is set to the @racket[current-load-relative-directory] parameter is set to the
directory during the evaluation of the mzscheme code (in both directory during the evaluation of the mzracket code (in both
examples). The Scheme code is executed through @scheme[eval]. examples). The Racket code is executed through @racket[eval].
The @litchar{MZSCHEME} forms are disabled unless the web page is a 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%)]{ @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 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?]{ @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%) ()]{ @defmixin[hyper-frame-mixin (frame%) ()]{
@defconstructor/auto-super[([url (or/c url? string? input-port?)])]{ @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%)]{ @defmethod[(get-hyper-panel%) (subclass?/c panel%)]{
Returns the class that is instantiated when the frame is created. Returns the class that is instantiated when the frame is created.
Must be a panel with hyper-panel-mixin mixed in. Defaults to just 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%)]{ @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%) ()]{ @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. 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%) ()]{ @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 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?)] @defconstructor/auto-super[([url (or/c url? string? input-port?)]
[status-frame [status-frame
(or/c (is-a?/c top-level-window<%>) false/c)] (or/c (is-a?/c top-level-window<%>) false/c)]
[post-data (or/c false/c bytes?)])]{ [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 @method[hyper-text-mixin reload] method), a top-level window for
status messages and dialogs, a progress procedure used as 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). 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?] @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)]{ @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. none.
} }
@ -194,9 +194,9 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
(or/c exact-nonnegative-integer? false/c)]{ (or/c exact-nonnegative-integer? false/c)]{
Finds the location of a tag in the buffer (where tags are installed Finds the location of a tag in the buffer (where tags are installed
in HTML with @litchar{<A NAME="name">}) and returns its position. in HTML with @litchar{<A NAME="name">}) 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, 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?]{ @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. Installs a hyperlink.
} }
@defmethod[(add-scheme-callback [start exact-nonnegative-integer?] @defmethod[(add-racket-callback [start exact-nonnegative-integer?]
[end exact-nonnegative-integer?] [end exact-nonnegative-integer?]
[scheme-expr string?]) [racket-expr string?])
void?]{ void?]{
Installs a Scheme evaluation hyperlink. Installs a Racket evaluation hyperlink.
} }
@defmethod[(add-thunk-callback [start exact-nonnegative-integer?] @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. Installs a thunk-based hyperlink.
} }
@defmethod[(eval-scheme-string [str string?]) any]{ @defmethod[(eval-racket-string [str string?]) any]{
Called to handle the @litchar{<A MZSCHEME="expr">...</A>} tag and Called to handle the @litchar{<A MZSCHEME="expr">...</A>} tag and
@litchar{<! MZSCHEME="expr">} comments (see above). Evaluates the @litchar{<! MZSCHEME="expr">} comments (see above). Evaluates the
string; if the result is a string, it is opened as an HTML page. 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. Reloads the current page.
The text defaultly uses the basic style named 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?)]{ @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. 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 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). 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%) ()]{ @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. 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%) ()]{ @defmixin[hyper-canvas-mixin (editor-canvas%) ()]{
A @scheme[hyper-can-mixin]-extended canvas's parent should be an A @racket[hyper-can-mixin]-extended canvas's parent should be an
instance of a class derived with @scheme[hyper-panel-mixin]. instance of a class derived with @racket[hyper-panel-mixin].
@defconstructor/auto-super[()]{ @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%)]{ @defmethod[(get-editor%) (subclass?/c text%)]{
Returns the class used to implement the editor in the browser Returns the class used to implement the editor in the browser
window. It should be derived from @scheme[hyper-text%] and should window. It should be derived from @racket[hyper-text%] and should
pass on the initialization arguments to @scheme[hyper-text%]. pass on the initialization arguments to @racket[hyper-text%].
The dynamic extent of the initialization of this editor is called on The dynamic extent of the initialization of this editor is called on
a thread that may be killed (via a custodian shutdown). In that 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]) [post-data (or/c bytes? false/c) #f])
void?]{ void?]{
Changes to the given url, loading it by calling the Changes to the given url, loading it by calling the
@scheme[make-editor] method. If @scheme[relative-to-url] is not @racket[make-editor] method. If @racket[relative-to-url] is not
@scheme[#f], it must be a URL for resolving @scheme[url] as a @racket[#f], it must be a URL for resolving @racket[url] as a
relative URL. @scheme[url] may also be a port, in which case, relative URL. @racket[url] may also be a port, in which case,
@scheme[relative-to-url] must be @scheme[#f]. @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 point where the URL has been resolved and enough progress has been
made to dismiss any message that the URL is being resolved. The 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 procedure is called with @racket[#t] if the URL will be loaded into
a browser window, @scheme[#f] otherwise (e.g., the user will save a browser window, @racket[#f] otherwise (e.g., the user will save
the URL content to a file). 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. URL GET is changed to a POST with the given data.
} }
@defmethod[(set-page [page any/c] [notify? any/c]) void?]{ @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 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?]{ @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 Creates controls and a hyper text canvas. The controls permit a
user to move back and forth in the hypertext history. 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 should contain a line to display special @litchar{DOCNOTE} tags in a
page. Such tags are used primarily by the PLT documentation. page. Such tags are used primarily by the PLT documentation.
} }
@defmethod[(make-canvas [container (is-a?/c area-container<%>)]) void?]{ @defmethod[(make-canvas [container (is-a?/c area-container<%>)]) void?]{
Creates the panel's hypertext canvas, an instance of a class derived 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. initialization.
} }
@defmethod[(get-canvas%) (subclass?/c editor-canvas%)]{ @defmethod[(get-canvas%) (subclass?/c editor-canvas%)]{
Returns the class instantiated by make-canvas. It must be derived 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<%>)]) @defmethod[(make-control-bar-panel [container (is-a?/c area-container<%>)])
any/c]{ any/c]{
Creates the panel's sub-container for the control bar containing the 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 no control bar. The default method instantiates
@scheme[horizontal-panel%]. @racket[horizontal-panel%].
} }
@defmethod[(rewind) void?]{ @defmethod[(rewind) void?]{
@ -373,15 +373,15 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
@defmethod[(on-navigate) void?]{ @defmethod[(on-navigate) void?]{
Callback that is invoked any time the displayed hypertext page Callback that is invoked any time the displayed hypertext page
changes (either by clicking on a link in the canvas or by 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]) @defmethod[(leaving-page [page any/c] [new-page any/c])
any]{ any]{
This method is called by the hypertext canvas to notify the panel This method is called by the hypertext canvas to notify the panel
that the hypertext page changed. The @scheme[page] is @scheme[#f] that the hypertext page changed. The @racket[page] is @racket[#f]
if @scheme[new-page] is the first page for the canvas. See also if @racket[new-page] is the first page for the canvas. See also
@scheme[page->editor]. @racket[page->editor].
} }
@defmethod[(filter-notes [notes (listof string?)]) @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?]{ @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. 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]{ @defproc[(editor->page [editor (is-a?/c text%)]) any/c]{
Creates a page record for the given editor, suitable for use with the 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%)]{ @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% ()]{ @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{<map> ... </map>} associated with them and except they have a @litchar{<map> ... </map>} associated with them and
when clicking on them (in the map) they will cause their init arg text when clicking on them (in the map) they will cause their init arg text
to follow the corresponding link. 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?]{ @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?]{ @defmethod[(get-key) string?]{
@ -436,8 +436,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
[region (listof number?)] [region (listof number?)]
[href string?]) [href string?])
void?]{ void?]{
Registers the shape named by @scheme[shape] whose coordinates are Registers the shape named by @racket[shape] whose coordinates are
specified by @scheme[region] to go to @scheme[href] when that region specified by @racket[region] to go to @racket[href] when that region
of the image is clicked on. 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] @defmodule[browser/browser-unit]
@defthing[browser@ unit?]{ @defthing[browser@ unit?]{
Imports @scheme[mred^], @scheme[tcp^], and @scheme[url^], and exports Imports @racket[mred^], @racket[tcp^], and @racket[url^], and exports
@scheme[browser^]. @racket[browser^].
} }
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@ -460,7 +460,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
@defmodule[browser/browser-sig] @defmodule[browser/browser-sig]
@defsignature[browser^ ()]{ @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%)]{ @definterface[html-text<%> (text%)]{
@defmethod[(get-url) (or/c url? string? false/c)]{ @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. if no base is available.
} }
@defmethod[(set-title [str string?]) void?]{ @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?] @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. 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?] [end exact-nonnegative-integer?]
[scheme-expr string?]) [racket-expr string?])
void?]{ void?]{
Installs a Scheme evaluation hyperlink. Installs a Racket evaluation hyperlink.
} }
@defmethod[(add-thunk-callback [start exact-nonnegative-integer?] @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%) ()]{ @defmixin[html-text-mixin (text%) ()]{
Extends the given @scheme[text%] class with implementations of the Extends the given @racket[text%] class with implementations of the
@scheme[html-text<%>] methods. Hyperlinks are attached to clickbacks @racket[html-text<%>] methods. Hyperlinks are attached to clickbacks
that use @net-send-url from @schememodname[net/sendurl]. that use @net-send-url from @racketmodname[net/sendurl].
} }
@defproc[(render-html-to-text [in input-port?] @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] [load-img? any/c]
[eval-mz? any/c]) [eval-mz? any/c])
void?]{ void?]{
Reads HTML from @scheme[in] and renders it to @scheme[dest]. If Reads HTML from @racket[in] and renders it to @racket[dest]. If
@scheme[load-img?] is @scheme[#f], then images are rendered as Xed-out @racket[load-img?] is @racket[#f], then images are rendered as Xed-out
boxes. If @scheme[eval-mz?] is @scheme[#f], then @litchar{MZSCHEME} boxes. If @racket[eval-mz?] is @racket[#f], then @litchar{MZSCHEME}
hyperlink expressions and comments are not evaluated. 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-list (if it exists) for all of the inserted text's default
style. style.
} }
@ -546,21 +546,21 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
@defmodule[browser/external] @defmodule[browser/external]
@defproc[(send-url [str null] [separate-window? void #t]) null]{ @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 is prompted for a browser to use if none is recorded in the
preferences file. preferences file.
} }
@defproc[(browser-preference? [v any/c]) boolean?]{ @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?]{ @defproc[(update-browser-preference [url (or/c string? false/c)]) void?]{
Under Unix, prompts the user for a browser preference and records the Under Unix, prompts the user for a browser preference and records the
user choice as a framework preference (even if one is already user choice as a framework preference (even if one is already
recorded). If @scheme[url] is not @scheme[#f], it is used in the 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 @scheme[#f], the dialog to explain which URL is to be opened; if it is @racket[#f], the
@scheme['internal] will be one of the options for the user. @racket['internal] will be one of the options for the user.
} }
@defproc[(install-help-browser-preference-panel) void?]{ @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)]) @defproc[(add-to-browser-prefs-panel [proc ((is-a?/c panel%) . -> . any)])
void?]{ void?]{
The @scheme[proc] is called when the ``Browser'' panel is constructed The @racket[proc] is called when the ``Browser'' panel is constructed
for preferences. The supplied argument is the panel, so @scheme[proc] for preferences. The supplied argument is the panel, so @racket[proc]
can add additional option controls. If the panel is already created, 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] @defmodule[browser/tool]
@defthing[tool@ unit?]{ @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. preference panel.
} }

View File

@ -5,7 +5,7 @@
compiler/cffi compiler/cffi
mzlib/include)) mzlib/include))
@(define mzc (exec "mzc")) @(define ctool (exec "raco ctool"))
@(define cpp tt) @(define cpp tt)
@(define inside @other-manual['(lib "scribblings/inside/inside.scrbl")]) @(define inside @other-manual['(lib "scribblings/inside/inside.scrbl")])
@ -23,53 +23,53 @@
@(define (argtype scm desc c . cases) @(define (argtype scm desc c . cases)
(item (apply lines (item (apply lines
scm scm
@elem{Scheme range: @|desc|} @elem{Racket range: @|desc|}
@elem{C type: @|c|} @elem{C type: @|c|}
cases))) cases)))
@(define (toC . content) @(define (toC . content)
(apply elem "Scheme to C conversion: " content)) (apply elem "Racket to C conversion: " content))
@(define (toScheme . content) @(define (toRacket . content)
(apply elem "C to Scheme conversion: " content)) (apply elem "C to Racket conversion: " content))
@(define tosObvious @(define tosObvious
(elem "conversions: (obvious and precise)")) (elem "conversions: (obvious and precise)"))
@(define goesto 'rarr) @(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]{ @defmodule[compiler/cffi]{
The @schememodname[compiler/cffi] module relies on a C compiler to The @schememodname[compiler/cffi] module relies on a C compiler to
statically construct an interface to C code through directives 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"].} @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 most tasks; see @other-manual['(lib
"scribblings/foreign/foreign.scrbl")] for more information on "scribblings/foreign/foreign.scrbl")] for more information on
@schememodname[scheme/foreign]. See also @|inside|, which describes @racketmodname[ffi/unsafe]. See also @|inside|, which describes
PLT Scheme's C-level API for extending the run-time system. Racket's C-level API for extending the run-time system.
The @schememodname[compiler/cffi] library defines three forms: The @racketmodname[compiler/cffi] library defines three forms:
@scheme[c-lambda], @scheme[c-declare], and @scheme[c-include]. When @racket[c-lambda], @racket[c-declare], and @racket[c-include]. When
interpreted directly or compiled to byte code, @scheme[c-lambda] interpreted directly or compiled to byte code, @racket[c-lambda]
produces a function that always raises @scheme[exn:fail], and produces a function that always raises @racket[exn:fail], and
@scheme[c-declare] and @scheme[c-include] raise @racket[c-declare] and @racket[c-include] raise
@scheme[exn:fail]. When compiled by @exec{mzc --extension}, the forms @racket[exn:fail]. When compiled by @exec{raco ctool --extension}, the forms
provide access to C. Thus, @schememodname[compiler/cffi] is normally provide access to C. Thus, @racketmodname[compiler/cffi] is normally
required by a module to be compiled via @|mzc|. In addition, the required by a module to be compiled via @|ctool|. In addition, the
@|mzc| compiler implicitly imports @schememodname[compiler/cffi] into @|ctool| compiler implicitly imports @racketmodname[compiler/cffi] into
the top-level environment for non-@scheme[module] compilation. 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 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 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")) (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} underscores), etc., and the result is installed into @cpp{___result}
(three underscores): (three underscores):
@schemeblock[ @racketblock[
(define machine-string->float (define machine-string->float
(c-lambda (char-string) float (c-lambda (char-string) float
"___result = *(float *)___arg1;")) "___result = *(float *)___arg1;"))
] ]
The @scheme[c-lambda] form provides only limited conversions between C The @racket[c-lambda] form provides only limited conversions between C
and Scheme data. For example, the following function does not reliably and Racket data. For example, the following function does not reliably
produce a string of four characters: produce a string of four characters:
@schemeblock[ @racketblock[
(define broken-machine-float->string (define broken-machine-float->string
(c-lambda (float) char-string (c-lambda (float) char-string
"char b[5]; *(float *)b = ___arg1; b[4] = 0; ___result = b;")) "char b[5]; *(float *)b = ___arg1; b[4] = 0; ___result = b;"))
] ]
because the representation of a @cpp{float} can contain null bytes, 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: described in @|inside|, can be used in a function body:
@schemeblock[ @racketblock[
(define machine-float->string (define machine-float->string
(c-lambda (float) scheme-object (c-lambda (float) racket-object
"char b[4];" "char b[4];"
"*(float *)b = ___arg1;" "*(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 @filepath{escheme.h} or @filepath{scheme.h} is included, but before
any other code in the compilation environment of the declaration. It any other code in the compilation environment of the declaration. It
is often used to declare C header file inclusions. For example, a 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: file:
@schemeblock[ @racketblock[
(c-declare "#include <math.h>") (c-declare "#include <math.h>")
(define fmod (c-lambda (double double) double "fmod")) (define fmod (c-lambda (double double) double "fmod"))
] ]
The @scheme[c-declare] form can also be used to define helper C The @racket[c-declare] form can also be used to define helper C
functions to be called through @scheme[c-lambda]. functions to be called through @racket[c-lambda].
The @scheme[c-include] form expands to a @scheme[c-declare] form using The @racket[c-include] form expands to a @racket[c-declare] form using
the content of a specified file. Use @scheme[(c-include _file)] instead the content of a specified file. Use @racket[(c-include _file)] instead
of @scheme[(c-declare "#include file")] when it's easier to of @racket[(c-declare "#include file")] when it's easier to
have MzScheme resolve the file path than to have the C compiler have Racket resolve the file path than to have the C compiler
resolve it. 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. distribution contains additional examples.
When compiling for MzScheme3m (see @|inside|), C code inserted by When compiling for Racket 3m (see @|inside|), C code inserted by
@scheme[c-lambda], @scheme[c-declare], and @scheme[c-include] will be @racket[c-lambda], @racket[c-declare], and @racket[c-include] will be
transformed in the same was as @|mzc|'s @DFlag{xform} mode (which may 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 MzScheme3m; or may not be enough to make the code work correctly in Racket 3m;
see @|inside| for more information). see @|inside| for more information).
@defform[(c-lambda (argument-type ...) return-type impl-string ...+)]{ @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 procedure takes as many arguments as the supplied
@scheme[argument-type]s, and it returns one value. If @racket[argument-type]s, and it returns one value. If
@scheme[return-type] is @schemeidfont{void}, the procedure's result is @racket[return-type] is @racketidfont{void}, the procedure's result is
always void. The @scheme[impl-string] is either the name of a C always void. The @racket[impl-string] is either the name of a C
function (or macro) or the body of a C function. 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{_}, 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 the named C function (or macro) and returns the function's
result. Each argument to the Scheme procedure is converted result. Each argument to the Racket procedure is converted
according to the corresponding @scheme[argument-type] (as according to the corresponding @racket[argument-type] (as
described below) to produce an argument to the C function. Unless described below) to produce an argument to the C function. Unless
@scheme[return-type] is @schemeidfont{void}, the C function's result is @racket[return-type] is @racketidfont{void}, the C function's result is
converted according to @scheme[return-type] for the Scheme converted according to @racket[return-type] for the Racket
procedure's result. 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 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 body. The converted arguments for the function will be in variables
@cpp{___arg1}, @cpp{___arg2}, ... (with three underscores in each @cpp{___arg1}, @cpp{___arg2}, ... (with three underscores in each
name) in the context where the @scheme[impl-string]s are placed for name) in the context where the @racket[impl-string]s are placed for
compilation. Unless @scheme[return-type] is @schemeidfont{void}, the compilation. Unless @racket[return-type] is @racketidfont{void}, the
@scheme[impl-string]s code should assign a result to the variable @racket[impl-string]s code should assign a result to the variable
@cpp{___result} (three underscores), which will be declared but not @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 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 @cpp{___AT_END} (with three leading underscores), then the macro's
value should be C code to execute after the value @cpp{___result} is 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 in the same block; defining @cpp{___AT_END} is primarily useful for
deallocating a string in @cpp{___result} that has been copied by 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 the beginning of a block in its compilation context, and
@cpp{___AT_END} will be undefined after the code. @cpp{___AT_END} will be undefined after the code.
In addition to @cpp{___arg1}, etc., the variable @cpp{argc} is bound In addition to @cpp{___arg1}, etc., the variable @cpp{argc} is bound
in @scheme[impl-string]s to the number of arguments supplied to in @racket[impl-string]s to the number of arguments supplied to
the function, and @cpp{argv} is bound to a @cpp{Scheme_Object*} array the function, and @cpp{argv} is bound to a @cpp{Racket_Object*} array
of length @cpp{argc} containing the function arguments as Scheme of length @cpp{argc} containing the function arguments as Racket
values. The @cpp{argv} and @cpp{argc} variables are mainly useful for 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: recognized symbolically:
@itemize[ @itemize[
@argtype[@scheme[bool] "any value" @cpp{int} @argtype[@racket[bool] "any value" @cpp{int}
@toC{@scheme[#f] @|goesto| 0, anything else @|goesto| 1} @toC{@racket[#f] @|goesto| 0, anything else @|goesto| 1}
@toScheme{0 @|goesto| @scheme[#f], anything else @|goesto| @scheme[#t]}] @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} @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} @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} @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] @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] @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] @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] @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] @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] @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}} @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} @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*} @argtype[@racket[char-string] @elem{byte string or @racket[#f]} @cpp{char*}
@toC{string @|goesto| contained byte-array pointer, @scheme[#f] @|goesto| @cpp{NULL}} @toC{string @|goesto| contained byte-array pointer, @racket[#f] @|goesto| @cpp{NULL}}
@toScheme{@cpp{NULL} @|goesto| @scheme[#f], anything else @|goesto| new byte string created by copying the string}] @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} @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} @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]*} @argtype[@racket[(pointer _bstr)] @elem{an opaque c-pointer value, identified as type @racket[bstr], or @racket[#f]} @cpp{@racket[_bstr]*}
@toC{@scheme[#f] @|goesto| @cpp{NULL}, c-pointer @|goesto| contained pointer cast to @cpp{@scheme[_bstr]*}} @toC{@racket[#f] @|goesto| @cpp{NULL}, c-pointer @|goesto| contained pointer cast to @cpp{@racket[_bstr]*}}
@toScheme{@cpp{NULL} @|goesto| @scheme[#f], anything else @|goesto| new c-pointer containing the pointer @toRacket{@cpp{NULL} @|goesto| @racket[#f], anything else @|goesto| new c-pointer containing the pointer
and identified as type @scheme[_bstr]}] and identified as type @racket[_bstr]}]
] ]
The @scheme[return-type] must be @schemeidfont{void} or one of the The @racket[return-type] must be @racketidfont{void} or one of the
@scheme[arg-type] keywords.} @racket[arg-type] keywords.}
@defform[(c-declare code-string)]{ @defform[(c-declare code-string)]{
Declares arbitrary C code to appear after @filepath{escheme.h} or Declares arbitrary C code to appear after @filepath{escheme.h} or
@filepath{scheme.h} is included, but before any other code in the @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 can appear only at the top-level or within a module's top-level
sequence. sequence.
The @scheme[code] code will appear on a new line in the file for C The @racket[code] code will appear on a new line in the file for C
compilation. Multiple @scheme[c-include] declarations are concatenated compilation. Multiple @racket[c-include] declarations are concatenated
(with newlines) in order to produces a sequence of declarations.} (with newlines) in order to produces a sequence of declarations.}
@defform[(c-include path-spec)]{ @defform[(c-include path-spec)]{
Expands to a use of @scheme[c-declare] with the content of Expands to a use of @racket[c-declare] with the content of
@scheme[path-spec]. The @scheme[path-spec] has the same form as for @racket[path-spec]. The @racket[path-spec] has the same form as for
@schememodname[mzlib/include]'s @scheme[include].} @racketmodname[mzlib/include]'s @racket[include].}
@(bibliography @(bibliography
(bib-entry (bib-entry

View File

@ -30,7 +30,7 @@
[("--vv") "Very verbose mode" [("--vv") "Very verbose mode"
(verbose #t) (verbose #t)
(very-verbose #t)] (very-verbose #t)]
#:args file file)) #:args (file . another-file) (cons file another-file)))
(if (disable-deps) (if (disable-deps)
;; Just compile one file: ;; Just compile one file:

View File

@ -92,7 +92,7 @@
(define (decompile-module mod-form stack) (define (decompile-module mod-form stack)
(match mod-form (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)) max-let-depth dummy lang-info internal-context))
(let-values ([(globs defns) (decompile-prefix prefix)] (let-values ([(globs defns) (decompile-prefix prefix)]
[(stack) (append '(#%modvars) stack)] [(stack) (append '(#%modvars) stack)]

View File

@ -90,9 +90,10 @@
(define (traverse-module mod-form visit) (define (traverse-module mod-form visit)
(match mod-form (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)) max-let-depth dummy lang-info internal-context))
(traverse-data name visit) (traverse-data name visit)
(traverse-data srcname visit)
(traverse-data self-modidx visit) (traverse-data self-modidx visit)
(traverse-prefix prefix visit) (traverse-prefix prefix visit)
(for-each (lambda (f) (map (lambda (v) (traverse-data v visit)) (cdr f))) requires) (for-each (lambda (f) (map (lambda (v) (traverse-data v visit)) (cdr f))) requires)
@ -431,7 +432,7 @@
(define (out-module mod-form out) (define (out-module mod-form out)
(match mod-form (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)) max-let-depth dummy lang-info internal-context))
(out-syntax MODULE_EXPD (out-syntax MODULE_EXPD
(let* ([lookup-req (lambda (phase) (let* ([lookup-req (lambda (phase)
@ -504,6 +505,7 @@
[l (list* #f #f l)] ; obsolete `functional?' info [l (list* #f #f l)] ; obsolete `functional?' info
[l (cons lang-info l)] ; lang-info [l (cons lang-info l)] ; lang-info
[l (cons self-modidx l)] [l (cons self-modidx l)]
[l (cons srcname l)]
[l (cons name l)]) [l (cons name l)])
(make-module-decl l)) (make-module-decl l))
out)])) out)]))

View File

@ -205,7 +205,7 @@
(define (read-module v) (define (read-module v)
(match 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 ,rename ,max-let-depth ,dummy
,prefix ,prefix
,indirect-et-provides ,num-indirect-et-provides ,indirect-et-provides ,num-indirect-et-provides
@ -218,7 +218,7 @@
[`(,syntax-body ,body [`(,syntax-body ,body
,requires ,syntax-requires ,template-requires ,label-requires ,requires ,syntax-requires ,template-requires ,label-requires
,more-requires-count . ,more-requires) ,more-requires-count . ,more-requires)
(make-mod name self-modidx (make-mod name srcname self-modidx
prefix (let loop ([l phase-data]) prefix (let loop ([l phase-data])
(if (null? l) (if (null? l)
null null

View File

@ -90,6 +90,7 @@
[max-let-depth exact-nonnegative-integer?])) [max-let-depth exact-nonnegative-integer?]))
(define-form-struct (mod form) ([name symbol?] (define-form-struct (mod form) ([name symbol?]
[srcname symbol?]
[self-modidx module-path-index?] [self-modidx module-path-index?]
[prefix prefix?] [prefix prefix?]
[provides (listof (list/c (or/c exact-integer? #f) [provides (listof (list/c (or/c exact-integer? #f)

View File

@ -0,0 +1,2 @@
DrSc
(This code is registered with Apple.)

View File

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

View File

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

View File

@ -14,8 +14,8 @@
(define (install-variation variant) (define (install-variation variant)
(parameterize ([current-launcher-variant variant]) (parameterize ([current-launcher-variant variant])
(make-mred-launcher (make-mred-launcher
(list "-ZmvqL" "drscheme.rkt" "drscheme") (list "-ZmvqL" "drracket.rkt" "drracket")
(mred-program-launcher-path "DrScheme") (mred-program-launcher-path "DrScheme")
(cons (cons
`(exe-name . "DrScheme") `(exe-name . "DrRacket")
(build-aux-from-path (build-path (collection-path "drscheme") "drscheme")))))) (build-aux-from-path (build-path (collection-path "drracket") "drracket"))))))

View File

@ -0,0 +1,2 @@
#lang racket/base
(require "drracket.rkt")

View File

@ -100,8 +100,8 @@
(cond (cond
[(or prince-kuhio-day? kamehameha-day?) [(or prince-kuhio-day? kamehameha-day?)
(set-splash-progress-bar? #f) (set-splash-progress-bar? #f)
(let ([size ((dynamic-require 'drscheme/private/palaka 'palaka-pattern-size) 4)]) (let ([size ((dynamic-require 'drracket/private/palaka 'palaka-pattern-size) 4)])
(vector (dynamic-require 'drscheme/private/honu-logo 'draw-honu) (vector (dynamic-require 'drracket/private/honu-logo 'draw-honu)
size size
size))] size))]
[texas-independence-day? [texas-independence-day?
@ -134,10 +134,10 @@
(label "Break All Threads") (label "Break All Threads")
(callback (callback
(λ (x y) (λ (x y)
((dynamic-require 'drscheme/private/key 'break-threads)))) ((dynamic-require 'drracket/private/key 'break-threads))))
(parent f))]) (parent f))])
(send f show #t))))) (send f show #t)))))
(dynamic-require 'drscheme/tool-lib #f) (dynamic-require 'drracket/tool-lib #f)
(shutdown-splash) (shutdown-splash)
(close-splash) (close-splash)

View File

@ -1437,9 +1437,22 @@
(define/override (get-transformer-module) #f) (define/override (get-transformer-module) #f)
(define/override (default-settings) (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))) (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 (define get-all-scheme-manual-keywords
(let ([words #f]) (let ([words #f])
@ -1514,7 +1527,7 @@
(list -200 3) (list -200 3)
#t #t
(string-constant pretty-big-scheme-one-line-summary) (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 (add-language
(make-simple '(lib "r5rs/lang.rkt") (make-simple '(lib "r5rs/lang.rkt")
"plt:r5rs" "plt:r5rs"

View File

@ -85,7 +85,7 @@
(define id (reconstitute #,ctc provide?)) (define id (reconstitute #,ctc provide?))
#,@(if (syntax-e #'provide?) #,@(if (syntax-e #'provide?)
(list (list
#`(require/doc drscheme/private/recon) #`(require/doc drracket/private/recon)
#`(provide/doc #`(provide/doc
(thing-doc id (thing-doc id
contract? contract?

View File

@ -161,7 +161,7 @@
(= (vector-length printable) (= (vector-length printable)
(procedure-arity make-simple-settings)) (procedure-arity make-simple-settings))
(boolean? (vector-ref printable 0)) (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) (memq (vector-ref printable 2)
'(mixed-fraction '(mixed-fraction
mixed-fraction-e mixed-fraction-e
@ -172,7 +172,7 @@
(memq (vector-ref printable 5) '(none debug debug/profile test-coverage)) (memq (vector-ref printable 5) '(none debug debug/profile test-coverage))
(apply make-simple-settings (vector->list printable)))) (apply make-simple-settings (vector->list printable))))
(define/public (default-settings) (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) (define/public (default-settings? x)
(equal? (simple-settings->vector x) (equal? (simple-settings->vector x)
(simple-settings->vector (default-settings)))) (simple-settings->vector (default-settings))))
@ -198,7 +198,7 @@
insert-newlines insert-newlines
annotations)) annotations))
;; case-sensitive : boolean ;; 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) ;; fraction-style : (union 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e)
;; show-sharing : boolean ;; show-sharing : boolean
;; insert-newlines : boolean ;; insert-newlines : boolean
@ -267,18 +267,19 @@
(string-constant output-style-label) (string-constant output-style-label)
(list (string-constant constructor-printing-style) (list (string-constant constructor-printing-style)
(string-constant quasiquote-printing-style) (string-constant quasiquote-printing-style)
(string-constant write-printing-style)
(string-constant print-printing-style)) (string-constant print-printing-style))
output-panel output-panel
(λ (rb evt) (λ (rb evt) (enable-fraction-style))
(let ([on? (not (= (send rb get-selection) 3))])
(send fraction-style enable on?)
(send show-sharing enable on?)
(send insert-newlines enable on?)))
'(horizontal vertical-label))] '(horizontal vertical-label))]
[fraction-style [fraction-style
(make-object check-box% (string-constant decimal-notation-for-rationals) (make-object check-box% (string-constant decimal-notation-for-rationals)
output-panel output-panel
void)] 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% [show-sharing (make-object check-box%
(string-constant sharing-printing-label) (string-constant sharing-printing-label)
output-panel output-panel
@ -299,7 +300,8 @@
(case (send output-style get-selection) (case (send output-style get-selection)
[(0) 'constructor] [(0) 'constructor]
[(1) 'quasiquote] [(1) 'quasiquote]
[(2) 'write]) [(2) 'trad-write]
[(3) 'print])
(if (send fraction-style get-value) (if (send fraction-style get-value)
'repeating-decimal-e 'repeating-decimal-e
'mixed-fraction-e) 'mixed-fraction-e)
@ -320,7 +322,9 @@
(case (simple-settings-printing-style settings) (case (simple-settings-printing-style settings)
[(constructor) 0] [(constructor) 0]
[(quasiquote) 1] [(quasiquote) 1]
[(write) 2])) [(write trad-write) 2]
[(print) 3]))
(enable-fraction-style)
(send fraction-style set-value (eq? (simple-settings-fraction-style settings) (send fraction-style set-value (eq? (simple-settings-fraction-style settings)
'repeating-decimal-e)) 'repeating-decimal-e))
(send show-sharing set-value (simple-settings-show-sharing settings)) (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 ;; 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) (define (simple-module-based-language-render-value/format value settings port width)
(let ([converted-value (simple-module-based-language-convert-value value settings)]) (let-values ([(converted-value write?)
(setup-printing-parameters (call-with-values
(λ () (lambda ()
(cond (simple-module-based-language-convert-value value settings))
[(simple-settings-insert-newlines settings) (case-lambda
(if (number? width) [(converted-value) (values converted-value #t)]
(parameterize ([pretty-print-columns width]) [(converted-value write?) (values converted-value write?)]))])
(pretty-print converted-value port)) (let ([pretty-out (if write? pretty-write pretty-print)])
(pretty-print converted-value port))] (setup-printing-parameters
[else (λ ()
(parameterize ([pretty-print-columns 'infinity]) (cond
(pretty-print converted-value port)) [(simple-settings-insert-newlines settings)
(newline port)])) (if (number? width)
settings (parameterize ([pretty-print-columns width])
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)) (define default-pretty-print-current-style-table (pretty-print-current-style-table))
@ -415,11 +426,11 @@
(write-special (render-syntax/snip value) port)] (write-special (render-syntax/snip value) port)]
[else (write-special (value->snip value) port)]))] [else (write-special (value->snip value) port)]))]
[print-graph [print-graph
;; only turn on print-graph when using `write' printing ;; only turn on print-graph when using `write' or `print' printing
;; style because the sharing is being taken care of ;; style, because the sharing is being taken care of
;; by the print-convert sexp construction when using ;; by the print-convert sexp construction when using
;; other printing styles. ;; 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))]) (simple-settings-show-sharing settings))])
(thunk)))) (thunk))))
@ -429,7 +440,8 @@
;; simple-module-based-language-convert-value : TST settings -> TST ;; simple-module-based-language-convert-value : TST settings -> TST
(define (simple-module-based-language-convert-value value settings) (define (simple-module-based-language-convert-value value settings)
(case (simple-settings-printing-style settings) (case (simple-settings-printing-style settings)
[(write) value] [(print) (values value #f)]
[(write trad-write) value]
[(constructor) [(constructor)
(parameterize ([constructor-style-printing #t] (parameterize ([constructor-style-printing #t]
[show-sharing (simple-settings-show-sharing settings)] [show-sharing (simple-settings-show-sharing settings)]
@ -477,11 +489,16 @@
(global-port-print-handler (global-port-print-handler
(λ (value port) (λ (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 (setup-printing-parameters
(λ () (λ ()
(parameterize ([pretty-print-columns 'infinity]) (parameterize ([pretty-print-columns 'infinity])
(pretty-print converted-value port))) ((if write? pretty-write pretty-print) converted-value port)))
setting setting
'infinity)))) 'infinity))))
(current-inspector (make-inspector)) (current-inspector (make-inspector))
@ -507,20 +524,18 @@
(define (render-value value port) (define (render-value value port)
(parameterize ([pretty-print-columns 'infinity]) (parameterize ([pretty-print-columns 'infinity])
(pretty-print (convert-value value) port))) ,(case (simple-settings-printing-style setting)
[(print) `(pretty-print value port)]
(define (convert-value value) [(write trad-write) `(pretty-write value port)]
,(case (simple-settings-printing-style setting) [(constructor)
[(write) `value] `(parameterize ([constructor-style-printing #t]
[(constructor) [show-sharing ,(simple-settings-show-sharing setting)])
`(parameterize ([constructor-style-printing #t] (pretty-write (print-convert value) port))]
[show-sharing ,(simple-settings-show-sharing setting)]) [(quasiquote)
(print-convert value))] `(parameterize ([constructor-style-printing #f]
[(quasiquote) [show-sharing ,(simple-settings-show-sharing setting)])
`(parameterize ([constructor-style-printing #f] (pretty-write (print-convert value) port))])))
[show-sharing ,(simple-settings-show-sharing setting)])
(print-convert value))]))
,(if (memq (simple-settings-annotations setting) '(debug debug/profile test-coverage)) ,(if (memq (simple-settings-annotations setting) '(debug debug/profile test-coverage))
`(require errortrace) `(require errortrace)
`(void)) `(void))
@ -660,7 +675,7 @@
(define base-rb (and (boolean? show-base) (define base-rb (and (boolean? show-base)
(instantiate radio-box% () (instantiate radio-box% ()
(label (string-constant executable-base)) (label (string-constant executable-base))
(choices (list "MzScheme" "MrEd")) (choices (list "Racket" "GRacket"))
(parent base-panel) (parent base-panel)
(callback (lambda (rb e) (reset-filename-suffix)))))) (callback (lambda (rb e) (reset-filename-suffix))))))
@ -1121,7 +1136,7 @@
((if gui? make-mred-launcher make-mzscheme-launcher) ((if gui? make-mred-launcher make-mzscheme-launcher)
(list (list
(path->string (path->string
(build-path (collection-path "drscheme" "private") (build-path (collection-path "drracket" "private")
(if gui? (if gui?
"launcher-mred-bootstrap.rkt" "launcher-mred-bootstrap.rkt"
"launcher-mz-bootstrap.rkt"))) "launcher-mz-bootstrap.rkt")))

View File

@ -141,7 +141,7 @@
(if (vector? info-result) (if (vector? info-result)
'hash-lang-racket 'hash-lang-racket
(get-lang-name pos)) (get-lang-name pos))
'drscheme/private/module-language-tools) 'drracket/private/module-language-tools)
((if (vector? info-result) ((if (vector? info-result)
(vector-ref info-result 0) (vector-ref info-result 0)
info-result) info-result)

View File

@ -106,7 +106,7 @@
(define/override (default-settings) (define/override (default-settings)
(let ([super-defaults (super default-settings)]) (let ([super-defaults (super default-settings)])
(make-module-language-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) '(default)
#() #()
@ -163,7 +163,15 @@
(andmap string? (vector->list command-line-args)) (andmap string? (vector->list command-line-args))
(string? auto-text) (string? auto-text)
(boolean? compilation-on?) (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 (and super
(apply make-module-language-settings (apply make-module-language-settings
(append (append
@ -204,11 +212,11 @@
(case annotations (case annotations
[(none) [(none)
(use-compiled-file-paths (use-compiled-file-paths
(cons (build-path "compiled" "drscheme") (cons (build-path "compiled" "drracket")
(use-compiled-file-paths)))] (use-compiled-file-paths)))]
[(debug) [(debug)
(use-compiled-file-paths (use-compiled-file-paths
(cons (build-path "compiled" "drscheme" "errortrace") (cons (build-path "compiled" "drracket" "errortrace")
(use-compiled-file-paths)))])) (use-compiled-file-paths)))]))
(current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler))

View File

@ -5,5 +5,5 @@
(provide snip-class) (provide snip-class)
(define snip-class (make-object number-snip: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) (send (get-the-snip-class-list) add snip-class)

View File

@ -19,7 +19,8 @@ This file sets up the right lexical environment to invoke the tools that want to
mrlib/switchable-button mrlib/switchable-button
string-constants) 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^] (import [prefix drscheme:frame: drracket:frame^]
[prefix drscheme:unit: drracket:unit^] [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 () (syntax-case stx ()
[(_ body tool-name) [(_ body tool-name)
(let () (let ()
(define tool-lib-src (build-path (collection-path "drracket") "tool-lib.rkt"))
(define full-sexp (define full-sexp
(call-with-input-file (build-path (collection-path "drscheme") "tool-lib.rkt") (call-with-input-file tool-lib-src
(λ (port) (λ (port)
(parameterize ([read-accept-reader #t]) (parameterize ([read-accept-reader #t])
(read port))))) (read port)))))
(register-external-file tool-lib-src)
(let loop ([sexp full-sexp]) (let loop ([sexp full-sexp])
(match sexp (match sexp
[`((#%module-begin ,body ...)) [`((#%module-begin ,body ...))

View File

@ -13,7 +13,8 @@
mrlib/switchable-button mrlib/switchable-button
string-constants) 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^] (import [prefix drracket:frame: drracket:frame^]
[prefix drracket:unit: drracket:unit^] [prefix drracket:unit: drracket:unit^]
@ -322,11 +323,15 @@ string-constants)
(syntax-case stx () (syntax-case stx ()
[(_ body tool-name) [(_ body tool-name)
(let () (let ()
(define tool-lib-src (build-path (collection-path "drracket") "tool-lib.rkt"))
(define full-sexp (define full-sexp
(call-with-input-file (build-path (collection-path "drscheme") "tool-lib.rkt") (call-with-input-file tool-lib-src
(λ (port) (λ (port)
(parameterize ([read-accept-reader #t]) (parameterize ([read-accept-reader #t])
(read port))))) (read port)))))
(register-external-file tool-lib-src)
(let loop ([sexp full-sexp]) (let loop ([sexp full-sexp])
(match sexp (match sexp

View File

@ -23,11 +23,11 @@ If the namespace does not, they are colored the unbound color.
scheme/class scheme/class
scheme/list scheme/list
scheme/promise scheme/promise
drscheme/tool drracket/tool
syntax/toplevel syntax/toplevel
syntax/boundmap syntax/boundmap
mrlib/switchable-button mrlib/switchable-button
(prefix-in drracket:arrow: drscheme/arrow) (prefix-in drracket:arrow: drracket/arrow)
(prefix-in fw: framework/framework) (prefix-in fw: framework/framework)
mred mred
framework framework

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -1,67 +1,2 @@
#lang racket/base #lang racket/base
(require scheme/gui/base "private/key.rkt") (require drracket/drracket)
(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)

View File

@ -1,13 +1,4 @@
#lang setup/infotab #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-names '("DrScheme"))
(define mred-launcher-libraries '("drscheme.rkt")) (define mred-launcher-libraries '("drscheme.rkt"))

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,3 @@
#lang racket/base #lang racket/base
(require "private/drsig.ss") (require drracket/tool)
(provide drracket:tool^ (provide (all-from-out drracket/tool))
drracket:tool-exports^
drscheme:tool^
(rename-out [drracket:tool-exports^ drscheme:tool-exports^]))

View File

@ -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 compiled-object file). The @scheme[quiet?] argument indicates whether
command should be echoed to the current output port. The command should be echoed to the current output port. The
@scheme[include-dirs] argument is a list of directories to search for @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.} directories are added automatically.}
@ -358,20 +358,20 @@ Appends the platform-standard dynamic-extension file suffix to
(program any/c #f)) (program any/c #f))
(or/c path? false/c)]{ (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 path. Unlike the other functions below, when @scheme[program] is not
@scheme[#f], then any suffix (including no suffix) is allowed. If @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.} @scheme[#f] is returned.}
@defproc[(extract-base-filename/c (s path-string?) @defproc[(extract-base-filename/c (s path-string?)
(program any/c #f)) (program any/c #f))
(or/c path? false/c)]{ (or/c path? false/c)]{
Strips the Scheme file suffix from @scheme[s] and Strips the Racket file suffix from @scheme[s] and
returns a stripped path. If @scheme[s] is not a Scheme file name 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 @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.} returned.}
@defproc[(extract-base-filename/kp (s path-string?) (program any/c #f)) (or/c path? false/c)]{ @defproc[(extract-base-filename/kp (s path-string?) (program any/c #f)) (or/c path? false/c)]{

View File

@ -46,6 +46,14 @@ wraps the load of the module.)
(drscheme:language:simple-module-based-language->module-based-language-mixin (drscheme:language:simple-module-based-language->module-based-language-mixin
language-base%)) language-base%))
(define/override (use-namespace-require/copy?) #t) (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) (define/override (on-execute settings run-in-user-thread)
(super on-execute settings run-in-user-thread) (super on-execute settings run-in-user-thread)
(print-mpair-curly-braces #f) (print-mpair-curly-braces #f)

View File

@ -1,2 +1,3 @@
#lang s-exp syntax/module-reader #lang s-exp syntax/module-reader
eopl eopl
#:language-info '#(scheme/language-info get-info #f)

View File

@ -10,9 +10,9 @@
@title[#:tag "top"]{@bold{Errortrace}: Debugging and Profiling} @title[#:tag "top"]{@bold{Errortrace}: Debugging and Profiling}
@bold{Errortrace} is a stack-trace-on-exceptions, profiler, and @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 provides more. Meanwhile, using Errortrace might be better than
MzScheme's limited stack-trace reporting. Racket's limited stack-trace reporting.
@table-of-contents[] @table-of-contents[]
@ -29,19 +29,19 @@ Then,
@itemize[ @itemize[
@item{If your program has a module file @nonterm{prog}, run it with @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 @item{If you program is a non-module top-level sequence of
definitions and expressions, you can instead add definitions and expressions, you can instead add
@schemeblock[(require errortrace)] @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: 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 @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}: before @Flag{l}:
@commandline{mzscheme -i -l errortrace}} @commandline{racket -i -l errortrace}}
] ]
After starting @schememodname[errortrace] in one of these ways, when an After starting @schememodname[errortrace] in one of these ways, when an
@ -64,7 +64,7 @@ handler or the error display handler.
Invoking the Invoking the
@schememodname[errortrace] module sets the compilation @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 display handler to report source information for an exception, and it
sets the @scheme[use-compiled-file-paths] parameter to trigger the use sets the @scheme[use-compiled-file-paths] parameter to trigger the use
of Errortrace-specific @filepath{.zo} files. of Errortrace-specific @filepath{.zo} files.

View File

@ -1,7 +1,7 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@bold{File}: PLT File Format Libraries} @title{@bold{File}: Racket File Format Libraries}
@table-of-contents[] @table-of-contents[]

View File

@ -247,7 +247,7 @@
(-> void?) (-> void?)
() ()
@{Adds a preferences panel for configuring options related to @{Adds a preferences panel for configuring options related to
Scheme.}) Racket.})
(proc-doc/names (proc-doc/names
preferences:add-to-warnings-checkbox-panel preferences:add-to-warnings-checkbox-panel
@ -261,7 +261,7 @@
(((is-a?/c vertical-panel%) . -> . void?) . -> . void?) (((is-a?/c vertical-panel%) . -> . void?) . -> . void?)
(proc) (proc)
@{Saves @scheme[proc] until the preferences panel is created, when it @{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.}) the panel.})
(proc-doc/names (proc-doc/names
@ -1343,14 +1343,14 @@
scheme:get-keymap scheme:get-keymap
(-> (is-a?/c keymap%)) (-> (is-a?/c keymap%))
() ()
@{Returns a keymap with binding suitable for Scheme.}) @{Returns a keymap with binding suitable for Racket.})
(proc-doc/names (proc-doc/names
scheme:add-coloring-preferences-panel scheme:add-coloring-preferences-panel
(-> any) (-> any)
() ()
@{ @{
Installs the ``Scheme'' preferences panel in the ``Syntax Coloring'' Installs the ``Racket'' preferences panel in the ``Syntax Coloring''
section.}) section.})
(proc-doc/names (proc-doc/names
@ -1359,7 +1359,7 @@
() ()
@{Returns @{Returns
a table mapping from symbols 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 These symbols are suitable for input to
@scheme[scheme:short-sym->pref-name] and @scheme[scheme:short-sym->pref-name] and
@ -1373,7 +1373,7 @@
() ()
@{Returns @{Returns
a table mapping from symbols 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. the user chooses the white-on-black mode in the preferences dialog.
See also @scheme[scheme:get-color-prefs-table].}) See also @scheme[scheme:get-color-prefs-table].})
@ -1399,7 +1399,7 @@
(-> (is-a?/c editor-wordbreak-map%)) (-> (is-a?/c editor-wordbreak-map%))
() ()
@{This method returns a @scheme[editor-wordbreak-map%] that is suitable @{This method returns a @scheme[editor-wordbreak-map%] that is suitable
for Scheme.}) for Racket.})
(proc-doc/names (proc-doc/names
scheme:init-wordbreak-map scheme:init-wordbreak-map
@ -1411,7 +1411,7 @@
scheme:setup-keymap scheme:setup-keymap
((is-a?/c keymap%) . -> . void?) ((is-a?/c keymap%) . -> . void?)
(keymap) (keymap)
@{Initializes @scheme[keymap] with Scheme-mode keybindings.}) @{Initializes @scheme[keymap] with Racket-mode keybindings.})
(proc-doc/names (proc-doc/names
editor:set-default-font-color editor:set-default-font-color

View File

@ -323,7 +323,7 @@
(define (add-coloring-preferences-panel) (define (add-coloring-preferences-panel)
(color-prefs:add-to-preferences-panel (color-prefs:add-to-preferences-panel
"Scheme" "Racket"
(λ (parent) (λ (parent)
(for-each (for-each
(λ (line) (λ (line)
@ -1186,8 +1186,8 @@
(values lexeme type paren start end backup-delta mode))))) (values lexeme type paren start end backup-delta mode)))))
(define/override (put-file text sup directory default-name) (define/override (put-file text sup directory default-name)
(parameterize ([finder:default-extension "ss"] (parameterize ([finder:default-extension "rkt"]
[finder:default-filters '(["Scheme Sources" "*.ss;*.scm"] [finder:default-filters '(["Racket Sources" "*.rkt;*.ss;*.scm"]
["Any" "*.*"])]) ["Any" "*.*"])])
;; don't call the surrogate's super, since it sets the default extension ;; don't call the surrogate's super, since it sets the default extension
(sup directory default-name))) (sup directory default-name)))

View File

@ -17,8 +17,8 @@
@author["Greg Cooper"] @author["Greg Cooper"]
The @schememodname[frtime] language supports declarative construction of The @schememodname[frtime] language supports declarative construction of
reactive systems in a syntax very similar to that of MzScheme. To reactive systems in a syntax very similar to that of Racket. To
interact with FrTime, select FrTime from the "Choose Language" menu. interact with FrTime, select @onscreen{FrTime} from the @onscreen{Choose Language} menu.
You can also make FrTime the language for a module: You can also make FrTime the language for a module:
@schemeblock[ @schemeblock[
@ -144,7 +144,7 @@ anything else.}
any]{provides a mechanism for applying ordinary Scheme primitives to any]{provides a mechanism for applying ordinary Scheme primitives to
behaviors. If any of the @scheme[val]s are behaviors, returns a behaviors. If any of the @scheme[val]s are behaviors, returns a
behavior whose current value is always equal to @scheme[(proc 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.} implicitly lifted.}
The following forms allow importation of lifted procedures that aren't The following forms allow importation of lifted procedures that aren't

View File

@ -3,7 +3,7 @@
@gametitle["Pousse" "pousse" "Tic-Tac-Toe-like Game"] @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). 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 Initially the board is empty, and the players take turns inserting one
marker of their color (@onscreen{X} or @onscreen{O}) on the board. marker of their color (@onscreen{X} or @onscreen{O}) on the board.

View File

@ -215,7 +215,7 @@ For @scheme[fern1], you will probably want to point the turtle up
before running this one, with something like: before running this one, with something like:
@schemeblock[ @schemeblock[
@scheme[(turn/radians (- (/ pi 2)))] (turn/radians (- (/ pi 2)))
] ]
For @scheme[fern2], you may need to backup a little.} For @scheme[fern2], you may need to backup a little.}

View File

@ -1,8 +1,9 @@
#lang scheme/base #lang scheme/base
;; Builds different kinds of executables for different platforms. ;; Builds different kinds of executables for different platforms.
;; The `plt-help' executable is for backward compatibity.
;; proposed changes below -robby. ;; The `Racket Documentation' executable is to help Windows and
;; Mac users who are completely lost and need something to click.
(provide post-installer) (provide post-installer)
(require launcher) (require launcher)
@ -23,11 +24,11 @@
make-mzscheme-launcher make-mzscheme-launcher
mzscheme-program-launcher-path mzscheme-program-launcher-path
'()))) '())))
(for ([variant (variants)]) (for ([variant (remove* '(script-3m script-cgc) (variants))])
(parameterize ([current-launcher-variant variant]) (parameterize ([current-launcher-variant variant])
(mk-launcher '("-l-" "help/help") (mk-launcher '("-l-" "help/help")
(mk-path "plt-help") ;; change to "Racket Docs" (mk-path (if mr? "Racket Documentation" "plt-help"))
`([exe-name . "plt-help"] ;; get rid of this (in favor of 'raco docs') `([exe-name . ,(if mr? "Racket Documentation" "plt-help")]
[relative? . #t] [relative? . #t]
[framework-root . #f] [framework-root . #f]
[dll-dir . #f] [dll-dir . #f]

View File

@ -196,17 +196,24 @@
(set-printing-parameters (set-printing-parameters
settings settings
(λ () (λ ()
(let ([converted-value (drscheme:language:simple-module-based-language-convert-value value settings)]) (let-values ([(converted-value write?)
(cond (call-with-values
[(drscheme:language:simple-settings-insert-newlines settings) (lambda ()
(if (number? width) (drscheme:language:simple-module-based-language-convert-value value settings))
(parameterize ([pretty-print-columns width]) (case-lambda
(pretty-write converted-value port)) [(converted-value) (values converted-value #t)]
(pretty-write converted-value port))] [(converted-value write?) (values converted-value write?)]))])
[else (let ([pretty-out (if write? pretty-write pretty-print)])
(parameterize ([pretty-print-columns 'infinity]) (cond
(pretty-write converted-value port)) [(drscheme:language:simple-settings-insert-newlines settings)
(newline port)]))))) (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 settings
width)) width))
@ -309,13 +316,11 @@
(case (drscheme:language:simple-settings-printing-style settings) (case (drscheme:language:simple-settings-printing-style settings)
[(constructor) 0] [(constructor) 0]
[(quasiquote) 1] [(quasiquote) 1]
[(write) 2] [(print trad-write write) 2])
[(print) 2])
(case (drscheme:language:simple-settings-printing-style settings) (case (drscheme:language:simple-settings-printing-style settings)
[(constructor) 0] [(constructor) 0]
[(quasiquote) 0] [(quasiquote) 0]
[(write) 1] [(print trad-write write) 1])))
[(print) 1])))
(send fraction-style set-selection (send fraction-style set-selection
(case (drscheme:language:simple-settings-fraction-style settings) (case (drscheme:language:simple-settings-fraction-style settings)
[(mixed-fraction) 0] [(mixed-fraction) 0]

View File

@ -63,8 +63,9 @@ Student language for @|htdp|; see @htdp-ref["advanced"].
@defmodule[lang/plt-pretty-big-text] @defmodule[lang/plt-pretty-big-text]
The @schememodname[lang/plt-pretty-big-text] module is similar to the The @schememodname[lang/plt-pretty-big-text] module is similar to the
@italic{HtDP} Advanced Student language, but with more of PLT Scheme's @italic{HtDP} Advanced Student language, but with more of Racket's
libraries. It provides the bindings of @schememodname[mzscheme], libraries in legacy form. It provides the bindings of
@schememodname[mzscheme],
@schememodname[mzlib/etc], @schememodname[mzlib/file], @schememodname[mzlib/etc], @schememodname[mzlib/file],
@schememodname[mzlib/list], @schememodname[mzlib/class], @schememodname[mzlib/list], @schememodname[mzlib/class],
@schememodname[mzlib/unit], @schememodname[mzlib/include], @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 The @schememodname[lang/plt-pretty-big] module extends
@scheme[lang/plt-pretty-big-text] with @schememodname[scheme/gui/base] @scheme[lang/plt-pretty-big-text] with @schememodname[scheme/gui/base]
and @schememodname[lang/imageeq]. This language corresponds to the and @schememodname[lang/imageeq]. This language corresponds to the
@onscreen{Pretty Big Scheme} legacy language in DrScheme. @onscreen{Pretty Big} legacy language in DrRacket.
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------

View File

@ -5,6 +5,6 @@
(define scribblings '(("lazy.scrbl" () (experimental)))) (define scribblings '(("lazy.scrbl" () (experimental))))
(define drscheme-language-modules '(("lazy.ss" "lazy"))) (define drscheme-language-modules '(("lazy.ss" "lazy")))
(define drscheme-language-positions (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-numbers '((1000 -500)))
(define drscheme-language-one-line-summaries '("Lazy Scheme")) (define drscheme-language-one-line-summaries '("Lazy Racket"))

View File

@ -34,13 +34,13 @@
@(require scribble/manual) @(require scribble/manual)
@title{@bold{Lazy Scheme}} @title{@bold{Lazy Racket}}
@author["Eli Barzilay"] @author["Eli Barzilay"]
@defmodulelang[lazy] @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 can be used to write lazy code. To write lazy code, simply use
@schememodname[lazy] as your module's language: @schememodname[lazy] as your module's language:

View File

@ -2,7 +2,7 @@
(require scheme/list (require scheme/list
scheme/class scheme/class
scheme/gui scheme/gui
drscheme/arrow drracket/arrow
framework/framework framework/framework
unstable/interval-map unstable/interval-map
unstable/gui/notify unstable/gui/notify

View File

@ -16,9 +16,9 @@
@title{@bold{Make}: Dependency Manager} @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 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[] @table-of-contents[]
@ -26,7 +26,7 @@ syntax of @exec{make}, only in Scheme.
@section[#:tag "overview"]{Overview} @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 dependency tracking, just use @exec{raco make} as described in
@|raco-manual|.} @|raco-manual|.}
@ -77,10 +77,10 @@ utility uses existing programs to build your project --- each rule has
a shell command line. a shell command line.
The @schememodname[make] library provides similar functionality, The @schememodname[make] library provides similar functionality,
except that the description is in Scheme, and the steps that are except that the description is in Racket, and the steps that are
needed to build target files are implemented as Scheme functions. 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[ @schemeblock[
(require make) (require make)
@ -258,7 +258,7 @@ function helps with a few:
@item{taming to some degree the differing conventions of Unix and @item{taming to some degree the differing conventions of Unix and
Windows, } 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} @item{using a pre-compiled binary when a @filepath{precompiled}
directory is present.} directory is present.}

View File

@ -89,6 +89,18 @@ _raco_planet()
COMPREPLY=( $(compgen -W "${planetcmds}" -- ${cur}) ) 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() _raco()
{ {
COMPREPLY=() COMPREPLY=()
@ -101,8 +113,8 @@ _raco()
if [ $COMP_CWORD -eq 1 ]; then if [ $COMP_CWORD -eq 1 ]; then
# removing the empty string on the next line breaks things. such as my brain. # 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 ) 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 "${cmds}" -- ${cur})) COMPREPLY=($(compgen -W "${raco_cmds}" -- ${cur}))
elif [ $COMP_CWORD -eq 2 ]; then elif [ $COMP_CWORD -eq 2 ]; then
# Here we'll handle the main raco commands # Here we'll handle the main raco commands
local prev="${COMP_WORDS[1]}" local prev="${COMP_WORDS[1]}"
@ -120,7 +132,8 @@ _raco()
planet) planet)
_raco_planet _raco_planet
;; ;;
--help) help)
_raco_help
;; ;;
*) *)
_filedir _filedir

View File

@ -150,17 +150,17 @@ src-filter := (src: "")
docs-filter := (- (doc: "") ; all docs, docs-filter := (- (doc: "") ; all docs,
(notes: "") ; excluding basic stuff (notes: "") ; excluding basic stuff
std-docs) ; and things in svn 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/") (collects: "**/scribblings/")
(srcfile: "*.{scrbl|scribble}") (srcfile: "*.{scrbl|scribble}")
std-docs) std-docs)
man-filter := (man: "*") man-filter := (man: "*")
tests-filter := (+ (collects: "**/tests/") (srcfile: "tests.ss")) tests-filter := (+ (collects: "**/tests/") (srcfile: "tests.rkt"))
gui-filter := (- (+ (collects: "**/gui/") (srcfile: "gui.rkt")) gui-filter := (- (+ (collects: "**/gui/") (srcfile: "gui.rkt"))
;; for use in mz code that works in mr too ;; for use in mz code that works in mr too
(srcfile: "scheme/gui/dynamic.rkt") (srcfile: "scheme/gui/dynamic.rkt")
(srcfile: "racket/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 ;; these are in the doc directory, but are comitted in svn and should be
;; considered like sources ;; considered like sources
@ -327,7 +327,7 @@ plt := (+ dr plt-extras)
;; Packages etc ;; Packages etc
mz-base := "/plt/readme.txt" ; generated mz-base := "/plt/readme.txt" ; generated
(package: "mzscheme") (package: "mzscheme") (notes: "racket")
"/plt/include/" "/plt/include/"
;; configuration stuff ;; configuration stuff
(cond (not src) => (collects: "info-domain/")) ; filtered (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 ;; include the time-stamp collection when not a public release
(cond (not release) (cond (not release)
=> (- (collects: "repos-time-stamp/") => (- (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) mz-manuals := (scribblings: "main/") ; generates main pages (next line)
(doc: "license/" "release/" "acks/" "search/" "master-index/" (doc: "license/" "release/" "acks/" "search/"
"getting-started/") "getting-started/")
(notes: "COPYING.LIB" "COPYING-libscheme.txt") (notes: "COPYING.LIB" "COPYING-libscheme.txt")
(doc: "doc-license.txt") ; needed (when docs are included) (doc: "doc-license.txt") ; needed (when docs are included)
(doc+src: "reference/" "guide/" "quick/" "more/" (doc+src: "reference/" "guide/" "quick/" "more/"
"foreign/" "inside/" ;; "places/" <- not ready yet "foreign/" "inside/" ;; "places/" <- not ready yet
"scheme/"
"honu/") "honu/")
(doc: "*.{html|css|js|sxref}") (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/") mr-manuals := (doc+src: "gui/")
dr-base := (package: "drscheme") (package: "framework") dr-base := (package: "drracket") (package: "drscheme") (package: "framework")
dr-manuals := (doc+src: "tools/") dr-manuals := (doc+src: "tools/")
;; Misc hooks, to be added on by package rules below ;; Misc hooks, to be added on by package rules below
@ -362,7 +363,7 @@ dr-extras :=
plt-extras := plt-extras :=
;; Tests definitions ;; 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 ;; Source definitions
@ -383,7 +384,7 @@ mr-src := (src: "mred/" "wxcommon/"
"worksp/{png|wxme|wxs|wxutils|wxwin|zlib}/")) "worksp/{png|wxme|wxs|wxutils|wxwin|zlib}/"))
foreign-src := (src: "foreign/{Makefile.in|README}" foreign-src := (src: "foreign/{Makefile.in|README}"
"foreign/{foreign.*|ssc-utils.ss}" "foreign/{foreign.*|ssc-utils.rkt}"
(cond win => "foreign/libffi_msvc" (cond win => "foreign/libffi_msvc"
else => "foreign/gcc")) else => "foreign/gcc"))
@ -429,7 +430,7 @@ platform-dependent := ; hook for package rules
;; -------------------- setup ;; -------------------- setup
mz-extras :+= (- (package: "setup-plt" #:collection "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 ;; -------------------- raco
mz-extras :+= (package: "raco") mz-extras :+= (package: "raco")
@ -508,7 +509,7 @@ mz-extras :+= (package: "srfi") (doc: "srfi-std")
;; -------------------- xml ;; -------------------- xml
mz-extras :+= (- (package: "xml/") mz-extras :+= (- (package: "xml/")
(cond* (not plt) => (srcfile: "*-{tool|snipclass}.ss" (cond* (not plt) => (srcfile: "*-{tool|snipclass}.rkt"
"xml.png"))) "xml.png")))
;; -------------------- ffi ;; -------------------- ffi
@ -534,7 +535,7 @@ mr-extras :+= (- (+ (package: "mrlib/")
;; -------------------- sgl ;; -------------------- sgl
mr-extras :+= (package: "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/") platform-dependent :+= (and (collects: "sgl/")
(srcfile: "sgl/gl-info")) (srcfile: "sgl/gl-info"))
@ -579,7 +580,7 @@ dr-extras :+= (collects: "defaults/")
;; -------------------- version ;; -------------------- version
mz-extras :+= (- (package: "version/") mz-extras :+= (- (package: "version/")
(cond* (not dr) => (srcfile: "tool.ss"))) (cond* (not dr) => (srcfile: "tool.rkt")))
;; -------------------- browser ;; -------------------- browser
dr-extras :+= (package: "browser/") dr-extras :+= (package: "browser/")
@ -612,14 +613,16 @@ plt-extras :+= (package: "frtime/")
dr-extras :+= (package: "typed-scheme/" ; used in drscheme dr-extras :+= (package: "typed-scheme/" ; used in drscheme
#:docs "ts-{reference|guide}/") #:docs "ts-{reference|guide}/")
(- (collects: "typed/") (- (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 ;; -------------------- gui-debugger
plt-extras :+= (collects: "gui-debugger/") plt-extras :+= (collects: "gui-debugger/")
;; -------------------- swindle ;; -------------------- swindle
mz-extras :+= (- (package: "swindle") mz-extras :+= (- (package: "swindle")
(cond (not dr) => (srcfile: "tool.ss" "swindle*.png"))) (cond (not dr) => (srcfile: "tool.rkt" "swindle*.png")))
;; -------------------- plot ;; -------------------- plot
plt-extras :+= plt-extras :+=
@ -665,4 +668,6 @@ plt-extras :+= (package: "plai/")
plt-extras :+= (package: "racunit/") plt-extras :+= (package: "racunit/")
plt-extras :+= (package: "schemeunit/") plt-extras :+= (package: "schemeunit/")
plt-extras :+= (package: "raclog/")
;; ============================================================================ ;; ============================================================================

View File

@ -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/ctool.rkt" drdr:command-line ""
"collects/compiler/commands/exe-dir.rkt" drdr:command-line "" "collects/compiler/commands/exe-dir.rkt" drdr:command-line ""
"collects/compiler/commands/exe.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/compiler/commands/pack.rkt" drdr:command-line ""
"collects/config" responsible (mflatt eli) "collects/config" responsible (mflatt eli)
"collects/defaults" responsible (robby) "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/run-dmda-code.rkt" drdr:command-line "mzc ~s"
"collects/deinprogramm/turtle.rkt" drdr:command-line "mred-text -t ~s" "collects/deinprogramm/turtle.rkt" drdr:command-line "mred-text -t ~s"
"collects/deinprogramm/world.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" responsible (robby)
"collects/drscheme/arrow.rkt" drdr:command-line "mred-text -t ~s"
"collects/drscheme/drscheme.rkt" drdr:command-line "mzc ~s" "collects/drscheme/drscheme.rkt" drdr:command-line "mzc ~s"
"collects/drscheme/main.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/drscheme/tool-lib.rkt" drdr:command-line "mzc ~s"
"collects/dynext" responsible (mflatt) "collects/dynext" responsible (mflatt)
"collects/dynext/private/macinc.rkt" drdr:command-line "mzscheme -f ~s" "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/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/term-test.rkt" drdr:command-line "mzc ~s"
"collects/redex/tests/tl-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/repo-time-stamp" responsible (eli)
"collects/repos-time-stamp/time-stamp.rkt" drdr:command-line "mred-text -t ~s" "collects/repo-time-stamp/time-stamp.rkt" drdr:command-line "mred-text -t ~s"
"collects/rnrs" responsible (mflatt) "collects/rnrs" responsible (mflatt)
"collects/s-exp" responsible (mflatt eli) "collects/s-exp" responsible (mflatt eli)
"collects/scheme" responsible (mflatt sstrickl samth robby 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" responsible (mflatt eli)
"collects/scribble/run.rkt" drdr:command-line "mzc ~s" "collects/scribble/run.rkt" drdr:command-line "mzc ~s"
"collects/scribble/tools/drscheme-buttons.rkt" drdr:command-line "mred-text ~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" responsible (mflatt eli robby mathias)
"collects/scribblings/foreign/unsafe-foreign.rkt" drdr:command-line "mzc ~s" "collects/scribblings/foreign/unsafe-foreign.rkt" drdr:command-line "mzc ~s"
"collects/scribblings/framework/standard-menus.scrbl" drdr:command-line "" "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" responsible (sperber)
"collects/tests/deinprogramm/image.rkt" drdr:command-line "mred-text -t ~s" "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/deinprogramm/run-image-test.rkt" drdr:command-line "mred-text -t ~s"
"collects/tests/drscheme" responsible (robby) "collects/tests/drracket" responsible (robby)
"collects/tests/drscheme/drscheme-test-util.rkt" drdr:command-line "mred -t ~s" "collects/tests/drracket/drracket-test-util.rkt" drdr:command-line "mred -t ~s"
"collects/tests/drscheme/io.rkt" drdr:command-line "mred ~s" "collects/tests/drracket/io.rkt" drdr:command-line "mred ~s"
"collects/tests/drscheme/language-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 "collects/tests/drracket/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/drracket/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/drracket/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/drracket/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s"
"collects/tests/drscheme/randomly-click-preferences.rkt" drdr:command-line "mzc ~s" "collects/tests/drracket/randomly-click-preferences.rkt" drdr:command-line "mzc ~s"
"collects/tests/drscheme/randomly-click.rkt" drdr:command-line "" "collects/tests/drracket/randomly-click.rkt" drdr:command-line ""
"collects/tests/drscheme/repl-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600 "collects/tests/drracket/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/drracket/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/drracket/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/drracket/stepper-test.rkt" drdr:command-line "mred-text -t ~s"
"collects/tests/drscheme/syncheck-test.rkt" drdr:command-line "mred ~s" "collects/tests/drracket/syncheck-test.rkt" drdr:command-line "mred ~s"
"collects/tests/drscheme/teachpack.rkt" drdr:command-line "mred ~s" "collects/tests/drracket/teachpack.rkt" drdr:command-line "mred ~s"
"collects/tests/drscheme/time-keystrokes.rkt" drdr:command-line "mred-text -t ~s" "collects/tests/drracket/time-keystrokes.rkt" drdr:command-line "mred-text -t ~s"
"collects/tests/framework" responsible (robby) "collects/tests/framework" responsible (robby)
"collects/tests/framework/canvas.rkt" drdr:command-line "mzc -k ~s" "collects/tests/framework/canvas.rkt" drdr:command-line "mzc -k ~s"
"collects/tests/framework/debug.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/gracket" responsible (mflatt)
"doc/release-notes/racket" responsible (mflatt) "doc/release-notes/racket" responsible (mflatt)
"doc/release-notes/stepper" responsible (clements) "doc/release-notes/stepper" responsible (clements)
"man/man1/drscheme.1" responsible (robby)
"man/man1/drracket.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/gracket.1" responsible (mflatt)
"man/man1/mred.1" responsible (mflatt)
"man/man1/mzscheme.1" responsible (mflatt) "man/man1/mzscheme.1" responsible (mflatt)
"man/man1/plt-help.1" responsible (robby)
"man/man1/racket.1" responsible (mflatt) "man/man1/racket.1" responsible (mflatt)
"man/man1/raco.1" responsible (mflatt) "man/man1/raco.1" responsible (mflatt)
"man/man1/plt-help.1" responsible (robby)
"src/Makefile.in" responsible (mflatt) "src/Makefile.in" responsible (mflatt)
"src/README" responsible (mflatt) "src/README" responsible (mflatt)
"src/a-list" responsible (mflatt) "src/a-list" responsible (mflatt)

View File

@ -3,7 +3,7 @@
@title[#:tag "com" #:style 'toc]{COM} @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 component can be scripted in MysterX if it supports OLE Automation via
the @tt{IDispatch} interface, and if it publishes type information the @tt{IDispatch} interface, and if it publishes type information
using the @tt{ITypeInfo} interface. using the @tt{ITypeInfo} interface.

View File

@ -12,7 +12,7 @@
Goodman's @italic{Dynamic HTML} will have more complete information. Goodman's @italic{Dynamic HTML} will have more complete information.
Many of the @scheme[mx-element%] methods have two variants, a 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 @schemeidfont{-native} version that takes or returns a string. For
methods that return values of element properties, we assume two methods that return values of element properties, we assume two
characteristics, which we do not mention in the methods' characteristics, which we do not mention in the methods'

View File

@ -3,7 +3,7 @@
@title[#:tag "methprop"]{COM Methods and Properties} @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 component can be scripted in MysterX if it supports OLE Automation
via the @tt{IDispatch} interface, and if it publishes type via the @tt{IDispatch} interface, and if it publishes type
information using the @tt{ITypeInfo} interface. information using the @tt{ITypeInfo} interface.

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