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:
commit
82ee73ab51
|
@ -9,32 +9,42 @@
|
|||
(printf "a positive number")
|
||||
rate0)
|
||||
|
||||
;; String String Syntax[id] -> Syntax
|
||||
(define (pre-post-name pre post name)
|
||||
;; Syntax String String Syntax[id] -> Syntax
|
||||
(define (pre-post-name stx pre post name)
|
||||
(datum->syntax
|
||||
name (string->symbol (string-append pre (symbol->string (syntax-e name)) post))))
|
||||
|
||||
(provide (all-defined-out)))
|
||||
|
||||
(module clauses scheme
|
||||
(provide (all-defined-out))
|
||||
|
||||
(require syntax/parse (for-syntax scheme 'auxs unstable/syntax)
|
||||
(define-syntax-rule
|
||||
(define-kwd name)
|
||||
(begin
|
||||
(provide name)
|
||||
(define-syntax (name . x)
|
||||
(raise-syntax-error 'name "used out of context" x))))
|
||||
|
||||
(define-kwd on-tick)
|
||||
|
||||
(define-kwd on-mouse))
|
||||
|
||||
(module clauses scheme
|
||||
|
||||
(require syntax/parse 'auxs
|
||||
(for-syntax scheme 'auxs unstable/syntax)
|
||||
(for-template scheme/base 'auxs))
|
||||
|
||||
(provide define-clause)
|
||||
|
||||
(define-syntax (define-clause stx)
|
||||
(syntax-case stx ()
|
||||
[(_ name (proc p-ctc) (rate r-ctc) ...)
|
||||
(with-syntax ([name-clause (pre-post-name "" "-clause" #'name)]
|
||||
(with-syntax ([name-clause (pre-post-name stx "" "-clause" #'name)]
|
||||
[(rate0 ...) (generate-temporaries #'(rate ...))])
|
||||
(with-syntax ([((thing ...) ...) #'((#:with rate #'(r-ctc rate0)) ...)])
|
||||
#`
|
||||
(begin
|
||||
(provide name name-clause)
|
||||
|
||||
(define-syntax (name . x)
|
||||
(raise-syntax-error 'name "used out of context" x))
|
||||
|
||||
(define-syntax-class name-clause
|
||||
#:description (format "~a" 'name)
|
||||
#:literals (name)
|
||||
|
@ -43,75 +53,33 @@
|
|||
#:with (rate0 ...) (map (lambda (x) #'0) '(rate0 ...))
|
||||
#:with proc #'(world->world proc0)
|
||||
thing ... ...)
|
||||
(pattern (on-tick proc0:expr (~var rate0 expr) ...)
|
||||
(pattern (name proc0:expr (~var rate0 expr) ...)
|
||||
#:with proc #'(world->world> proc0)
|
||||
thing ... ...))
|
||||
)))]))
|
||||
|
||||
(define-clause on-mouse (proc world-nat-nat-mouse->world))
|
||||
(define-clause on-tick (proc world->world) (rate (lambda (x) 1/28)))
|
||||
|
||||
;; --- on-tick ---
|
||||
#|
|
||||
(define-syntax (on-tick . x)
|
||||
(raise-syntax-error 'on-tick "used out of context" x))
|
||||
|
||||
(define-syntax-class on-tick-clause
|
||||
#:description "on tick"
|
||||
#:literals (on-tick)
|
||||
#:attributes (proc rate)
|
||||
(pattern (on-tick proc0:expr)
|
||||
#:with proc #'(world->world proc0)
|
||||
#:with rate #'1/28)
|
||||
(pattern (on-tick proc0:expr rate0:expr)
|
||||
#:with proc #'(world->world> proc0)
|
||||
#:with rate #'(positive-number> rate0)))
|
||||
|
||||
(provide on-tick on-tick-clause)
|
||||
|#
|
||||
;; --- on-draw ---
|
||||
(define-syntax (on-draw . x)
|
||||
(raise-syntax-error 'on-draw "used out of context" x))
|
||||
|
||||
(define-syntax-class on-draw-clause
|
||||
#:description "on draw"
|
||||
#:literals (on-draw)
|
||||
#:attributes (proc width height)
|
||||
(pattern (on-draw proc0:expr)
|
||||
#:with proc #'(wrap worldxkey->world proc0)
|
||||
#:with width #'#f
|
||||
#:with height #'#f)
|
||||
(pattern (on-draw proc0:expr width0:expr height0:expr)
|
||||
#:with proc #'(worldxkey->world> proc0)
|
||||
#:with width #'(natural-number> width0)
|
||||
#:with height #'(natural-number> height0)))
|
||||
|
||||
(provide on-draw on-draw-clause))
|
||||
(define-clause on-tick (proc world->world))
|
||||
)
|
||||
|
||||
(module utest scheme
|
||||
(require (for-syntax syntax/parse 'clauses))
|
||||
(require 'clauses (for-syntax 'clauses syntax/parse) (for-template 'clauses))
|
||||
|
||||
(define-syntax (big-bang stx)
|
||||
(syntax-parse stx
|
||||
[(big-bang world0:expr
|
||||
(~or (~optional otc:on-tick-clause)
|
||||
; (~optional omc:on-mouse-clause)
|
||||
(~optional odc:on-draw-clause))
|
||||
(~or (~optional otk:on-tick-clause)
|
||||
(~optional omc:on-mouse-clause))
|
||||
...)
|
||||
#`(printf "~s\n"
|
||||
'(bb world0
|
||||
#,(if (attribute otc)
|
||||
#'otc.rate
|
||||
#'1/28)
|
||||
#,(if (attribute odc)
|
||||
#'odc.proc
|
||||
#''not-draw)))]))
|
||||
#,(if (attribute omc) "mouse" "no mouse")
|
||||
#,(if (attribute otk) "tick" "no tick")))]))
|
||||
|
||||
(big-bang 0)
|
||||
(big-bang 1 (on-tick add1))
|
||||
(big-bang 2 (on-tick add1 1/2))
|
||||
(big-bang 3 (on-draw add1 1/2 1/3))
|
||||
; (big-bang 4 (on-mouse add1 1 2))
|
||||
(big-bang 0)
|
||||
(big-bang 1 (on-tick +) (on-mouse -))
|
||||
(big-bang 2 (on-tick +))
|
||||
(big-bang 3 (on-mouse +))
|
||||
)
|
||||
|
||||
(require 'utest)
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
@section{Implementation}
|
||||
|
||||
The ``Algol 60'' language for DrScheme implements the language defined
|
||||
The ``Algol 60'' language for DrRacket implements the language defined
|
||||
by the ``Revised Report on the Algorithmic Language Algol 60,'' edited
|
||||
by Peter Naur.
|
||||
|
||||
@section{Including Algol 60 Programs}
|
||||
|
||||
Although Algol 60 is mainly provided as a DrScheme language,
|
||||
Although Algol 60 is mainly provided as a DrRacket language,
|
||||
@scheme[include-algol] supports limited use of Algol 60 programs in
|
||||
larger programs.
|
||||
|
||||
|
@ -21,14 +21,14 @@ larger programs.
|
|||
@defform[(include-algol path-string)]{
|
||||
|
||||
Includes the Algol 60 program indicated by @scheme[path-string] as an
|
||||
expression in a Scheme program. The included Algol 60 program is
|
||||
expression in a Racket program. The included Algol 60 program is
|
||||
closed (i.e., it doesn't see any bindings in the included context),
|
||||
and the result is always @|void-const|.}
|
||||
|
||||
|
||||
@section{Language}
|
||||
|
||||
The DrScheme and @scheme[include-algol] implementation departs from
|
||||
The DrRacket and @scheme[include-algol] implementation departs from
|
||||
the Algol 60 specification in the following minor ways:
|
||||
|
||||
@(itemize (item "Strings are not permitted to contain nested quotes.")
|
||||
|
@ -66,6 +66,6 @@ are supported:
|
|||
printn(E) prints the number E
|
||||
printnln(E) prints the number E followed by a newline")
|
||||
|
||||
A prompt in DrScheme's Interactions window accepts whole programs only
|
||||
A prompt in DrRacket's interactions area accepts whole programs only
|
||||
for the Algol 60 language.
|
||||
|
||||
|
|
|
@ -118,6 +118,6 @@
|
|||
`(module m algol60/base
|
||||
,code))
|
||||
(list "-mvqe" "(require m)"))))))
|
||||
(define/public (get-one-line-summary) "Algol 60 (not Scheme at all!)")
|
||||
(define/public (get-one-line-summary) "Of historic interest")
|
||||
|
||||
(super-instantiate ()))))))
|
||||
|
|
|
@ -7,52 +7,52 @@
|
|||
browser/htmltext
|
||||
browser/external
|
||||
browser/tool
|
||||
scheme/base
|
||||
scheme/contract
|
||||
scheme/class
|
||||
scheme/gui/base
|
||||
racket/base
|
||||
racket/contract
|
||||
racket/class
|
||||
racket/gui/base
|
||||
net/url
|
||||
framework/framework))
|
||||
|
||||
@(define-syntax-rule (def-ext id)
|
||||
(begin
|
||||
(require (for-label net/sendurl))
|
||||
(define id (scheme send-url))))
|
||||
(define id (racket send-url))))
|
||||
@(def-ext net-send-url)
|
||||
|
||||
|
||||
@title{@bold{Browser}: Simple HTML Rendering}
|
||||
|
||||
The @schememodname[browser] library provides the following procedures
|
||||
The @racketmodname[browser] library provides the following procedures
|
||||
and classes for parsing and viewing HTML files. The
|
||||
@schememodname[browser/htmltext] library provides a simplified interface
|
||||
for rendering to a subclass of the MrEd @scheme[text%] class. The
|
||||
@schememodname[browser/external] library provides utilities for
|
||||
@racketmodname[browser/htmltext] library provides a simplified interface
|
||||
for rendering to a subclass of the GRacket @racket[text%] class. The
|
||||
@racketmodname[browser/external] library provides utilities for
|
||||
launching an external browser (such as Firefox).
|
||||
|
||||
@section[#:tag "browser"]{Browser}
|
||||
|
||||
@defmodule[browser]
|
||||
|
||||
The browser supports basic HTML commands, plus special Scheme hyperlinks
|
||||
The browser supports basic HTML commands, plus special Racket hyperlinks
|
||||
of the form @litchar{<A MZSCHEME=sexpr>...</A>}. When the user clicks
|
||||
on such a link, the string @scheme[sexpr] is parsed as a Scheme program
|
||||
and evaluated. Since @scheme[sexpr] is likely to contain Scheme
|
||||
on such a link, the string @racket[sexpr] is parsed as a Racket program
|
||||
and evaluated. Since @racket[sexpr] is likely to contain Racket
|
||||
strings, and since escape characters are difficult for people to read, a
|
||||
@litchar{|} character in @scheme[sexpr] is converted to a @litchar{"}
|
||||
@litchar{|} character in @racket[sexpr] is converted to a @litchar{"}
|
||||
character before it is parsed. Thus,
|
||||
|
||||
@verbatim[#:indent 2]{
|
||||
<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."
|
||||
]
|
||||
|
||||
The value of that program is a string. When a Scheme hyperlink returns
|
||||
The value of that program is a string. When a Racket hyperlink returns
|
||||
a string, it is parsed as a new HTML document. Thus, where the use
|
||||
clicks on ``Nowhere,'' the result is a new page that says ``This goes
|
||||
nowhere.''
|
||||
|
@ -75,16 +75,16 @@ of a string, it replaces the comment in the document. Other types of
|
|||
return values are ignored.
|
||||
|
||||
If the html file is being accessed as a @litchar{file:} url, the
|
||||
@scheme[current-load-relative-directory] parameter is set to the
|
||||
directory during the evaluation of the mzscheme code (in both
|
||||
examples). The Scheme code is executed through @scheme[eval].
|
||||
@racket[current-load-relative-directory] parameter is set to the
|
||||
directory during the evaluation of the mzracket code (in both
|
||||
examples). The Racket code is executed through @racket[eval].
|
||||
|
||||
The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
||||
@litchar{file:} url that points into the @scheme[doc] collection.
|
||||
@litchar{file:} url that points into the @racket[doc] collection.
|
||||
|
||||
@defproc[(open-url [url (or/c url? string? input-port?)]) (is-a?/c hyper-frame%)]{
|
||||
Opens the given url in a vanilla browser frame and returns the
|
||||
frame. The frame is an instance of @scheme[hyper-frame%].
|
||||
frame. The frame is an instance of @racket[hyper-frame%].
|
||||
}
|
||||
|
||||
@defboolparam[html-img-ok ok?]{
|
||||
|
@ -102,13 +102,13 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
@defmixin[hyper-frame-mixin (frame%) ()]{
|
||||
|
||||
@defconstructor/auto-super[([url (or/c url? string? input-port?)])]{
|
||||
Shows the frame and visits @scheme[url].
|
||||
Shows the frame and visits @racket[url].
|
||||
}
|
||||
|
||||
@defmethod[(get-hyper-panel%) (subclass?/c panel%)]{
|
||||
Returns the class that is instantiated when the frame is created.
|
||||
Must be a panel with hyper-panel-mixin mixed in. Defaults to just
|
||||
returning @scheme[hyper-panel%].
|
||||
returning @racket[hyper-panel%].
|
||||
}
|
||||
|
||||
@defmethod[(get-hyper-panel) (is-a?/c panel%)]{
|
||||
|
@ -125,7 +125,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
@; ----------------------------------------------------------------------
|
||||
|
||||
@defmixin[hyper-no-show-frame-mixin (frame%) ()]{
|
||||
The same as the @scheme[hyper-frame-mixin], except that it doesn't
|
||||
The same as the @racket[hyper-frame-mixin], except that it doesn't
|
||||
show the frame and the initialization arguments are unchanged.
|
||||
}
|
||||
|
||||
|
@ -139,21 +139,21 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
|
||||
@defmixin[hyper-text-mixin (text%) ()]{
|
||||
|
||||
An instance of a @scheme[hyper-text-mixin]-extended class should be
|
||||
An instance of a @racket[hyper-text-mixin]-extended class should be
|
||||
displayed only in an instance of a class created with
|
||||
@scheme[hyper-canvas-mixin].
|
||||
@racket[hyper-canvas-mixin].
|
||||
|
||||
@defconstructor/auto-super[([url (or/c url? string? input-port?)]
|
||||
[status-frame
|
||||
(or/c (is-a?/c top-level-window<%>) false/c)]
|
||||
[post-data (or/c false/c bytes?)])]{
|
||||
The @scheme[url] is loaded into the @scheme[text%] object (using the
|
||||
The @racket[url] is loaded into the @racket[text%] object (using the
|
||||
@method[hyper-text-mixin reload] method), a top-level window for
|
||||
status messages and dialogs, a progress procedure used as for
|
||||
@scheme[get-url], and either @scheme[#f] or a post string to be sent
|
||||
@racket[get-url], and either @racket[#f] or a post string to be sent
|
||||
to a web server (technically changing the GET to a POST).
|
||||
|
||||
Sets the autowrap-bitmap to @scheme[#f].
|
||||
Sets the autowrap-bitmap to @racket[#f].
|
||||
}
|
||||
|
||||
@defmethod[(map-shift-style [start exact-nonnegative-integer?]
|
||||
|
@ -170,7 +170,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
}
|
||||
|
||||
@defmethod[(get-url) (or/c url? string? input-port? false/c)]{
|
||||
Returns the URL displayed by the editor, or @scheme[#f] if there is
|
||||
Returns the URL displayed by the editor, or @racket[#f] if there is
|
||||
none.
|
||||
}
|
||||
|
||||
|
@ -194,9 +194,9 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
(or/c exact-nonnegative-integer? false/c)]{
|
||||
Finds the location of a tag in the buffer (where tags are installed
|
||||
in HTML with @litchar{<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,
|
||||
@scheme[#f] is returned.
|
||||
@racket[#f] is returned.
|
||||
}
|
||||
|
||||
@defmethod[(remove-tag [name string?]) void?]{
|
||||
|
@ -215,11 +215,11 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
Installs a hyperlink.
|
||||
}
|
||||
|
||||
@defmethod[(add-scheme-callback [start exact-nonnegative-integer?]
|
||||
@defmethod[(add-racket-callback [start exact-nonnegative-integer?]
|
||||
[end exact-nonnegative-integer?]
|
||||
[scheme-expr string?])
|
||||
[racket-expr string?])
|
||||
void?]{
|
||||
Installs a Scheme evaluation hyperlink.
|
||||
Installs a Racket evaluation hyperlink.
|
||||
}
|
||||
|
||||
@defmethod[(add-thunk-callback [start exact-nonnegative-integer?]
|
||||
|
@ -229,7 +229,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
Installs a thunk-based hyperlink.
|
||||
}
|
||||
|
||||
@defmethod[(eval-scheme-string [str string?]) any]{
|
||||
@defmethod[(eval-racket-string [str string?]) any]{
|
||||
Called to handle the @litchar{<A MZSCHEME="expr">...</A>} tag and
|
||||
@litchar{<! MZSCHEME="expr">} comments (see above). Evaluates the
|
||||
string; if the result is a string, it is opened as an HTML page.
|
||||
|
@ -239,13 +239,13 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
Reloads the current page.
|
||||
|
||||
The text defaultly uses the basic style named
|
||||
@scheme["Html Standard"] in the editor (if it exists).
|
||||
@racket["Html Standard"] in the editor (if it exists).
|
||||
}
|
||||
|
||||
@defmethod[(remap-url [url (or/c url? string?)]) (or/c url? string?)]{
|
||||
When visiting a new page, this method is called to remap the url.
|
||||
The remapped url is used in place of the original url. If this
|
||||
method returns @scheme[#f], the page doesn't go anywhere.
|
||||
method returns @racket[#f], the page doesn't go anywhere.
|
||||
|
||||
This method may be killed (if the user clicks the ``stop'' button).
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
|
||||
@defclass[hyper-text% (hyper-text-mixin text:keymap%) ()]{
|
||||
|
||||
Extends the @scheme[text:keymap%] class to support standard key
|
||||
Extends the @racket[text:keymap%] class to support standard key
|
||||
bindings in the browser window.
|
||||
|
||||
}
|
||||
|
@ -270,8 +270,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
|
||||
@defmixin[hyper-canvas-mixin (editor-canvas%) ()]{
|
||||
|
||||
A @scheme[hyper-can-mixin]-extended canvas's parent should be an
|
||||
instance of a class derived with @scheme[hyper-panel-mixin].
|
||||
A @racket[hyper-can-mixin]-extended canvas's parent should be an
|
||||
instance of a class derived with @racket[hyper-panel-mixin].
|
||||
|
||||
@defconstructor/auto-super[()]{
|
||||
}
|
||||
|
@ -279,8 +279,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
@defmethod[(get-editor%) (subclass?/c text%)]{
|
||||
|
||||
Returns the class used to implement the editor in the browser
|
||||
window. It should be derived from @scheme[hyper-text%] and should
|
||||
pass on the initialization arguments to @scheme[hyper-text%].
|
||||
window. It should be derived from @racket[hyper-text%] and should
|
||||
pass on the initialization arguments to @racket[hyper-text%].
|
||||
|
||||
The dynamic extent of the initialization of this editor is called on
|
||||
a thread that may be killed (via a custodian shutdown). In that
|
||||
|
@ -299,30 +299,30 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
[post-data (or/c bytes? false/c) #f])
|
||||
void?]{
|
||||
Changes to the given url, loading it by calling the
|
||||
@scheme[make-editor] method. If @scheme[relative-to-url] is not
|
||||
@scheme[#f], it must be a URL for resolving @scheme[url] as a
|
||||
relative URL. @scheme[url] may also be a port, in which case,
|
||||
@scheme[relative-to-url] must be @scheme[#f].
|
||||
@racket[make-editor] method. If @racket[relative-to-url] is not
|
||||
@racket[#f], it must be a URL for resolving @racket[url] as a
|
||||
relative URL. @racket[url] may also be a port, in which case,
|
||||
@racket[relative-to-url] must be @racket[#f].
|
||||
|
||||
The @scheme[progress-proc] procedure is called with a boolean at the
|
||||
The @racket[progress-proc] procedure is called with a boolean at the
|
||||
point where the URL has been resolved and enough progress has been
|
||||
made to dismiss any message that the URL is being resolved. The
|
||||
procedure is called with @scheme[#t] if the URL will be loaded into
|
||||
a browser window, @scheme[#f] otherwise (e.g., the user will save
|
||||
procedure is called with @racket[#t] if the URL will be loaded into
|
||||
a browser window, @racket[#f] otherwise (e.g., the user will save
|
||||
the URL content to a file).
|
||||
|
||||
If @scheme[post-data-bytes] is a byte string instead of false, the
|
||||
If @racket[post-data-bytes] is a byte string instead of false, the
|
||||
URL GET is changed to a POST with the given data.
|
||||
}
|
||||
|
||||
@defmethod[(set-page [page any/c] [notify? any/c]) void?]{
|
||||
Changes to the given page. If @scheme[notify?] is not @scheme[#f],
|
||||
Changes to the given page. If @racket[notify?] is not @racket[#f],
|
||||
the canvas's parent is notified about the change by calling its
|
||||
@scheme[leaving-page] method.
|
||||
@racket[leaving-page] method.
|
||||
}
|
||||
|
||||
@defmethod[(after-set-page) void?]{
|
||||
Called during @scheme[set-page]. Defaultly does nothing.
|
||||
Called during @racket[set-page]. Defaultly does nothing.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -334,28 +334,28 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
Creates controls and a hyper text canvas. The controls permit a
|
||||
user to move back and forth in the hypertext history.
|
||||
|
||||
The @scheme[info-line?] argument indicates whether the browser
|
||||
The @racket[info-line?] argument indicates whether the browser
|
||||
should contain a line to display special @litchar{DOCNOTE} tags in a
|
||||
page. Such tags are used primarily by the PLT documentation.
|
||||
}
|
||||
|
||||
@defmethod[(make-canvas [container (is-a?/c area-container<%>)]) void?]{
|
||||
Creates the panel's hypertext canvas, an instance of a class derived
|
||||
using @scheme[hyper-canvas-mixin]. This method is called during
|
||||
using @racket[hyper-canvas-mixin]. This method is called during
|
||||
initialization.
|
||||
}
|
||||
|
||||
@defmethod[(get-canvas%) (subclass?/c editor-canvas%)]{
|
||||
Returns the class instantiated by make-canvas. It must be derived
|
||||
from @scheme[hyper-canvas-mixin].
|
||||
from @racket[hyper-canvas-mixin].
|
||||
}
|
||||
|
||||
@defmethod[(make-control-bar-panel [container (is-a?/c area-container<%>)])
|
||||
any/c]{
|
||||
Creates the panel's sub-container for the control bar containing the
|
||||
navigation buttons. If @scheme[#f] is returned, the panel will have
|
||||
navigation buttons. If @racket[#f] is returned, the panel will have
|
||||
no control bar. The default method instantiates
|
||||
@scheme[horizontal-panel%].
|
||||
@racket[horizontal-panel%].
|
||||
}
|
||||
|
||||
@defmethod[(rewind) void?]{
|
||||
|
@ -373,15 +373,15 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
@defmethod[(on-navigate) void?]{
|
||||
Callback that is invoked any time the displayed hypertext page
|
||||
changes (either by clicking on a link in the canvas or by
|
||||
@scheme[rewind] or @scheme[forward] calls).
|
||||
@racket[rewind] or @racket[forward] calls).
|
||||
}
|
||||
|
||||
@defmethod[(leaving-page [page any/c] [new-page any/c])
|
||||
any]{
|
||||
This method is called by the hypertext canvas to notify the panel
|
||||
that the hypertext page changed. The @scheme[page] is @scheme[#f]
|
||||
if @scheme[new-page] is the first page for the canvas. See also
|
||||
@scheme[page->editor].
|
||||
that the hypertext page changed. The @racket[page] is @racket[#f]
|
||||
if @racket[new-page] is the first page for the canvas. See also
|
||||
@racket[page->editor].
|
||||
}
|
||||
|
||||
@defmethod[(filter-notes [notes (listof string?)])
|
||||
|
@ -391,7 +391,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
}
|
||||
|
||||
@defmethod[(reload) void?]{
|
||||
Reloads the currently visible page by calling the @scheme[reload]
|
||||
Reloads the currently visible page by calling the @racket[reload]
|
||||
method of the currently displayed hyper-text.
|
||||
}
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
|
||||
@defproc[(editor->page [editor (is-a?/c text%)]) any/c]{
|
||||
Creates a page record for the given editor, suitable for use with the
|
||||
@scheme[set-page] method of @scheme[hyper-canvas-mixin].
|
||||
@racket[set-page] method of @racket[hyper-canvas-mixin].
|
||||
}
|
||||
|
||||
@defproc[(page->editor [page any/c]) (is-a?/c text%)]{
|
||||
|
@ -416,7 +416,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
}
|
||||
|
||||
@defclass[image-map-snip% snip% ()]{
|
||||
Instances of this class behave like @scheme[image-snip%] objects,
|
||||
Instances of this class behave like @racket[image-snip%] objects,
|
||||
except they have a @litchar{<map> ... </map>} associated with them and
|
||||
when clicking on them (in the map) they will cause their init arg text
|
||||
to follow the corresponding link.
|
||||
|
@ -425,7 +425,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
}
|
||||
|
||||
@defmethod[(set-key [key string?]) void?]{
|
||||
Sets the key for the image map (eg, @scheme["#key"]).
|
||||
Sets the key for the image map (eg, @racket["#key"]).
|
||||
}
|
||||
|
||||
@defmethod[(get-key) string?]{
|
||||
|
@ -436,8 +436,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
[region (listof number?)]
|
||||
[href string?])
|
||||
void?]{
|
||||
Registers the shape named by @scheme[shape] whose coordinates are
|
||||
specified by @scheme[region] to go to @scheme[href] when that region
|
||||
Registers the shape named by @racket[shape] whose coordinates are
|
||||
specified by @racket[region] to go to @racket[href] when that region
|
||||
of the image is clicked on.
|
||||
}
|
||||
}
|
||||
|
@ -449,8 +449,8 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
@defmodule[browser/browser-unit]
|
||||
|
||||
@defthing[browser@ unit?]{
|
||||
Imports @scheme[mred^], @scheme[tcp^], and @scheme[url^], and exports
|
||||
@scheme[browser^].
|
||||
Imports @racket[mred^], @racket[tcp^], and @racket[url^], and exports
|
||||
@racket[browser^].
|
||||
}
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
@ -460,7 +460,7 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
@defmodule[browser/browser-sig]
|
||||
|
||||
@defsignature[browser^ ()]{
|
||||
Includes all of the bindings of the @schememodname[browser] library.
|
||||
Includes all of the bindings of the @racketmodname[browser] library.
|
||||
}
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
@ -472,12 +472,12 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
@definterface[html-text<%> (text%)]{
|
||||
|
||||
@defmethod[(get-url) (or/c url? string? false/c)]{
|
||||
Returns a base URL used for building relative URLs, or @scheme[#f]
|
||||
Returns a base URL used for building relative URLs, or @racket[#f]
|
||||
if no base is available.
|
||||
}
|
||||
|
||||
@defmethod[(set-title [str string?]) void?]{
|
||||
Registers the title @scheme[str] for the rendered page.
|
||||
Registers the title @racket[str] for the rendered page.
|
||||
}
|
||||
|
||||
@defmethod[(add-link [start exact-nonnegative-integer?]
|
||||
|
@ -497,11 +497,11 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
Changes the style for the given range to the link style.
|
||||
}
|
||||
|
||||
@defmethod[(add-scheme-callback [start exact-nonnegative-integer?]
|
||||
@defmethod[(add-racket-callback [start exact-nonnegative-integer?]
|
||||
[end exact-nonnegative-integer?]
|
||||
[scheme-expr string?])
|
||||
[racket-expr string?])
|
||||
void?]{
|
||||
Installs a Scheme evaluation hyperlink.
|
||||
Installs a Racket evaluation hyperlink.
|
||||
}
|
||||
|
||||
@defmethod[(add-thunk-callback [start exact-nonnegative-integer?]
|
||||
|
@ -519,9 +519,9 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
|
||||
|
||||
@defmixin[html-text-mixin (text%) ()]{
|
||||
Extends the given @scheme[text%] class with implementations of the
|
||||
@scheme[html-text<%>] methods. Hyperlinks are attached to clickbacks
|
||||
that use @net-send-url from @schememodname[net/sendurl].
|
||||
Extends the given @racket[text%] class with implementations of the
|
||||
@racket[html-text<%>] methods. Hyperlinks are attached to clickbacks
|
||||
that use @net-send-url from @racketmodname[net/sendurl].
|
||||
}
|
||||
|
||||
@defproc[(render-html-to-text [in input-port?]
|
||||
|
@ -529,12 +529,12 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
[load-img? any/c]
|
||||
[eval-mz? any/c])
|
||||
void?]{
|
||||
Reads HTML from @scheme[in] and renders it to @scheme[dest]. If
|
||||
@scheme[load-img?] is @scheme[#f], then images are rendered as Xed-out
|
||||
boxes. If @scheme[eval-mz?] is @scheme[#f], then @litchar{MZSCHEME}
|
||||
Reads HTML from @racket[in] and renders it to @racket[dest]. If
|
||||
@racket[load-img?] is @racket[#f], then images are rendered as Xed-out
|
||||
boxes. If @racket[eval-mz?] is @racket[#f], then @litchar{MZSCHEME}
|
||||
hyperlink expressions and comments are not evaluated.
|
||||
|
||||
Uses the style named @scheme["Html Standard"] in the editor's
|
||||
Uses the style named @racket["Html Standard"] in the editor's
|
||||
style-list (if it exists) for all of the inserted text's default
|
||||
style.
|
||||
}
|
||||
|
@ -546,21 +546,21 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
@defmodule[browser/external]
|
||||
|
||||
@defproc[(send-url [str null] [separate-window? void #t]) null]{
|
||||
Like @net-send-url from @scheme[net/sendurl], but under Unix, the user
|
||||
Like @net-send-url from @racket[net/sendurl], but under Unix, the user
|
||||
is prompted for a browser to use if none is recorded in the
|
||||
preferences file.
|
||||
}
|
||||
|
||||
@defproc[(browser-preference? [v any/c]) boolean?]{
|
||||
Returns @scheme[#t] if @scheme[v] is a valid browser preference.
|
||||
Returns @racket[#t] if @racket[v] is a valid browser preference.
|
||||
}
|
||||
|
||||
@defproc[(update-browser-preference [url (or/c string? false/c)]) void?]{
|
||||
Under Unix, prompts the user for a browser preference and records the
|
||||
user choice as a framework preference (even if one is already
|
||||
recorded). If @scheme[url] is not @scheme[#f], it is used in the
|
||||
dialog to explain which URL is to be opened; if it is @scheme[#f], the
|
||||
@scheme['internal] will be one of the options for the user.
|
||||
recorded). If @racket[url] is not @racket[#f], it is used in the
|
||||
dialog to explain which URL is to be opened; if it is @racket[#f], the
|
||||
@racket['internal] will be one of the options for the user.
|
||||
}
|
||||
|
||||
@defproc[(install-help-browser-preference-panel) void?]{
|
||||
|
@ -569,19 +569,19 @@ The @litchar{MZSCHEME} forms are disabled unless the web page is a
|
|||
|
||||
@defproc[(add-to-browser-prefs-panel [proc ((is-a?/c panel%) . -> . any)])
|
||||
void?]{
|
||||
The @scheme[proc] is called when the ``Browser'' panel is constructed
|
||||
for preferences. The supplied argument is the panel, so @scheme[proc]
|
||||
The @racket[proc] is called when the ``Browser'' panel is constructed
|
||||
for preferences. The supplied argument is the panel, so @racket[proc]
|
||||
can add additional option controls. If the panel is already created,
|
||||
@scheme[proc] is called immediately.
|
||||
@racket[proc] is called immediately.
|
||||
}
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
||||
@section[#:tag "tool"]{DrScheme Browser Preference Panel}
|
||||
@section[#:tag "tool"]{DrRacket Browser Preference Panel}
|
||||
|
||||
@defmodule[browser/tool]
|
||||
|
||||
@defthing[tool@ unit?]{
|
||||
A unit that implements a DrScheme tool to add the ``Browser''
|
||||
A unit that implements a DrRacket tool to add the ``Browser''
|
||||
preference panel.
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
compiler/cffi
|
||||
mzlib/include))
|
||||
|
||||
@(define mzc (exec "mzc"))
|
||||
@(define ctool (exec "raco ctool"))
|
||||
@(define cpp tt)
|
||||
@(define inside @other-manual['(lib "scribblings/inside/inside.scrbl")])
|
||||
|
||||
|
@ -23,53 +23,53 @@
|
|||
@(define (argtype scm desc c . cases)
|
||||
(item (apply lines
|
||||
scm
|
||||
@elem{Scheme range: @|desc|}
|
||||
@elem{Racket range: @|desc|}
|
||||
@elem{C type: @|c|}
|
||||
cases)))
|
||||
|
||||
@(define (toC . content)
|
||||
(apply elem "Scheme to C conversion: " content))
|
||||
@(define (toScheme . content)
|
||||
(apply elem "C to Scheme conversion: " content))
|
||||
(apply elem "Racket to C conversion: " content))
|
||||
@(define (toRacket . content)
|
||||
(apply elem "C to Racket conversion: " content))
|
||||
@(define tosObvious
|
||||
(elem "conversions: (obvious and precise)"))
|
||||
@(define goesto 'rarr)
|
||||
|
||||
|
||||
|
||||
@title{@scheme[c-lambda]: C FFI via @exec{mzc}}
|
||||
@title{@scheme[c-lambda]: C FFI via @exec{raco ctool}}
|
||||
|
||||
@defmodule[compiler/cffi]{
|
||||
|
||||
The @schememodname[compiler/cffi] module relies on a C compiler to
|
||||
statically construct an interface to C code through directives
|
||||
embedded in a Scheme program. The library implements a subset of
|
||||
embedded in a Racket program. The library implements a subset of
|
||||
@as-index{Gambit-C}'s foreign-function interface @cite["Feeley98"].}
|
||||
|
||||
The @schememodname[scheme/foreign] library is a better interface for
|
||||
The @racketmodname[ffi/unsafe] library is a better interface for
|
||||
most tasks; see @other-manual['(lib
|
||||
"scribblings/foreign/foreign.scrbl")] for more information on
|
||||
@schememodname[scheme/foreign]. See also @|inside|, which describes
|
||||
PLT Scheme's C-level API for extending the run-time system.
|
||||
@racketmodname[ffi/unsafe]. See also @|inside|, which describes
|
||||
Racket's C-level API for extending the run-time system.
|
||||
|
||||
The @schememodname[compiler/cffi] library defines three forms:
|
||||
@scheme[c-lambda], @scheme[c-declare], and @scheme[c-include]. When
|
||||
interpreted directly or compiled to byte code, @scheme[c-lambda]
|
||||
produces a function that always raises @scheme[exn:fail], and
|
||||
@scheme[c-declare] and @scheme[c-include] raise
|
||||
@scheme[exn:fail]. When compiled by @exec{mzc --extension}, the forms
|
||||
provide access to C. Thus, @schememodname[compiler/cffi] is normally
|
||||
required by a module to be compiled via @|mzc|. In addition, the
|
||||
@|mzc| compiler implicitly imports @schememodname[compiler/cffi] into
|
||||
the top-level environment for non-@scheme[module] compilation.
|
||||
The @racketmodname[compiler/cffi] library defines three forms:
|
||||
@racket[c-lambda], @racket[c-declare], and @racket[c-include]. When
|
||||
interpreted directly or compiled to byte code, @racket[c-lambda]
|
||||
produces a function that always raises @racket[exn:fail], and
|
||||
@racket[c-declare] and @racket[c-include] raise
|
||||
@racket[exn:fail]. When compiled by @exec{raco ctool --extension}, the forms
|
||||
provide access to C. Thus, @racketmodname[compiler/cffi] is normally
|
||||
required by a module to be compiled via @|ctool|. In addition, the
|
||||
@|ctool| compiler implicitly imports @racketmodname[compiler/cffi] into
|
||||
the top-level environment for non-@racket[module] compilation.
|
||||
|
||||
The @scheme[c-lambda] form creates a Scheme procedure whose body is
|
||||
The @racket[c-lambda] form creates a Racket procedure whose body is
|
||||
implemented in C. Instead of declaring argument names, a
|
||||
@scheme[c-lambda] form declares argument types, as well as a return
|
||||
@racket[c-lambda] form declares argument types, as well as a return
|
||||
type. The implementation can be simply the name of a C function, as in
|
||||
the following definition of @scheme[fmod]:
|
||||
the following definition of @racket[fmod]:
|
||||
|
||||
@schemeblock[
|
||||
@racketblock[
|
||||
(define fmod (c-lambda (double double) double "fmod"))
|
||||
]
|
||||
|
||||
|
@ -78,199 +78,199 @@ of a function, where the arguments are bound to @cpp{___arg1} (three
|
|||
underscores), etc., and the result is installed into @cpp{___result}
|
||||
(three underscores):
|
||||
|
||||
@schemeblock[
|
||||
@racketblock[
|
||||
(define machine-string->float
|
||||
(c-lambda (char-string) float
|
||||
"___result = *(float *)___arg1;"))
|
||||
]
|
||||
|
||||
The @scheme[c-lambda] form provides only limited conversions between C
|
||||
and Scheme data. For example, the following function does not reliably
|
||||
The @racket[c-lambda] form provides only limited conversions between C
|
||||
and Racket data. For example, the following function does not reliably
|
||||
produce a string of four characters:
|
||||
|
||||
@schemeblock[
|
||||
@racketblock[
|
||||
(define broken-machine-float->string
|
||||
(c-lambda (float) char-string
|
||||
"char b[5]; *(float *)b = ___arg1; b[4] = 0; ___result = b;"))
|
||||
]
|
||||
|
||||
because the representation of a @cpp{float} can contain null bytes,
|
||||
which terminate the string. However, the full MzScheme API, which is
|
||||
which terminate the string. However, the full Racket API, which is
|
||||
described in @|inside|, can be used in a function body:
|
||||
|
||||
@schemeblock[
|
||||
@racketblock[
|
||||
(define machine-float->string
|
||||
(c-lambda (float) scheme-object
|
||||
(c-lambda (float) racket-object
|
||||
"char b[4];"
|
||||
"*(float *)b = ___arg1;"
|
||||
"___result = scheme_make_sized_byte_string(b, 4, 1);"))
|
||||
"___result = racket_make_sized_byte_string(b, 4, 1);"))
|
||||
]
|
||||
|
||||
The @scheme[c-declare] form declares arbitrary C code to appear after
|
||||
The @racket[c-declare] form declares arbitrary C code to appear after
|
||||
@filepath{escheme.h} or @filepath{scheme.h} is included, but before
|
||||
any other code in the compilation environment of the declaration. It
|
||||
is often used to declare C header file inclusions. For example, a
|
||||
proper definition of @scheme[fmod] needs the @filepath{math.h} header
|
||||
proper definition of @racket[fmod] needs the @filepath{math.h} header
|
||||
file:
|
||||
|
||||
@schemeblock[
|
||||
@racketblock[
|
||||
(c-declare "#include <math.h>")
|
||||
(define fmod (c-lambda (double double) double "fmod"))
|
||||
]
|
||||
|
||||
The @scheme[c-declare] form can also be used to define helper C
|
||||
functions to be called through @scheme[c-lambda].
|
||||
The @racket[c-declare] form can also be used to define helper C
|
||||
functions to be called through @racket[c-lambda].
|
||||
|
||||
The @scheme[c-include] form expands to a @scheme[c-declare] form using
|
||||
the content of a specified file. Use @scheme[(c-include _file)] instead
|
||||
of @scheme[(c-declare "#include file")] when it's easier to
|
||||
have MzScheme resolve the file path than to have the C compiler
|
||||
The @racket[c-include] form expands to a @racket[c-declare] form using
|
||||
the content of a specified file. Use @racket[(c-include _file)] instead
|
||||
of @racket[(c-declare "#include file")] when it's easier to
|
||||
have Racket resolve the file path than to have the C compiler
|
||||
resolve it.
|
||||
|
||||
The @filepath{plt/collects/mzscheme/examples} directory in the PLT
|
||||
The @filepath{collects/mzscheme/examples} directory in the Racket
|
||||
distribution contains additional examples.
|
||||
|
||||
When compiling for MzScheme3m (see @|inside|), C code inserted by
|
||||
@scheme[c-lambda], @scheme[c-declare], and @scheme[c-include] will be
|
||||
transformed in the same was as @|mzc|'s @DFlag{xform} mode (which may
|
||||
or may not be enough to make the code work correctly in MzScheme3m;
|
||||
When compiling for Racket 3m (see @|inside|), C code inserted by
|
||||
@racket[c-lambda], @racket[c-declare], and @racket[c-include] will be
|
||||
transformed in the same was as @|ctool|'s @DFlag{xform} mode (which may
|
||||
or may not be enough to make the code work correctly in Racket 3m;
|
||||
see @|inside| for more information).
|
||||
|
||||
|
||||
@defform[(c-lambda (argument-type ...) return-type impl-string ...+)]{
|
||||
|
||||
Creates a Scheme procedure whose body is implemented in C. The
|
||||
Creates a Racket procedure whose body is implemented in C. The
|
||||
procedure takes as many arguments as the supplied
|
||||
@scheme[argument-type]s, and it returns one value. If
|
||||
@scheme[return-type] is @schemeidfont{void}, the procedure's result is
|
||||
always void. The @scheme[impl-string] is either the name of a C
|
||||
@racket[argument-type]s, and it returns one value. If
|
||||
@racket[return-type] is @racketidfont{void}, the procedure's result is
|
||||
always void. The @racket[impl-string] is either the name of a C
|
||||
function (or macro) or the body of a C function.
|
||||
|
||||
If a single @scheme[impl-string] is provided, and if it is a
|
||||
If a single @racket[impl-string] is provided, and if it is a
|
||||
string containing only alphanumeric characters and @litchar{_},
|
||||
then the created Scheme procedure passes all of its arguments to
|
||||
then the created Racket procedure passes all of its arguments to
|
||||
the named C function (or macro) and returns the function's
|
||||
result. Each argument to the Scheme procedure is converted
|
||||
according to the corresponding @scheme[argument-type] (as
|
||||
result. Each argument to the Racket procedure is converted
|
||||
according to the corresponding @racket[argument-type] (as
|
||||
described below) to produce an argument to the C function. Unless
|
||||
@scheme[return-type] is @schemeidfont{void}, the C function's result is
|
||||
converted according to @scheme[return-type] for the Scheme
|
||||
@racket[return-type] is @racketidfont{void}, the C function's result is
|
||||
converted according to @racket[return-type] for the Racket
|
||||
procedure's result.
|
||||
|
||||
If more than @scheme[impl-string] is provided, or if it contains more
|
||||
If more than @racket[impl-string] is provided, or if it contains more
|
||||
than alphanumeric characters and @litchar{_}, then the concatenated
|
||||
@scheme[impl-string]s must contain C code to implement the function
|
||||
@racket[impl-string]s must contain C code to implement the function
|
||||
body. The converted arguments for the function will be in variables
|
||||
@cpp{___arg1}, @cpp{___arg2}, ... (with three underscores in each
|
||||
name) in the context where the @scheme[impl-string]s are placed for
|
||||
compilation. Unless @scheme[return-type] is @schemeidfont{void}, the
|
||||
@scheme[impl-string]s code should assign a result to the variable
|
||||
name) in the context where the @racket[impl-string]s are placed for
|
||||
compilation. Unless @racket[return-type] is @racketidfont{void}, the
|
||||
@racket[impl-string]s code should assign a result to the variable
|
||||
@cpp{___result} (three underscores), which will be declared but not
|
||||
initialized. The @scheme[impl-string]s code should not return
|
||||
initialized. The @racket[impl-string]s code should not return
|
||||
explicitly; control should always reach the end of the body. If the
|
||||
@scheme[impl-string]s code defines the pre-processor macro
|
||||
@racket[impl-string]s code defines the pre-processor macro
|
||||
@cpp{___AT_END} (with three leading underscores), then the macro's
|
||||
value should be C code to execute after the value @cpp{___result} is
|
||||
converted to a Scheme result, but before the result is returned, all
|
||||
converted to a Racket result, but before the result is returned, all
|
||||
in the same block; defining @cpp{___AT_END} is primarily useful for
|
||||
deallocating a string in @cpp{___result} that has been copied by
|
||||
conversion. The @scheme[impl-string]s code will start on a new line at
|
||||
conversion. The @racket[impl-string]s code will start on a new line at
|
||||
the beginning of a block in its compilation context, and
|
||||
@cpp{___AT_END} will be undefined after the code.
|
||||
|
||||
In addition to @cpp{___arg1}, etc., the variable @cpp{argc} is bound
|
||||
in @scheme[impl-string]s to the number of arguments supplied to
|
||||
the function, and @cpp{argv} is bound to a @cpp{Scheme_Object*} array
|
||||
of length @cpp{argc} containing the function arguments as Scheme
|
||||
in @racket[impl-string]s to the number of arguments supplied to
|
||||
the function, and @cpp{argv} is bound to a @cpp{Racket_Object*} array
|
||||
of length @cpp{argc} containing the function arguments as Racket
|
||||
values. The @cpp{argv} and @cpp{argc} variables are mainly useful for
|
||||
error reporting (e.g., with @cpp{scheme_wrong_type}).
|
||||
error reporting (e.g., with @cpp{racket_wrong_type}).
|
||||
|
||||
Each @scheme[argument-type] must be one of the following, which are
|
||||
Each @racket[argument-type] must be one of the following, which are
|
||||
recognized symbolically:
|
||||
|
||||
@itemize[
|
||||
|
||||
@argtype[@scheme[bool] "any value" @cpp{int}
|
||||
@toC{@scheme[#f] @|goesto| 0, anything else @|goesto| 1}
|
||||
@toScheme{0 @|goesto| @scheme[#f], anything else @|goesto| @scheme[#t]}]
|
||||
@argtype[@racket[bool] "any value" @cpp{int}
|
||||
@toC{@racket[#f] @|goesto| 0, anything else @|goesto| 1}
|
||||
@toRacket{0 @|goesto| @racket[#f], anything else @|goesto| @racket[#t]}]
|
||||
|
||||
@argtype[@scheme[char] "character" @cpp{char}
|
||||
@argtype[@racket[char] "character" @cpp{char}
|
||||
@toC{character's Latin-1 value cast to signed byte}
|
||||
@toScheme{Latin-1 value from unsigned cast mapped to character}]
|
||||
@toRacket{Latin-1 value from unsigned cast mapped to character}]
|
||||
|
||||
@argtype[@scheme[unsigned-char] "character" @cpp{unsigned char}
|
||||
@argtype[@racket[unsigned-char] "character" @cpp{unsigned char}
|
||||
@toC{character's Latin-1 value}
|
||||
@toScheme{Latin-1 value mapped to character}]
|
||||
@toRacket{Latin-1 value mapped to character}]
|
||||
|
||||
@argtype[@scheme[signed-char] "character" @cpp{signed char}
|
||||
@argtype[@racket[signed-char] "character" @cpp{signed char}
|
||||
@toC{character's Latin-1 value cast to signed byte}
|
||||
@toScheme{Latin-1 value from unsigned cast mapped to character}]
|
||||
@toRacket{Latin-1 value from unsigned cast mapped to character}]
|
||||
|
||||
@argtype[@scheme[int] @elem{exact integer that fits into an @cpp{int}} @cpp{int}
|
||||
@argtype[@racket[int] @elem{exact integer that fits into an @cpp{int}} @cpp{int}
|
||||
@tosObvious]
|
||||
|
||||
@argtype[@scheme[unsigned-int] @elem{exact integer that fits into an @cpp{unsigned int}} @cpp{unsigned int}
|
||||
@argtype[@racket[unsigned-int] @elem{exact integer that fits into an @cpp{unsigned int}} @cpp{unsigned int}
|
||||
@tosObvious]
|
||||
|
||||
@argtype[@scheme[long] @elem{exact integer that fits into a @cpp{long}} @cpp{long}
|
||||
@argtype[@racket[long] @elem{exact integer that fits into a @cpp{long}} @cpp{long}
|
||||
@tosObvious]
|
||||
|
||||
@argtype[@scheme[unsigned-long] @elem{exact integer that fits into an @cpp{unsigned long}} @cpp{unsigned long}
|
||||
@argtype[@racket[unsigned-long] @elem{exact integer that fits into an @cpp{unsigned long}} @cpp{unsigned long}
|
||||
@tosObvious]
|
||||
|
||||
@argtype[@scheme[short] @elem{exact integer that fits into a @cpp{short}} @cpp{short}
|
||||
@argtype[@racket[short] @elem{exact integer that fits into a @cpp{short}} @cpp{short}
|
||||
@tosObvious]
|
||||
|
||||
@argtype[@scheme[unsigned-short] @elem{exact integer that fits into an @cpp{unsigned short}} @cpp{unsigned short}
|
||||
@argtype[@racket[unsigned-short] @elem{exact integer that fits into an @cpp{unsigned short}} @cpp{unsigned short}
|
||||
@tosObvious]
|
||||
|
||||
@argtype[@scheme[float] "real number" @cpp{float}
|
||||
@argtype[@racket[float] "real number" @cpp{float}
|
||||
@toC{number converted to inexact and cast to @cpp{float}}
|
||||
@toScheme{cast to @cpp{double} and encapsulated as an inexact number}]
|
||||
@toRacket{cast to @cpp{double} and encapsulated as an inexact number}]
|
||||
|
||||
@argtype[@scheme[double] "real number" @cpp{double}
|
||||
@argtype[@racket[double] "real number" @cpp{double}
|
||||
@toC{number converted to inexact}
|
||||
@toScheme{encapsulated as an inexact number}]
|
||||
@toRacket{encapsulated as an inexact number}]
|
||||
|
||||
@argtype[@scheme[char-string] @elem{byte string or @scheme[#f]} @cpp{char*}
|
||||
@toC{string @|goesto| contained byte-array pointer, @scheme[#f] @|goesto| @cpp{NULL}}
|
||||
@toScheme{@cpp{NULL} @|goesto| @scheme[#f], anything else @|goesto| new byte string created by copying the string}]
|
||||
@argtype[@racket[char-string] @elem{byte string or @racket[#f]} @cpp{char*}
|
||||
@toC{string @|goesto| contained byte-array pointer, @racket[#f] @|goesto| @cpp{NULL}}
|
||||
@toRacket{@cpp{NULL} @|goesto| @racket[#f], anything else @|goesto| new byte string created by copying the string}]
|
||||
|
||||
@argtype[@scheme[nonnull-char-string] "byte string" @cpp{char*}
|
||||
@argtype[@racket[nonnull-char-string] "byte string" @cpp{char*}
|
||||
@toC{byte string's contained byte-array pointer}
|
||||
@toScheme{new byte string created by copying the string}]
|
||||
@toRacket{new byte string created by copying the string}]
|
||||
|
||||
@argtype[@scheme[scheme-object] "any value" @cpp{Scheme_Object*}
|
||||
@argtype[@racket[racket-object] "any value" @cpp{Racket_Object*}
|
||||
@toC{no conversion}
|
||||
@toScheme{no conversion}]
|
||||
@toRacket{no conversion}]
|
||||
|
||||
@argtype[@scheme[(pointer _bstr)] @elem{an opaque c-pointer value, identified as type @scheme[bstr], or @scheme[#f]} @cpp{@scheme[_bstr]*}
|
||||
@toC{@scheme[#f] @|goesto| @cpp{NULL}, c-pointer @|goesto| contained pointer cast to @cpp{@scheme[_bstr]*}}
|
||||
@toScheme{@cpp{NULL} @|goesto| @scheme[#f], anything else @|goesto| new c-pointer containing the pointer
|
||||
and identified as type @scheme[_bstr]}]
|
||||
@argtype[@racket[(pointer _bstr)] @elem{an opaque c-pointer value, identified as type @racket[bstr], or @racket[#f]} @cpp{@racket[_bstr]*}
|
||||
@toC{@racket[#f] @|goesto| @cpp{NULL}, c-pointer @|goesto| contained pointer cast to @cpp{@racket[_bstr]*}}
|
||||
@toRacket{@cpp{NULL} @|goesto| @racket[#f], anything else @|goesto| new c-pointer containing the pointer
|
||||
and identified as type @racket[_bstr]}]
|
||||
|
||||
]
|
||||
|
||||
The @scheme[return-type] must be @schemeidfont{void} or one of the
|
||||
@scheme[arg-type] keywords.}
|
||||
The @racket[return-type] must be @racketidfont{void} or one of the
|
||||
@racket[arg-type] keywords.}
|
||||
|
||||
@defform[(c-declare code-string)]{
|
||||
|
||||
Declares arbitrary C code to appear after @filepath{escheme.h} or
|
||||
@filepath{scheme.h} is included, but before any other code in the
|
||||
compilation environment of the declaration. A @scheme[c-declare] form
|
||||
compilation environment of the declaration. A @racket[c-declare] form
|
||||
can appear only at the top-level or within a module's top-level
|
||||
sequence.
|
||||
|
||||
The @scheme[code] code will appear on a new line in the file for C
|
||||
compilation. Multiple @scheme[c-include] declarations are concatenated
|
||||
The @racket[code] code will appear on a new line in the file for C
|
||||
compilation. Multiple @racket[c-include] declarations are concatenated
|
||||
(with newlines) in order to produces a sequence of declarations.}
|
||||
|
||||
@defform[(c-include path-spec)]{
|
||||
|
||||
Expands to a use of @scheme[c-declare] with the content of
|
||||
@scheme[path-spec]. The @scheme[path-spec] has the same form as for
|
||||
@schememodname[mzlib/include]'s @scheme[include].}
|
||||
Expands to a use of @racket[c-declare] with the content of
|
||||
@racket[path-spec]. The @racket[path-spec] has the same form as for
|
||||
@racketmodname[mzlib/include]'s @racket[include].}
|
||||
|
||||
@(bibliography
|
||||
(bib-entry
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
[("--vv") "Very verbose mode"
|
||||
(verbose #t)
|
||||
(very-verbose #t)]
|
||||
#:args file file))
|
||||
#:args (file . another-file) (cons file another-file)))
|
||||
|
||||
(if (disable-deps)
|
||||
;; Just compile one file:
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
|
||||
(define (decompile-module mod-form stack)
|
||||
(match mod-form
|
||||
[(struct mod (name self-modidx prefix provides requires body syntax-body unexported
|
||||
[(struct mod (name srcname self-modidx prefix provides requires body syntax-body unexported
|
||||
max-let-depth dummy lang-info internal-context))
|
||||
(let-values ([(globs defns) (decompile-prefix prefix)]
|
||||
[(stack) (append '(#%modvars) stack)]
|
||||
|
|
|
@ -90,9 +90,10 @@
|
|||
|
||||
(define (traverse-module mod-form visit)
|
||||
(match mod-form
|
||||
[(struct mod (name self-modidx prefix provides requires body syntax-body unexported
|
||||
[(struct mod (name srcname self-modidx prefix provides requires body syntax-body unexported
|
||||
max-let-depth dummy lang-info internal-context))
|
||||
(traverse-data name visit)
|
||||
(traverse-data srcname visit)
|
||||
(traverse-data self-modidx visit)
|
||||
(traverse-prefix prefix visit)
|
||||
(for-each (lambda (f) (map (lambda (v) (traverse-data v visit)) (cdr f))) requires)
|
||||
|
@ -431,7 +432,7 @@
|
|||
|
||||
(define (out-module mod-form out)
|
||||
(match mod-form
|
||||
[(struct mod (name self-modidx prefix provides requires body syntax-body unexported
|
||||
[(struct mod (name srcname self-modidx prefix provides requires body syntax-body unexported
|
||||
max-let-depth dummy lang-info internal-context))
|
||||
(out-syntax MODULE_EXPD
|
||||
(let* ([lookup-req (lambda (phase)
|
||||
|
@ -504,6 +505,7 @@
|
|||
[l (list* #f #f l)] ; obsolete `functional?' info
|
||||
[l (cons lang-info l)] ; lang-info
|
||||
[l (cons self-modidx l)]
|
||||
[l (cons srcname l)]
|
||||
[l (cons name l)])
|
||||
(make-module-decl l))
|
||||
out)]))
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
|
||||
(define (read-module v)
|
||||
(match v
|
||||
[`(,name ,self-modidx ,lang-info ,functional? ,et-functional?
|
||||
[`(,name ,srcname ,self-modidx ,lang-info ,functional? ,et-functional?
|
||||
,rename ,max-let-depth ,dummy
|
||||
,prefix
|
||||
,indirect-et-provides ,num-indirect-et-provides
|
||||
|
@ -218,7 +218,7 @@
|
|||
[`(,syntax-body ,body
|
||||
,requires ,syntax-requires ,template-requires ,label-requires
|
||||
,more-requires-count . ,more-requires)
|
||||
(make-mod name self-modidx
|
||||
(make-mod name srcname self-modidx
|
||||
prefix (let loop ([l phase-data])
|
||||
(if (null? l)
|
||||
null
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
[max-let-depth exact-nonnegative-integer?]))
|
||||
|
||||
(define-form-struct (mod form) ([name symbol?]
|
||||
[srcname symbol?]
|
||||
[self-modidx module-path-index?]
|
||||
[prefix prefix?]
|
||||
[provides (listof (list/c (or/c exact-integer? #f)
|
||||
|
|
2
collects/drracket/drracket.creator
Normal file
2
collects/drracket/drracket.creator
Normal file
|
@ -0,0 +1,2 @@
|
|||
DrSc
|
||||
(This code is registered with Apple.)
|
67
collects/drracket/drracket.rkt
Normal file
67
collects/drracket/drracket.rkt
Normal 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)
|
10
collects/drracket/info.rkt
Normal file
10
collects/drracket/info.rkt
Normal 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"))
|
|
@ -14,8 +14,8 @@
|
|||
(define (install-variation variant)
|
||||
(parameterize ([current-launcher-variant variant])
|
||||
(make-mred-launcher
|
||||
(list "-ZmvqL" "drscheme.rkt" "drscheme")
|
||||
(list "-ZmvqL" "drracket.rkt" "drracket")
|
||||
(mred-program-launcher-path "DrScheme")
|
||||
(cons
|
||||
`(exe-name . "DrScheme")
|
||||
(build-aux-from-path (build-path (collection-path "drscheme") "drscheme"))))))
|
||||
`(exe-name . "DrRacket")
|
||||
(build-aux-from-path (build-path (collection-path "drracket") "drracket"))))))
|
2
collects/drracket/main.rkt
Normal file
2
collects/drracket/main.rkt
Normal file
|
@ -0,0 +1,2 @@
|
|||
#lang racket/base
|
||||
(require "drracket.rkt")
|
|
@ -100,8 +100,8 @@
|
|||
(cond
|
||||
[(or prince-kuhio-day? kamehameha-day?)
|
||||
(set-splash-progress-bar? #f)
|
||||
(let ([size ((dynamic-require 'drscheme/private/palaka 'palaka-pattern-size) 4)])
|
||||
(vector (dynamic-require 'drscheme/private/honu-logo 'draw-honu)
|
||||
(let ([size ((dynamic-require 'drracket/private/palaka 'palaka-pattern-size) 4)])
|
||||
(vector (dynamic-require 'drracket/private/honu-logo 'draw-honu)
|
||||
size
|
||||
size))]
|
||||
[texas-independence-day?
|
||||
|
@ -134,10 +134,10 @@
|
|||
(label "Break All Threads")
|
||||
(callback
|
||||
(λ (x y)
|
||||
((dynamic-require 'drscheme/private/key 'break-threads))))
|
||||
((dynamic-require 'drracket/private/key 'break-threads))))
|
||||
(parent f))])
|
||||
(send f show #t)))))
|
||||
|
||||
(dynamic-require 'drscheme/tool-lib #f)
|
||||
(dynamic-require 'drracket/tool-lib #f)
|
||||
(shutdown-splash)
|
||||
(close-splash)
|
|
@ -1437,9 +1437,22 @@
|
|||
(define/override (get-transformer-module) #f)
|
||||
|
||||
(define/override (default-settings)
|
||||
(make-simple-settings+assume #f 'write 'mixed-fraction-e #f #t 'debug #t))
|
||||
(make-simple-settings+assume #f 'trad-write 'mixed-fraction-e #f #t 'debug #t))
|
||||
|
||||
(super-new)))
|
||||
|
||||
(define (pretty-big-mixin %)
|
||||
(class %
|
||||
(define/override (default-settings)
|
||||
(let ([s (super default-settings)])
|
||||
(make-simple-settings+assume (drracket:language:simple-settings-case-sensitive s)
|
||||
'trad-write
|
||||
(drracket:language:simple-settings-fraction-style s)
|
||||
(drracket:language:simple-settings-show-sharing s)
|
||||
(drracket:language:simple-settings-insert-newlines s)
|
||||
(drracket:language:simple-settings-annotations s)
|
||||
(simple-settings+assume-no-redef? s))))
|
||||
(super-new)))
|
||||
|
||||
(define get-all-scheme-manual-keywords
|
||||
(let ([words #f])
|
||||
|
@ -1514,7 +1527,7 @@
|
|||
(list -200 3)
|
||||
#t
|
||||
(string-constant pretty-big-scheme-one-line-summary)
|
||||
(λ (%) (macro-stepper-mixin (assume-mixin (add-errortrace-key-mixin %))))))
|
||||
(λ (%) (pretty-big-mixin (macro-stepper-mixin (assume-mixin (add-errortrace-key-mixin %)))))))
|
||||
(add-language
|
||||
(make-simple '(lib "r5rs/lang.rkt")
|
||||
"plt:r5rs"
|
|
@ -85,7 +85,7 @@
|
|||
(define id (reconstitute #,ctc provide?))
|
||||
#,@(if (syntax-e #'provide?)
|
||||
(list
|
||||
#`(require/doc drscheme/private/recon)
|
||||
#`(require/doc drracket/private/recon)
|
||||
#`(provide/doc
|
||||
(thing-doc id
|
||||
contract?
|
|
@ -161,7 +161,7 @@
|
|||
(= (vector-length printable)
|
||||
(procedure-arity make-simple-settings))
|
||||
(boolean? (vector-ref printable 0))
|
||||
(memq (vector-ref printable 1) '(constructor quasiquote write))
|
||||
(memq (vector-ref printable 1) '(constructor quasiquote write trad-write print))
|
||||
(memq (vector-ref printable 2)
|
||||
'(mixed-fraction
|
||||
mixed-fraction-e
|
||||
|
@ -172,7 +172,7 @@
|
|||
(memq (vector-ref printable 5) '(none debug debug/profile test-coverage))
|
||||
(apply make-simple-settings (vector->list printable))))
|
||||
(define/public (default-settings)
|
||||
(make-simple-settings #t 'write 'mixed-fraction-e #f #t 'debug))
|
||||
(make-simple-settings #t 'print 'mixed-fraction-e #f #t 'debug))
|
||||
(define/public (default-settings? x)
|
||||
(equal? (simple-settings->vector x)
|
||||
(simple-settings->vector (default-settings))))
|
||||
|
@ -198,7 +198,7 @@
|
|||
insert-newlines
|
||||
annotations))
|
||||
;; case-sensitive : boolean
|
||||
;; printing-style : (union 'write 'constructor 'quasiquote)
|
||||
;; printing-style : (union 'print 'write 'trad-write 'constructor 'quasiquote)
|
||||
;; fraction-style : (union 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e)
|
||||
;; show-sharing : boolean
|
||||
;; insert-newlines : boolean
|
||||
|
@ -267,18 +267,19 @@
|
|||
(string-constant output-style-label)
|
||||
(list (string-constant constructor-printing-style)
|
||||
(string-constant quasiquote-printing-style)
|
||||
(string-constant write-printing-style)
|
||||
(string-constant print-printing-style))
|
||||
output-panel
|
||||
(λ (rb evt)
|
||||
(let ([on? (not (= (send rb get-selection) 3))])
|
||||
(send fraction-style enable on?)
|
||||
(send show-sharing enable on?)
|
||||
(send insert-newlines enable on?)))
|
||||
(λ (rb evt) (enable-fraction-style))
|
||||
'(horizontal vertical-label))]
|
||||
[fraction-style
|
||||
(make-object check-box% (string-constant decimal-notation-for-rationals)
|
||||
output-panel
|
||||
void)]
|
||||
[enable-fraction-style
|
||||
(lambda ()
|
||||
(let ([on? (member (send output-style get-selection) '(0 1))])
|
||||
(send fraction-style enable on?)))]
|
||||
[show-sharing (make-object check-box%
|
||||
(string-constant sharing-printing-label)
|
||||
output-panel
|
||||
|
@ -299,7 +300,8 @@
|
|||
(case (send output-style get-selection)
|
||||
[(0) 'constructor]
|
||||
[(1) 'quasiquote]
|
||||
[(2) 'write])
|
||||
[(2) 'trad-write]
|
||||
[(3) 'print])
|
||||
(if (send fraction-style get-value)
|
||||
'repeating-decimal-e
|
||||
'mixed-fraction-e)
|
||||
|
@ -320,7 +322,9 @@
|
|||
(case (simple-settings-printing-style settings)
|
||||
[(constructor) 0]
|
||||
[(quasiquote) 1]
|
||||
[(write) 2]))
|
||||
[(write trad-write) 2]
|
||||
[(print) 3]))
|
||||
(enable-fraction-style)
|
||||
(send fraction-style set-value (eq? (simple-settings-fraction-style settings)
|
||||
'repeating-decimal-e))
|
||||
(send show-sharing set-value (simple-settings-show-sharing settings))
|
||||
|
@ -333,21 +337,28 @@
|
|||
|
||||
;; simple-module-based-language-render-value/format : TST settings port (union #f (snip% -> void)) (union 'infinity number) -> void
|
||||
(define (simple-module-based-language-render-value/format value settings port width)
|
||||
(let ([converted-value (simple-module-based-language-convert-value value settings)])
|
||||
(setup-printing-parameters
|
||||
(λ ()
|
||||
(cond
|
||||
[(simple-settings-insert-newlines settings)
|
||||
(if (number? width)
|
||||
(parameterize ([pretty-print-columns width])
|
||||
(pretty-print converted-value port))
|
||||
(pretty-print converted-value port))]
|
||||
[else
|
||||
(parameterize ([pretty-print-columns 'infinity])
|
||||
(pretty-print converted-value port))
|
||||
(newline port)]))
|
||||
settings
|
||||
width)))
|
||||
(let-values ([(converted-value write?)
|
||||
(call-with-values
|
||||
(lambda ()
|
||||
(simple-module-based-language-convert-value value settings))
|
||||
(case-lambda
|
||||
[(converted-value) (values converted-value #t)]
|
||||
[(converted-value write?) (values converted-value write?)]))])
|
||||
(let ([pretty-out (if write? pretty-write pretty-print)])
|
||||
(setup-printing-parameters
|
||||
(λ ()
|
||||
(cond
|
||||
[(simple-settings-insert-newlines settings)
|
||||
(if (number? width)
|
||||
(parameterize ([pretty-print-columns width])
|
||||
(pretty-out converted-value port))
|
||||
(pretty-out converted-value port))]
|
||||
[else
|
||||
(parameterize ([pretty-print-columns 'infinity])
|
||||
(pretty-out converted-value port))
|
||||
(newline port)]))
|
||||
settings
|
||||
width))))
|
||||
|
||||
(define default-pretty-print-current-style-table (pretty-print-current-style-table))
|
||||
|
||||
|
@ -415,11 +426,11 @@
|
|||
(write-special (render-syntax/snip value) port)]
|
||||
[else (write-special (value->snip value) port)]))]
|
||||
[print-graph
|
||||
;; only turn on print-graph when using `write' printing
|
||||
;; style because the sharing is being taken care of
|
||||
;; only turn on print-graph when using `write' or `print' printing
|
||||
;; style, because the sharing is being taken care of
|
||||
;; by the print-convert sexp construction when using
|
||||
;; other printing styles.
|
||||
(and (eq? (simple-settings-printing-style settings) 'write)
|
||||
(and (memq (simple-settings-printing-style settings) '(write print))
|
||||
(simple-settings-show-sharing settings))])
|
||||
(thunk))))
|
||||
|
||||
|
@ -429,7 +440,8 @@
|
|||
;; simple-module-based-language-convert-value : TST settings -> TST
|
||||
(define (simple-module-based-language-convert-value value settings)
|
||||
(case (simple-settings-printing-style settings)
|
||||
[(write) value]
|
||||
[(print) (values value #f)]
|
||||
[(write trad-write) value]
|
||||
[(constructor)
|
||||
(parameterize ([constructor-style-printing #t]
|
||||
[show-sharing (simple-settings-show-sharing settings)]
|
||||
|
@ -477,11 +489,16 @@
|
|||
|
||||
(global-port-print-handler
|
||||
(λ (value port)
|
||||
(let ([converted-value (simple-module-based-language-convert-value value setting)])
|
||||
(let-values ([(converted-value write?)
|
||||
(call-with-values
|
||||
(lambda () (simple-module-based-language-convert-value value setting))
|
||||
(case-lambda
|
||||
[(converted-value) (values converted-value #t)]
|
||||
[(converted-value write?) (values converted-value write?)]))])
|
||||
(setup-printing-parameters
|
||||
(λ ()
|
||||
(parameterize ([pretty-print-columns 'infinity])
|
||||
(pretty-print converted-value port)))
|
||||
((if write? pretty-write pretty-print) converted-value port)))
|
||||
setting
|
||||
'infinity))))
|
||||
(current-inspector (make-inspector))
|
||||
|
@ -507,20 +524,18 @@
|
|||
|
||||
(define (render-value value port)
|
||||
(parameterize ([pretty-print-columns 'infinity])
|
||||
(pretty-print (convert-value value) port)))
|
||||
|
||||
(define (convert-value value)
|
||||
,(case (simple-settings-printing-style setting)
|
||||
[(write) `value]
|
||||
[(constructor)
|
||||
`(parameterize ([constructor-style-printing #t]
|
||||
[show-sharing ,(simple-settings-show-sharing setting)])
|
||||
(print-convert value))]
|
||||
[(quasiquote)
|
||||
`(parameterize ([constructor-style-printing #f]
|
||||
[show-sharing ,(simple-settings-show-sharing setting)])
|
||||
(print-convert value))]))
|
||||
|
||||
,(case (simple-settings-printing-style setting)
|
||||
[(print) `(pretty-print value port)]
|
||||
[(write trad-write) `(pretty-write value port)]
|
||||
[(constructor)
|
||||
`(parameterize ([constructor-style-printing #t]
|
||||
[show-sharing ,(simple-settings-show-sharing setting)])
|
||||
(pretty-write (print-convert value) port))]
|
||||
[(quasiquote)
|
||||
`(parameterize ([constructor-style-printing #f]
|
||||
[show-sharing ,(simple-settings-show-sharing setting)])
|
||||
(pretty-write (print-convert value) port))])))
|
||||
|
||||
,(if (memq (simple-settings-annotations setting) '(debug debug/profile test-coverage))
|
||||
`(require errortrace)
|
||||
`(void))
|
||||
|
@ -660,7 +675,7 @@
|
|||
(define base-rb (and (boolean? show-base)
|
||||
(instantiate radio-box% ()
|
||||
(label (string-constant executable-base))
|
||||
(choices (list "MzScheme" "MrEd"))
|
||||
(choices (list "Racket" "GRacket"))
|
||||
(parent base-panel)
|
||||
(callback (lambda (rb e) (reset-filename-suffix))))))
|
||||
|
||||
|
@ -1121,7 +1136,7 @@
|
|||
((if gui? make-mred-launcher make-mzscheme-launcher)
|
||||
(list
|
||||
(path->string
|
||||
(build-path (collection-path "drscheme" "private")
|
||||
(build-path (collection-path "drracket" "private")
|
||||
(if gui?
|
||||
"launcher-mred-bootstrap.rkt"
|
||||
"launcher-mz-bootstrap.rkt")))
|
|
@ -141,7 +141,7 @@
|
|||
(if (vector? info-result)
|
||||
'hash-lang-racket
|
||||
(get-lang-name pos))
|
||||
'drscheme/private/module-language-tools)
|
||||
'drracket/private/module-language-tools)
|
||||
((if (vector? info-result)
|
||||
(vector-ref info-result 0)
|
||||
info-result)
|
|
@ -106,7 +106,7 @@
|
|||
(define/override (default-settings)
|
||||
(let ([super-defaults (super default-settings)])
|
||||
(make-module-language-settings
|
||||
#t 'write 'mixed-fraction-e #f #t 'debug;; simple settings defaults
|
||||
#t 'print 'mixed-fraction-e #f #t 'debug;; simple settings defaults
|
||||
|
||||
'(default)
|
||||
#()
|
||||
|
@ -163,7 +163,15 @@
|
|||
(andmap string? (vector->list command-line-args))
|
||||
(string? auto-text)
|
||||
(boolean? compilation-on?)
|
||||
(let ([super (super unmarshall-settings (car marshalled))])
|
||||
(let ([super (super unmarshall-settings
|
||||
(let ([p (car marshalled)])
|
||||
;; Convert 'write to 'print:
|
||||
(if (eq? (vector-ref p 1) 'write)
|
||||
(list->vector
|
||||
(list* (vector-ref p 0)
|
||||
'print
|
||||
(cddr (vector->list p))))
|
||||
p)))])
|
||||
(and super
|
||||
(apply make-module-language-settings
|
||||
(append
|
||||
|
@ -204,11 +212,11 @@
|
|||
(case annotations
|
||||
[(none)
|
||||
(use-compiled-file-paths
|
||||
(cons (build-path "compiled" "drscheme")
|
||||
(cons (build-path "compiled" "drracket")
|
||||
(use-compiled-file-paths)))]
|
||||
[(debug)
|
||||
(use-compiled-file-paths
|
||||
(cons (build-path "compiled" "drscheme" "errortrace")
|
||||
(cons (build-path "compiled" "drracket" "errortrace")
|
||||
(use-compiled-file-paths)))]))
|
||||
|
||||
(current-load/use-compiled (make-compilation-manager-load/use-compiled-handler))
|
|
@ -5,5 +5,5 @@
|
|||
|
||||
(provide snip-class)
|
||||
(define snip-class (make-object number-snip:snip-class%))
|
||||
(send snip-class set-classname (format "~s" `(lib "number-snip.ss" "drscheme" "private")))
|
||||
(send snip-class set-classname (format "~s" `(lib "number-snip.ss" "drracket" "private")))
|
||||
(send (get-the-snip-class-list) add snip-class)
|
|
@ -19,7 +19,8 @@ This file sets up the right lexical environment to invoke the tools that want to
|
|||
mrlib/switchable-button
|
||||
string-constants)
|
||||
|
||||
(require (for-syntax racket/base racket/match))
|
||||
(require (for-syntax racket/base racket/match
|
||||
compiler/cm-accomplice))
|
||||
|
||||
(import [prefix drscheme:frame: drracket:frame^]
|
||||
[prefix drscheme:unit: drracket:unit^]
|
||||
|
@ -41,12 +42,15 @@ This file sets up the right lexical environment to invoke the tools that want to
|
|||
(syntax-case stx ()
|
||||
[(_ body tool-name)
|
||||
(let ()
|
||||
(define tool-lib-src (build-path (collection-path "drracket") "tool-lib.rkt"))
|
||||
(define full-sexp
|
||||
(call-with-input-file (build-path (collection-path "drscheme") "tool-lib.rkt")
|
||||
(call-with-input-file tool-lib-src
|
||||
(λ (port)
|
||||
(parameterize ([read-accept-reader #t])
|
||||
(read port)))))
|
||||
|
||||
(register-external-file tool-lib-src)
|
||||
|
||||
(let loop ([sexp full-sexp])
|
||||
(match sexp
|
||||
[`((#%module-begin ,body ...))
|
|
@ -13,7 +13,8 @@
|
|||
mrlib/switchable-button
|
||||
string-constants)
|
||||
|
||||
(require (for-syntax racket/base racket/match))
|
||||
(require (for-syntax racket/base racket/match
|
||||
compiler/cm-accomplice))
|
||||
|
||||
(import [prefix drracket:frame: drracket:frame^]
|
||||
[prefix drracket:unit: drracket:unit^]
|
||||
|
@ -322,11 +323,15 @@ string-constants)
|
|||
(syntax-case stx ()
|
||||
[(_ body tool-name)
|
||||
(let ()
|
||||
(define tool-lib-src (build-path (collection-path "drracket") "tool-lib.rkt"))
|
||||
|
||||
(define full-sexp
|
||||
(call-with-input-file (build-path (collection-path "drscheme") "tool-lib.rkt")
|
||||
(call-with-input-file tool-lib-src
|
||||
(λ (port)
|
||||
(parameterize ([read-accept-reader #t])
|
||||
(read port)))))
|
||||
|
||||
(register-external-file tool-lib-src)
|
||||
|
||||
(let loop ([sexp full-sexp])
|
||||
(match sexp
|
|
@ -23,11 +23,11 @@ If the namespace does not, they are colored the unbound color.
|
|||
scheme/class
|
||||
scheme/list
|
||||
scheme/promise
|
||||
drscheme/tool
|
||||
drracket/tool
|
||||
syntax/toplevel
|
||||
syntax/boundmap
|
||||
mrlib/switchable-button
|
||||
(prefix-in drracket:arrow: drscheme/arrow)
|
||||
(prefix-in drracket:arrow: drracket/arrow)
|
||||
(prefix-in fw: framework/framework)
|
||||
mred
|
||||
framework
|
1585
collects/drracket/tool-lib.rkt
Normal file
1585
collects/drracket/tool-lib.rkt
Normal file
File diff suppressed because it is too large
Load Diff
6
collects/drracket/tool.rkt
Normal file
6
collects/drracket/tool.rkt
Normal 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^]))
|
|
@ -1,67 +1,2 @@
|
|||
#lang racket/base
|
||||
(require scheme/gui/base "private/key.rkt")
|
||||
|
||||
(define debugging? (getenv "PLTDRDEBUG"))
|
||||
(define profiling? (getenv "PLTDRPROFILE"))
|
||||
|
||||
(define install-cm? (and (not debugging?)
|
||||
(getenv "PLTDRCM")))
|
||||
|
||||
(define cm-trace? (or (equal? (getenv "PLTDRCM") "trace")
|
||||
(equal? (getenv "PLTDRDEBUG") "trace")))
|
||||
|
||||
|
||||
;; the flush is only here to ensure that the output is
|
||||
;; appears when running in cygwin under windows.
|
||||
(define (flprintf fmt . args)
|
||||
(apply printf fmt args)
|
||||
(flush-output))
|
||||
|
||||
(when debugging?
|
||||
(flprintf "PLTDRDEBUG: installing CM to load/create errortrace zos\n")
|
||||
(let-values ([(zo-compile
|
||||
make-compilation-manager-load/use-compiled-handler
|
||||
manager-trace-handler)
|
||||
(parameterize ([current-namespace (make-base-empty-namespace)]
|
||||
[use-compiled-file-paths '()])
|
||||
(values
|
||||
(dynamic-require 'errortrace/zo-compile 'zo-compile)
|
||||
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)
|
||||
(dynamic-require 'compiler/cm 'manager-trace-handler)))])
|
||||
(current-compile zo-compile)
|
||||
(use-compiled-file-paths (list (build-path "compiled" "errortrace")))
|
||||
(current-load/use-compiled (make-compilation-manager-load/use-compiled-handler))
|
||||
(error-display-handler (dynamic-require 'errortrace/errortrace-lib
|
||||
'errortrace-error-display-handler))
|
||||
(when cm-trace?
|
||||
(flprintf "PLTDRDEBUG: enabling CM tracing\n")
|
||||
(manager-trace-handler
|
||||
(λ (x) (display "1: ") (display x) (newline) (flush-output))))))
|
||||
|
||||
(when install-cm?
|
||||
(flprintf "PLTDRCM: installing compilation manager\n")
|
||||
(let-values ([(make-compilation-manager-load/use-compiled-handler
|
||||
manager-trace-handler)
|
||||
(parameterize ([current-namespace (make-base-empty-namespace)])
|
||||
(values
|
||||
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)
|
||||
(dynamic-require 'compiler/cm 'manager-trace-handler)))])
|
||||
(current-load/use-compiled (make-compilation-manager-load/use-compiled-handler))
|
||||
(when cm-trace?
|
||||
(flprintf "PLTDRCM: enabling CM tracing\n")
|
||||
(manager-trace-handler
|
||||
(λ (x) (display "1: ") (display x) (newline) (flush-output))))))
|
||||
|
||||
(when profiling?
|
||||
(flprintf "PLTDRPROFILE: installing profiler\n")
|
||||
;; NOTE that this might not always work.
|
||||
;; it creates a new custodian and installs it, but the
|
||||
;; original eventspace was created on the original custodian
|
||||
;; and this code does not create a new eventspace.
|
||||
(let ([orig-cust (current-custodian)]
|
||||
[orig-eventspace (current-eventspace)]
|
||||
[new-cust (make-custodian)])
|
||||
(current-custodian new-cust)
|
||||
((dynamic-require 'drscheme/private/profile-drs 'start-profile) orig-cust)))
|
||||
|
||||
(dynamic-require 'drscheme/private/drscheme-normal #f)
|
||||
(require drracket/drracket)
|
||||
|
|
|
@ -1,13 +1,4 @@
|
|||
#lang setup/infotab
|
||||
|
||||
;(define tools '("sprof.rkt"))
|
||||
;(define tool-names '("Sampling Profiler"))
|
||||
|
||||
(define drracket-tools '("syncheck.rkt"))
|
||||
(define drracket-tool-names '("Check Syntax"))
|
||||
|
||||
(define gracket-launcher-names '("DrRacket"))
|
||||
(define gracket-launcher-libraries '("drscheme.rkt"))
|
||||
|
||||
(define mred-launcher-names '("DrScheme"))
|
||||
(define mred-launcher-libraries '("drscheme.rkt"))
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,3 @@
|
|||
#lang racket/base
|
||||
(require "private/drsig.ss")
|
||||
(provide drracket:tool^
|
||||
drracket:tool-exports^
|
||||
drscheme:tool^
|
||||
(rename-out [drracket:tool-exports^ drscheme:tool-exports^]))
|
||||
(require drracket/tool)
|
||||
(provide (all-from-out drracket/tool))
|
||||
|
|
|
@ -35,7 +35,7 @@ Compiles the given input file (C source) to the given output file (a
|
|||
compiled-object file). The @scheme[quiet?] argument indicates whether
|
||||
command should be echoed to the current output port. The
|
||||
@scheme[include-dirs] argument is a list of directories to search for
|
||||
include files; the PLT Scheme installation's @filepath{include}
|
||||
include files; the Racket installation's @filepath{include}
|
||||
directories are added automatically.}
|
||||
|
||||
|
||||
|
@ -358,20 +358,20 @@ Appends the platform-standard dynamic-extension file suffix to
|
|||
(program any/c #f))
|
||||
(or/c path? false/c)]{
|
||||
|
||||
Strips the Scheme file suffix from @scheme[s] and returns a stripped
|
||||
Strips the Racket file suffix from @scheme[s] and returns a stripped
|
||||
path. Unlike the other functions below, when @scheme[program] is not
|
||||
@scheme[#f], then any suffix (including no suffix) is allowed. If
|
||||
@scheme[s] is not a Scheme file and @scheme[program] is @scheme[#f],
|
||||
@scheme[s] is not a Racket file and @scheme[program] is @scheme[#f],
|
||||
@scheme[#f] is returned.}
|
||||
|
||||
@defproc[(extract-base-filename/c (s path-string?)
|
||||
(program any/c #f))
|
||||
(or/c path? false/c)]{
|
||||
|
||||
Strips the Scheme file suffix from @scheme[s] and
|
||||
returns a stripped path. If @scheme[s] is not a Scheme file name and
|
||||
Strips the Racket file suffix from @scheme[s] and
|
||||
returns a stripped path. If @scheme[s] is not a Racket file name and
|
||||
@scheme[program] is a symbol, and error is signaled. If @scheme[s] is
|
||||
not a Scheme file and @scheme[program] is @scheme[#f], @scheme[#f] is
|
||||
not a Racket file and @scheme[program] is @scheme[#f], @scheme[#f] is
|
||||
returned.}
|
||||
|
||||
@defproc[(extract-base-filename/kp (s path-string?) (program any/c #f)) (or/c path? false/c)]{
|
||||
|
|
|
@ -46,6 +46,14 @@ wraps the load of the module.)
|
|||
(drscheme:language:simple-module-based-language->module-based-language-mixin
|
||||
language-base%))
|
||||
(define/override (use-namespace-require/copy?) #t)
|
||||
(define/override (default-settings)
|
||||
(let ([s (super default-settings)])
|
||||
(drscheme:language:make-simple-settings (drscheme:language:simple-settings-case-sensitive s)
|
||||
'trad-write
|
||||
(drscheme:language:simple-settings-fraction-style s)
|
||||
(drscheme:language:simple-settings-show-sharing s)
|
||||
(drscheme:language:simple-settings-insert-newlines s)
|
||||
(drscheme:language:simple-settings-annotations s))))
|
||||
(define/override (on-execute settings run-in-user-thread)
|
||||
(super on-execute settings run-in-user-thread)
|
||||
(print-mpair-curly-braces #f)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#lang s-exp syntax/module-reader
|
||||
eopl
|
||||
#:language-info '#(scheme/language-info get-info #f)
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
@title[#:tag "top"]{@bold{Errortrace}: Debugging and Profiling}
|
||||
|
||||
@bold{Errortrace} is a stack-trace-on-exceptions, profiler, and
|
||||
coverage tool for MzScheme. It is not a complete debugger; DrScheme
|
||||
coverage tool for Racket. It is not a complete debugger; DrRacket
|
||||
provides more. Meanwhile, using Errortrace might be better than
|
||||
MzScheme's limited stack-trace reporting.
|
||||
Racket's limited stack-trace reporting.
|
||||
|
||||
@table-of-contents[]
|
||||
|
||||
|
@ -29,19 +29,19 @@ Then,
|
|||
@itemize[
|
||||
@item{If your program has a module file @nonterm{prog}, run it with
|
||||
|
||||
@commandline{mzscheme -l errortrace -t @nonterm{prog}}}
|
||||
@commandline{racket -l errortrace -t @nonterm{prog}}}
|
||||
|
||||
@item{If you program is a non-module top-level sequence of
|
||||
definitions and expressions, you can instead add
|
||||
@schemeblock[(require errortrace)]
|
||||
to the beginning of the program or start MzScheme with the @Flag{l} option before the
|
||||
to the beginning of the program or start Racket with the @Flag{l} option before the
|
||||
arguments to load your program:
|
||||
@commandline{mzscheme -l errortrace ...}}
|
||||
@commandline{racket -l errortrace ...}}
|
||||
|
||||
@item{If you have no main program and you want to use
|
||||
MzScheme interactively, include the @Flag{i} flag
|
||||
Racket interactively, include the @Flag{i} flag
|
||||
before @Flag{l}:
|
||||
@commandline{mzscheme -i -l errortrace}}
|
||||
@commandline{racket -i -l errortrace}}
|
||||
]
|
||||
|
||||
After starting @schememodname[errortrace] in one of these ways, when an
|
||||
|
@ -64,7 +64,7 @@ handler or the error display handler.
|
|||
|
||||
Invoking the
|
||||
@schememodname[errortrace] module sets the compilation
|
||||
handler to instrument Scheme source code. It also sets the error
|
||||
handler to instrument Racket source code. It also sets the error
|
||||
display handler to report source information for an exception, and it
|
||||
sets the @scheme[use-compiled-file-paths] parameter to trigger the use
|
||||
of Errortrace-specific @filepath{.zo} files.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#lang scribble/doc
|
||||
@(require "common.ss")
|
||||
|
||||
@title{@bold{File}: PLT File Format Libraries}
|
||||
@title{@bold{File}: Racket File Format Libraries}
|
||||
|
||||
@table-of-contents[]
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
(-> void?)
|
||||
()
|
||||
@{Adds a preferences panel for configuring options related to
|
||||
Scheme.})
|
||||
Racket.})
|
||||
|
||||
(proc-doc/names
|
||||
preferences:add-to-warnings-checkbox-panel
|
||||
|
@ -261,7 +261,7 @@
|
|||
(((is-a?/c vertical-panel%) . -> . void?) . -> . void?)
|
||||
(proc)
|
||||
@{Saves @scheme[proc] until the preferences panel is created, when it
|
||||
is called with the Scheme preferences panel to add new children to
|
||||
is called with the Racket preferences panel to add new children to
|
||||
the panel.})
|
||||
|
||||
(proc-doc/names
|
||||
|
@ -1343,14 +1343,14 @@
|
|||
scheme:get-keymap
|
||||
(-> (is-a?/c keymap%))
|
||||
()
|
||||
@{Returns a keymap with binding suitable for Scheme.})
|
||||
@{Returns a keymap with binding suitable for Racket.})
|
||||
|
||||
(proc-doc/names
|
||||
scheme:add-coloring-preferences-panel
|
||||
(-> any)
|
||||
()
|
||||
@{
|
||||
Installs the ``Scheme'' preferences panel in the ``Syntax Coloring''
|
||||
Installs the ``Racket'' preferences panel in the ``Syntax Coloring''
|
||||
section.})
|
||||
|
||||
(proc-doc/names
|
||||
|
@ -1359,7 +1359,7 @@
|
|||
()
|
||||
@{Returns
|
||||
a table mapping from symbols
|
||||
(naming the categories that the online colorer uses for Scheme mode coloring) to their colors.
|
||||
(naming the categories that the online colorer uses for Racket mode coloring) to their colors.
|
||||
|
||||
These symbols are suitable for input to
|
||||
@scheme[scheme:short-sym->pref-name] and
|
||||
|
@ -1373,7 +1373,7 @@
|
|||
()
|
||||
@{Returns
|
||||
a table mapping from symbols
|
||||
(naming the categories that the online colorer uses for Scheme mode coloring) to their colors when
|
||||
(naming the categories that the online colorer uses for Racket mode coloring) to their colors when
|
||||
the user chooses the white-on-black mode in the preferences dialog.
|
||||
|
||||
See also @scheme[scheme:get-color-prefs-table].})
|
||||
|
@ -1399,7 +1399,7 @@
|
|||
(-> (is-a?/c editor-wordbreak-map%))
|
||||
()
|
||||
@{This method returns a @scheme[editor-wordbreak-map%] that is suitable
|
||||
for Scheme.})
|
||||
for Racket.})
|
||||
|
||||
(proc-doc/names
|
||||
scheme:init-wordbreak-map
|
||||
|
@ -1411,7 +1411,7 @@
|
|||
scheme:setup-keymap
|
||||
((is-a?/c keymap%) . -> . void?)
|
||||
(keymap)
|
||||
@{Initializes @scheme[keymap] with Scheme-mode keybindings.})
|
||||
@{Initializes @scheme[keymap] with Racket-mode keybindings.})
|
||||
|
||||
(proc-doc/names
|
||||
editor:set-default-font-color
|
||||
|
|
|
@ -323,7 +323,7 @@
|
|||
|
||||
(define (add-coloring-preferences-panel)
|
||||
(color-prefs:add-to-preferences-panel
|
||||
"Scheme"
|
||||
"Racket"
|
||||
(λ (parent)
|
||||
(for-each
|
||||
(λ (line)
|
||||
|
@ -1186,8 +1186,8 @@
|
|||
(values lexeme type paren start end backup-delta mode)))))
|
||||
|
||||
(define/override (put-file text sup directory default-name)
|
||||
(parameterize ([finder:default-extension "ss"]
|
||||
[finder:default-filters '(["Scheme Sources" "*.ss;*.scm"]
|
||||
(parameterize ([finder:default-extension "rkt"]
|
||||
[finder:default-filters '(["Racket Sources" "*.rkt;*.ss;*.scm"]
|
||||
["Any" "*.*"])])
|
||||
;; don't call the surrogate's super, since it sets the default extension
|
||||
(sup directory default-name)))
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
@author["Greg Cooper"]
|
||||
|
||||
The @schememodname[frtime] language supports declarative construction of
|
||||
reactive systems in a syntax very similar to that of MzScheme. To
|
||||
interact with FrTime, select FrTime from the "Choose Language" menu.
|
||||
reactive systems in a syntax very similar to that of Racket. To
|
||||
interact with FrTime, select @onscreen{FrTime} from the @onscreen{Choose Language} menu.
|
||||
You can also make FrTime the language for a module:
|
||||
|
||||
@schemeblock[
|
||||
|
@ -144,7 +144,7 @@ anything else.}
|
|||
any]{provides a mechanism for applying ordinary Scheme primitives to
|
||||
behaviors. If any of the @scheme[val]s are behaviors, returns a
|
||||
behavior whose current value is always equal to @scheme[(proc
|
||||
(value-now arg) ...)]. In FrTime, many MzScheme primitives are
|
||||
(value-now arg) ...)]. In FrTime, many Racket primitives are
|
||||
implicitly lifted.}
|
||||
|
||||
The following forms allow importation of lifted procedures that aren't
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
@gametitle["Pousse" "pousse" "Tic-Tac-Toe-like Game"]
|
||||
|
||||
@onscreen{Pousse} (French for "push", pronounced "poo-ss") is a 2
|
||||
@onscreen{Pousse} (French for ``push,'' pronounced ``poo-ss'') is a 2
|
||||
person game, played on an @math{N} by @math{N} board (usually 4 by 4).
|
||||
Initially the board is empty, and the players take turns inserting one
|
||||
marker of their color (@onscreen{X} or @onscreen{O}) on the board.
|
||||
|
|
|
@ -215,7 +215,7 @@ For @scheme[fern1], you will probably want to point the turtle up
|
|||
before running this one, with something like:
|
||||
|
||||
@schemeblock[
|
||||
@scheme[(turn/radians (- (/ pi 2)))]
|
||||
(turn/radians (- (/ pi 2)))
|
||||
]
|
||||
|
||||
For @scheme[fern2], you may need to backup a little.}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#lang scheme/base
|
||||
|
||||
;; Builds different kinds of executables for different platforms.
|
||||
|
||||
;; proposed changes below -robby.
|
||||
;; The `plt-help' executable is for backward compatibity.
|
||||
;; The `Racket Documentation' executable is to help Windows and
|
||||
;; Mac users who are completely lost and need something to click.
|
||||
|
||||
(provide post-installer)
|
||||
(require launcher)
|
||||
|
@ -23,11 +24,11 @@
|
|||
make-mzscheme-launcher
|
||||
mzscheme-program-launcher-path
|
||||
'())))
|
||||
(for ([variant (variants)])
|
||||
(for ([variant (remove* '(script-3m script-cgc) (variants))])
|
||||
(parameterize ([current-launcher-variant variant])
|
||||
(mk-launcher '("-l-" "help/help")
|
||||
(mk-path "plt-help") ;; change to "Racket Docs"
|
||||
`([exe-name . "plt-help"] ;; get rid of this (in favor of 'raco docs')
|
||||
(mk-path (if mr? "Racket Documentation" "plt-help"))
|
||||
`([exe-name . ,(if mr? "Racket Documentation" "plt-help")]
|
||||
[relative? . #t]
|
||||
[framework-root . #f]
|
||||
[dll-dir . #f]
|
||||
|
|
|
@ -196,17 +196,24 @@
|
|||
(set-printing-parameters
|
||||
settings
|
||||
(λ ()
|
||||
(let ([converted-value (drscheme:language:simple-module-based-language-convert-value value settings)])
|
||||
(cond
|
||||
[(drscheme:language:simple-settings-insert-newlines settings)
|
||||
(if (number? width)
|
||||
(parameterize ([pretty-print-columns width])
|
||||
(pretty-write converted-value port))
|
||||
(pretty-write converted-value port))]
|
||||
[else
|
||||
(parameterize ([pretty-print-columns 'infinity])
|
||||
(pretty-write converted-value port))
|
||||
(newline port)])))))
|
||||
(let-values ([(converted-value write?)
|
||||
(call-with-values
|
||||
(lambda ()
|
||||
(drscheme:language:simple-module-based-language-convert-value value settings))
|
||||
(case-lambda
|
||||
[(converted-value) (values converted-value #t)]
|
||||
[(converted-value write?) (values converted-value write?)]))])
|
||||
(let ([pretty-out (if write? pretty-write pretty-print)])
|
||||
(cond
|
||||
[(drscheme:language:simple-settings-insert-newlines settings)
|
||||
(if (number? width)
|
||||
(parameterize ([pretty-print-columns width])
|
||||
(pretty-out converted-value port))
|
||||
(pretty-out converted-value port))]
|
||||
[else
|
||||
(parameterize ([pretty-print-columns 'infinity])
|
||||
(pretty-out converted-value port))
|
||||
(newline port)]))))))
|
||||
settings
|
||||
width))
|
||||
|
||||
|
@ -309,13 +316,11 @@
|
|||
(case (drscheme:language:simple-settings-printing-style settings)
|
||||
[(constructor) 0]
|
||||
[(quasiquote) 1]
|
||||
[(write) 2]
|
||||
[(print) 2])
|
||||
[(print trad-write write) 2])
|
||||
(case (drscheme:language:simple-settings-printing-style settings)
|
||||
[(constructor) 0]
|
||||
[(quasiquote) 0]
|
||||
[(write) 1]
|
||||
[(print) 1])))
|
||||
[(print trad-write write) 1])))
|
||||
(send fraction-style set-selection
|
||||
(case (drscheme:language:simple-settings-fraction-style settings)
|
||||
[(mixed-fraction) 0]
|
||||
|
|
|
@ -63,8 +63,9 @@ Student language for @|htdp|; see @htdp-ref["advanced"].
|
|||
@defmodule[lang/plt-pretty-big-text]
|
||||
|
||||
The @schememodname[lang/plt-pretty-big-text] module is similar to the
|
||||
@italic{HtDP} Advanced Student language, but with more of PLT Scheme's
|
||||
libraries. It provides the bindings of @schememodname[mzscheme],
|
||||
@italic{HtDP} Advanced Student language, but with more of Racket's
|
||||
libraries in legacy form. It provides the bindings of
|
||||
@schememodname[mzscheme],
|
||||
@schememodname[mzlib/etc], @schememodname[mzlib/file],
|
||||
@schememodname[mzlib/list], @schememodname[mzlib/class],
|
||||
@schememodname[mzlib/unit], @schememodname[mzlib/include],
|
||||
|
@ -82,7 +83,7 @@ libraries. It provides the bindings of @schememodname[mzscheme],
|
|||
The @schememodname[lang/plt-pretty-big] module extends
|
||||
@scheme[lang/plt-pretty-big-text] with @schememodname[scheme/gui/base]
|
||||
and @schememodname[lang/imageeq]. This language corresponds to the
|
||||
@onscreen{Pretty Big Scheme} legacy language in DrScheme.
|
||||
@onscreen{Pretty Big} legacy language in DrRacket.
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
(define scribblings '(("lazy.scrbl" () (experimental))))
|
||||
(define drscheme-language-modules '(("lazy.ss" "lazy")))
|
||||
(define drscheme-language-positions
|
||||
`((,(string-constant experimental-languages) "Lazy Scheme")))
|
||||
`((,(string-constant experimental-languages) "Lazy Racket")))
|
||||
(define drscheme-language-numbers '((1000 -500)))
|
||||
(define drscheme-language-one-line-summaries '("Lazy Scheme"))
|
||||
(define drscheme-language-one-line-summaries '("Lazy Racket"))
|
||||
|
|
|
@ -34,13 +34,13 @@
|
|||
|
||||
@(require scribble/manual)
|
||||
|
||||
@title{@bold{Lazy Scheme}}
|
||||
@title{@bold{Lazy Racket}}
|
||||
|
||||
@author["Eli Barzilay"]
|
||||
|
||||
@defmodulelang[lazy]
|
||||
|
||||
Lazy Scheme is available as both a language level and a module that
|
||||
Lazy Racket is available as both a language level and a module that
|
||||
can be used to write lazy code. To write lazy code, simply use
|
||||
@schememodname[lazy] as your module's language:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(require scheme/list
|
||||
scheme/class
|
||||
scheme/gui
|
||||
drscheme/arrow
|
||||
drracket/arrow
|
||||
framework/framework
|
||||
unstable/interval-map
|
||||
unstable/gui/notify
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
@title{@bold{Make}: Dependency Manager}
|
||||
|
||||
The @schememodname[make] library provides a Scheme version of the
|
||||
The @schememodname[make] library provides a Racket version of the
|
||||
popular @exec{make} utility. Its syntax is intended to imitate the
|
||||
syntax of @exec{make}, only in Scheme.
|
||||
syntax of @exec{make}, only in Racket.
|
||||
|
||||
@table-of-contents[]
|
||||
|
||||
|
@ -26,7 +26,7 @@ syntax of @exec{make}, only in Scheme.
|
|||
|
||||
@section[#:tag "overview"]{Overview}
|
||||
|
||||
@margin-note{If you want to build Scheme modules with automatic
|
||||
@margin-note{If you want to build Racket modules with automatic
|
||||
dependency tracking, just use @exec{raco make} as described in
|
||||
@|raco-manual|.}
|
||||
|
||||
|
@ -77,10 +77,10 @@ utility uses existing programs to build your project --- each rule has
|
|||
a shell command line.
|
||||
|
||||
The @schememodname[make] library provides similar functionality,
|
||||
except that the description is in Scheme, and the steps that are
|
||||
needed to build target files are implemented as Scheme functions.
|
||||
except that the description is in Racket, and the steps that are
|
||||
needed to build target files are implemented as Racket functions.
|
||||
|
||||
Here's a Scheme program that is equivalent to the above:
|
||||
Here's a Racket program that is equivalent to the above:
|
||||
|
||||
@schemeblock[
|
||||
(require make)
|
||||
|
@ -258,7 +258,7 @@ function helps with a few:
|
|||
@item{taming to some degree the differing conventions of Unix and
|
||||
Windows, }
|
||||
|
||||
@item{setting up suitable dependencies on PLT Scheme headers, and}
|
||||
@item{setting up suitable dependencies on Racket headers, and}
|
||||
|
||||
@item{using a pre-compiled binary when a @filepath{precompiled}
|
||||
directory is present.}
|
||||
|
|
|
@ -89,6 +89,18 @@ _raco_planet()
|
|||
COMPREPLY=( $(compgen -W "${planetcmds}" -- ${cur}) )
|
||||
}
|
||||
|
||||
raco_cmds=$()
|
||||
|
||||
_raco_help()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
if [ ${#raco_cmds[@]} -eq 0 ]; then
|
||||
# removing the empty string on the next line breaks things. such as my brain.
|
||||
raco_cmds=$( echo '' 'help' ; for x in `racket -e '(begin (require raco/all-tools) (for ([(k v) (all-tools)]) (printf "~a\n" k)))'` ; do echo ${x} ; done )
|
||||
fi
|
||||
COMPREPLY=( $(compgen -W "${raco_cmds}" -- ${cur}) )
|
||||
}
|
||||
|
||||
_raco()
|
||||
{
|
||||
COMPREPLY=()
|
||||
|
@ -101,8 +113,8 @@ _raco()
|
|||
|
||||
if [ $COMP_CWORD -eq 1 ]; then
|
||||
# removing the empty string on the next line breaks things. such as my brain.
|
||||
local cmds=$( echo '' '--help' ; for x in `racket -e '(begin (require raco/all-tools) (for ([(k v) (all-tools)]) (printf "~a\n" k)))'` ; do echo ${x} ; done )
|
||||
COMPREPLY=($(compgen -W "${cmds}" -- ${cur}))
|
||||
raco_cmds=$( echo '' 'help' ; for x in `racket -e '(begin (require raco/all-tools) (for ([(k v) (all-tools)]) (printf "~a\n" k)))'` ; do echo ${x} ; done )
|
||||
COMPREPLY=($(compgen -W "${raco_cmds}" -- ${cur}))
|
||||
elif [ $COMP_CWORD -eq 2 ]; then
|
||||
# Here we'll handle the main raco commands
|
||||
local prev="${COMP_WORDS[1]}"
|
||||
|
@ -120,7 +132,8 @@ _raco()
|
|||
planet)
|
||||
_raco_planet
|
||||
;;
|
||||
--help)
|
||||
help)
|
||||
_raco_help
|
||||
;;
|
||||
*)
|
||||
_filedir
|
||||
|
|
|
@ -150,17 +150,17 @@ src-filter := (src: "")
|
|||
docs-filter := (- (doc: "") ; all docs,
|
||||
(notes: "") ; excluding basic stuff
|
||||
std-docs) ; and things in svn
|
||||
docsrc-filter := (+ (collects: "setup/scribble.ss") ; only with doc sources
|
||||
docsrc-filter := (+ (collects: "setup/scribble.rkt") ; only with doc sources
|
||||
(collects: "**/scribblings/")
|
||||
(srcfile: "*.{scrbl|scribble}")
|
||||
std-docs)
|
||||
man-filter := (man: "*")
|
||||
tests-filter := (+ (collects: "**/tests/") (srcfile: "tests.ss"))
|
||||
tests-filter := (+ (collects: "**/tests/") (srcfile: "tests.rkt"))
|
||||
gui-filter := (- (+ (collects: "**/gui/") (srcfile: "gui.rkt"))
|
||||
;; for use in mz code that works in mr too
|
||||
(srcfile: "scheme/gui/dynamic.rkt")
|
||||
(srcfile: "racket/gui/dynamic.rkt"))
|
||||
tools-filter := (+ (collects: "**/tools/") (srcfile: "tools.ss"))
|
||||
tools-filter := (+ (collects: "**/tools/") (srcfile: "tools.rkt"))
|
||||
|
||||
;; these are in the doc directory, but are comitted in svn and should be
|
||||
;; considered like sources
|
||||
|
@ -327,7 +327,7 @@ plt := (+ dr plt-extras)
|
|||
;; Packages etc
|
||||
|
||||
mz-base := "/plt/readme.txt" ; generated
|
||||
(package: "mzscheme")
|
||||
(package: "mzscheme") (notes: "racket")
|
||||
"/plt/include/"
|
||||
;; configuration stuff
|
||||
(cond (not src) => (collects: "info-domain/")) ; filtered
|
||||
|
@ -337,22 +337,23 @@ mz-base := "/plt/readme.txt" ; generated
|
|||
;; include the time-stamp collection when not a public release
|
||||
(cond (not release)
|
||||
=> (- (collects: "repos-time-stamp/")
|
||||
(cond (not dr) => (srcfile: "time-stamp.ss"))))
|
||||
(cond (not dr) => (srcfile: "time-stamp.rkt"))))
|
||||
mz-manuals := (scribblings: "main/") ; generates main pages (next line)
|
||||
(doc: "license/" "release/" "acks/" "search/" "master-index/"
|
||||
(doc: "license/" "release/" "acks/" "search/"
|
||||
"getting-started/")
|
||||
(notes: "COPYING.LIB" "COPYING-libscheme.txt")
|
||||
(doc: "doc-license.txt") ; needed (when docs are included)
|
||||
(doc+src: "reference/" "guide/" "quick/" "more/"
|
||||
"foreign/" "inside/" ;; "places/" <- not ready yet
|
||||
"scheme/"
|
||||
"honu/")
|
||||
(doc: "*.{html|css|js|sxref}")
|
||||
(scribblings: "{{info|icons}.ss|*.png}" "compiled")
|
||||
(scribblings: "{{info|icons}.rkt|*.png}" "compiled")
|
||||
|
||||
mr-base := (package: "mred") (bin: "mred-text") (collects: "afm/")
|
||||
mr-base := (package: "mred") (notes: "gracket") (bin: "mred-text") (collects: "afm/")
|
||||
mr-manuals := (doc+src: "gui/")
|
||||
|
||||
dr-base := (package: "drscheme") (package: "framework")
|
||||
dr-base := (package: "drracket") (package: "drscheme") (package: "framework")
|
||||
dr-manuals := (doc+src: "tools/")
|
||||
|
||||
;; Misc hooks, to be added on by package rules below
|
||||
|
@ -362,7 +363,7 @@ dr-extras :=
|
|||
plt-extras :=
|
||||
|
||||
;; Tests definitions
|
||||
mz-tests := (tests: "mzscheme/" "info.ss" "utils/" "match/" "eli-tester.ss")
|
||||
mz-tests := (tests: "mzscheme/" "info.rkt" "utils/" "match/" "eli-tester.rkt")
|
||||
|
||||
;; ============================================================================
|
||||
;; Source definitions
|
||||
|
@ -383,7 +384,7 @@ mr-src := (src: "mred/" "wxcommon/"
|
|||
"worksp/{png|wxme|wxs|wxutils|wxwin|zlib}/"))
|
||||
|
||||
foreign-src := (src: "foreign/{Makefile.in|README}"
|
||||
"foreign/{foreign.*|ssc-utils.ss}"
|
||||
"foreign/{foreign.*|ssc-utils.rkt}"
|
||||
(cond win => "foreign/libffi_msvc"
|
||||
else => "foreign/gcc"))
|
||||
|
||||
|
@ -429,7 +430,7 @@ platform-dependent := ; hook for package rules
|
|||
|
||||
;; -------------------- setup
|
||||
mz-extras :+= (- (package: "setup-plt" #:collection "setup/")
|
||||
(cond (not dr) => (srcfile: "plt-installer{|-sig|-unit}.ss")))
|
||||
(cond (not dr) => (srcfile: "plt-installer{|-sig|-unit}.rkt")))
|
||||
|
||||
;; -------------------- raco
|
||||
mz-extras :+= (package: "raco")
|
||||
|
@ -508,7 +509,7 @@ mz-extras :+= (package: "srfi") (doc: "srfi-std")
|
|||
|
||||
;; -------------------- xml
|
||||
mz-extras :+= (- (package: "xml/")
|
||||
(cond* (not plt) => (srcfile: "*-{tool|snipclass}.ss"
|
||||
(cond* (not plt) => (srcfile: "*-{tool|snipclass}.rkt"
|
||||
"xml.png")))
|
||||
|
||||
;; -------------------- ffi
|
||||
|
@ -534,7 +535,7 @@ mr-extras :+= (- (+ (package: "mrlib/")
|
|||
|
||||
;; -------------------- sgl
|
||||
mr-extras :+= (package: "sgl/")
|
||||
;; gl-info.ss doesn't exist, but gl-info.zo holds platform-dependent data
|
||||
;; gl-info.rkt doesn't exist, but gl-info.zo holds platform-dependent data
|
||||
platform-dependent :+= (and (collects: "sgl/")
|
||||
(srcfile: "sgl/gl-info"))
|
||||
|
||||
|
@ -579,7 +580,7 @@ dr-extras :+= (collects: "defaults/")
|
|||
|
||||
;; -------------------- version
|
||||
mz-extras :+= (- (package: "version/")
|
||||
(cond* (not dr) => (srcfile: "tool.ss")))
|
||||
(cond* (not dr) => (srcfile: "tool.rkt")))
|
||||
|
||||
;; -------------------- browser
|
||||
dr-extras :+= (package: "browser/")
|
||||
|
@ -612,14 +613,16 @@ plt-extras :+= (package: "frtime/")
|
|||
dr-extras :+= (package: "typed-scheme/" ; used in drscheme
|
||||
#:docs "ts-{reference|guide}/")
|
||||
(- (collects: "typed/")
|
||||
(cond (not plt) => (collects: "typed/test-engine/")))
|
||||
(cond (not plt) => (collects: "typed/test-engine/")
|
||||
(collects: "typed/racunit/")
|
||||
(srcfile: "typed/racunit.rkt")))
|
||||
|
||||
;; -------------------- gui-debugger
|
||||
plt-extras :+= (collects: "gui-debugger/")
|
||||
|
||||
;; -------------------- swindle
|
||||
mz-extras :+= (- (package: "swindle")
|
||||
(cond (not dr) => (srcfile: "tool.ss" "swindle*.png")))
|
||||
(cond (not dr) => (srcfile: "tool.rkt" "swindle*.png")))
|
||||
|
||||
;; -------------------- plot
|
||||
plt-extras :+=
|
||||
|
@ -665,4 +668,6 @@ plt-extras :+= (package: "plai/")
|
|||
plt-extras :+= (package: "racunit/")
|
||||
plt-extras :+= (package: "schemeunit/")
|
||||
|
||||
plt-extras :+= (package: "raclog/")
|
||||
|
||||
;; ============================================================================
|
||||
|
|
|
@ -547,6 +547,7 @@ path/s is either such a string or a list of them.
|
|||
"collects/compiler/commands/ctool.rkt" drdr:command-line ""
|
||||
"collects/compiler/commands/exe-dir.rkt" drdr:command-line ""
|
||||
"collects/compiler/commands/exe.rkt" drdr:command-line ""
|
||||
"collects/compiler/commands/make.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/compiler/commands/pack.rkt" drdr:command-line ""
|
||||
"collects/config" responsible (mflatt eli)
|
||||
"collects/defaults" responsible (robby)
|
||||
|
@ -563,53 +564,57 @@ path/s is either such a string or a list of them.
|
|||
"collects/deinprogramm/run-dmda-code.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/deinprogramm/turtle.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/deinprogramm/world.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket" responsible (robby)
|
||||
"collects/drracket/arrow.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/drracket.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drracket/main.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drracket/private/app.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/auto-language.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/bindings-browser.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/bitmap-message.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/debug.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/drracket-normal.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drracket/private/eb.rkt" drdr:command-line "mred-text ~s"
|
||||
"collects/drracket/private/embedded-snip-utils.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/eval.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/font.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/frame.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/help-desk.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/honu-logo.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/init.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/insert-large-letters.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/label-frame-mred.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/language-configuration.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/language-object-contract.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/language.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/launcher-mred-bootstrap.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drracket/private/launcher-mz-bootstrap.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drracket/private/link.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/main.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/modes.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/module-browser.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/module-language-tools.rkt" drdr:command-line "mred-text ~s"
|
||||
"collects/drracket/private/module-language.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/multi-file-search.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/number-snip.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/palaka.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/prefs-contract.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/profile-drs.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/rep.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/stick-figures.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drracket/private/syncheck-debug.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/text.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/tools-drs.rkt" drdr:command-line "mred ~s"
|
||||
"collects/drracket/private/tools.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/tracing.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/private/unit.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/sprof.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/syncheck-drracket-button.rkt" drdr:command-line "mred-text ~s"
|
||||
"collects/drracket/syncheck.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drracket/tool-lib.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drscheme" responsible (robby)
|
||||
"collects/drscheme/arrow.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/drscheme.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drscheme/main.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drscheme/private/app.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/auto-language.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/bindings-browser.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/bitmap-message.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/debug.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/drscheme-normal.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drscheme/private/eb.rkt" drdr:command-line "mred-text ~s"
|
||||
"collects/drscheme/private/embedded-snip-utils.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/eval.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/font.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/frame.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/help-desk.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/honu-logo.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/init.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/insert-large-letters.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/label-frame-mred.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/language-configuration.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/language-object-contract.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/language.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/launcher-mred-bootstrap.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drscheme/private/launcher-mz-bootstrap.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drscheme/private/link.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/main.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/modes.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/module-browser.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/module-language-tools.rkt" drdr:command-line "mred-text ~s"
|
||||
"collects/drscheme/private/module-language.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/multi-file-search.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/number-snip.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/palaka.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/prefs-contract.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/profile-drs.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/rep.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/stick-figures.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/drscheme/private/syncheck-debug.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/text.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/tools-drs.rkt" drdr:command-line "mred ~s"
|
||||
"collects/drscheme/private/tools.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/tracing.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/private/unit.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/sprof.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/syncheck-drracket-button.rkt" drdr:command-line "mred-text ~s"
|
||||
"collects/drscheme/syncheck.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/drscheme/tool-lib.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/dynext" responsible (mflatt)
|
||||
"collects/dynext/private/macinc.rkt" drdr:command-line "mzscheme -f ~s"
|
||||
|
@ -1167,8 +1172,8 @@ path/s is either such a string or a list of them.
|
|||
"collects/redex/tests/run-tests.rkt" drdr:command-line "mred-text ~s --examples --no-bitmaps" drdr:timeout 300
|
||||
"collects/redex/tests/term-test.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/redex/tests/tl-test.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/repos-time-stamp" responsible (eli)
|
||||
"collects/repos-time-stamp/time-stamp.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/repo-time-stamp" responsible (eli)
|
||||
"collects/repo-time-stamp/time-stamp.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/rnrs" responsible (mflatt)
|
||||
"collects/s-exp" responsible (mflatt eli)
|
||||
"collects/scheme" responsible (mflatt sstrickl samth robby eli)
|
||||
|
@ -1188,7 +1193,7 @@ path/s is either such a string or a list of them.
|
|||
"collects/scribble" responsible (mflatt eli)
|
||||
"collects/scribble/run.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/scribble/tools/drscheme-buttons.rkt" drdr:command-line "mred-text ~s"
|
||||
"collects/scribble/tools/private/mk-drs-bitmaps.rkt" drdr:command-line "mred-text ~s" drdr:timeout 600
|
||||
"collects/scribble/tools/private/mk-drs-bitmaps.rkt" drdr:command-line "gracket-text ~s skip"
|
||||
"collects/scribblings" responsible (mflatt eli robby mathias)
|
||||
"collects/scribblings/foreign/unsafe-foreign.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/scribblings/framework/standard-menus.scrbl" drdr:command-line ""
|
||||
|
@ -1332,22 +1337,22 @@ path/s is either such a string or a list of them.
|
|||
"collects/tests/deinprogramm" responsible (sperber)
|
||||
"collects/tests/deinprogramm/image.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/deinprogramm/run-image-test.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/drscheme" responsible (robby)
|
||||
"collects/tests/drscheme/drscheme-test-util.rkt" drdr:command-line "mred -t ~s"
|
||||
"collects/tests/drscheme/io.rkt" drdr:command-line "mred ~s"
|
||||
"collects/tests/drscheme/language-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600
|
||||
"collects/tests/drscheme/module-lang-test-utils.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/drscheme/module-lang-test.rkt" drdr:command-line "mred ~s" drdr:timeout 120
|
||||
"collects/tests/drscheme/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/tests/drscheme/randomly-click-preferences.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/tests/drscheme/randomly-click.rkt" drdr:command-line ""
|
||||
"collects/tests/drscheme/repl-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600
|
||||
"collects/tests/drscheme/sample-solutions-one-window.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/drscheme/save-teaching-lang-file.rkt" drdr:command-line "mred ~s"
|
||||
"collects/tests/drscheme/stepper-test.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/drscheme/syncheck-test.rkt" drdr:command-line "mred ~s"
|
||||
"collects/tests/drscheme/teachpack.rkt" drdr:command-line "mred ~s"
|
||||
"collects/tests/drscheme/time-keystrokes.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/drracket" responsible (robby)
|
||||
"collects/tests/drracket/drracket-test-util.rkt" drdr:command-line "mred -t ~s"
|
||||
"collects/tests/drracket/io.rkt" drdr:command-line "mred ~s"
|
||||
"collects/tests/drracket/language-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600
|
||||
"collects/tests/drracket/module-lang-test-utils.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/drracket/module-lang-test.rkt" drdr:command-line "mred ~s" drdr:timeout 120
|
||||
"collects/tests/drracket/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/tests/drracket/randomly-click-preferences.rkt" drdr:command-line "mzc ~s"
|
||||
"collects/tests/drracket/randomly-click.rkt" drdr:command-line ""
|
||||
"collects/tests/drracket/repl-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600
|
||||
"collects/tests/drracket/sample-solutions-one-window.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/drracket/save-teaching-lang-file.rkt" drdr:command-line "mred ~s"
|
||||
"collects/tests/drracket/stepper-test.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/drracket/syncheck-test.rkt" drdr:command-line "mred ~s"
|
||||
"collects/tests/drracket/teachpack.rkt" drdr:command-line "mred ~s"
|
||||
"collects/tests/drracket/time-keystrokes.rkt" drdr:command-line "mred-text -t ~s"
|
||||
"collects/tests/framework" responsible (robby)
|
||||
"collects/tests/framework/canvas.rkt" drdr:command-line "mzc -k ~s"
|
||||
"collects/tests/framework/debug.rkt" drdr:command-line "mzc -k ~s"
|
||||
|
@ -1810,14 +1815,14 @@ path/s is either such a string or a list of them.
|
|||
"doc/release-notes/gracket" responsible (mflatt)
|
||||
"doc/release-notes/racket" responsible (mflatt)
|
||||
"doc/release-notes/stepper" responsible (clements)
|
||||
"man/man1/drscheme.1" responsible (robby)
|
||||
"man/man1/drracket.1" responsible (robby)
|
||||
"man/man1/mred.1" responsible (mflatt)
|
||||
"man/man1/drscheme.1" responsible (robby)
|
||||
"man/man1/gracket.1" responsible (mflatt)
|
||||
"man/man1/mred.1" responsible (mflatt)
|
||||
"man/man1/mzscheme.1" responsible (mflatt)
|
||||
"man/man1/plt-help.1" responsible (robby)
|
||||
"man/man1/racket.1" responsible (mflatt)
|
||||
"man/man1/raco.1" responsible (mflatt)
|
||||
"man/man1/plt-help.1" responsible (robby)
|
||||
"src/Makefile.in" responsible (mflatt)
|
||||
"src/README" responsible (mflatt)
|
||||
"src/a-list" responsible (mflatt)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
@title[#:tag "com" #:style 'toc]{COM}
|
||||
|
||||
MysterX allows scripting of most COM components from Scheme. A COM
|
||||
MysterX allows scripting of most COM components from Racket. A COM
|
||||
component can be scripted in MysterX if it supports OLE Automation via
|
||||
the @tt{IDispatch} interface, and if it publishes type information
|
||||
using the @tt{ITypeInfo} interface.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
Goodman's @italic{Dynamic HTML} will have more complete information.
|
||||
|
||||
Many of the @scheme[mx-element%] methods have two variants, a
|
||||
version that takes or returns Scheme data, and another
|
||||
version that takes or returns Racket data, and another
|
||||
@schemeidfont{-native} version that takes or returns a string. For
|
||||
methods that return values of element properties, we assume two
|
||||
characteristics, which we do not mention in the methods'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
@title[#:tag "methprop"]{COM Methods and Properties}
|
||||
|
||||
MysterX allows scripting of most COM components from Scheme. A COM
|
||||
MysterX allows scripting of most COM components from Racket. A COM
|
||||
component can be scripted in MysterX if it supports OLE Automation
|
||||
via the @tt{IDispatch} interface, and if it publishes type
|
||||
information using the @tt{ITypeInfo} interface.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user