rackety misc docs

This commit is contained in:
Matthew Flatt 2010-05-07 09:13:51 -06:00
parent e5a259bdf0
commit eb15dceb34
29 changed files with 213 additions and 212 deletions

View File

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

View File

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

View File

@ -10,9 +10,9 @@
@title[#:tag "top"]{@bold{Errortrace}: Debugging and Profiling} @title[#:tag "top"]{@bold{Errortrace}: Debugging and Profiling}
@bold{Errortrace} is a stack-trace-on-exceptions, profiler, and @bold{Errortrace} is a stack-trace-on-exceptions, profiler, and
coverage tool for MzScheme. It is not a complete debugger; DrScheme coverage tool for Racket. It is not a complete debugger; DrRacket
provides more. Meanwhile, using Errortrace might be better than provides more. Meanwhile, using Errortrace might be better than
MzScheme's limited stack-trace reporting. Racket's limited stack-trace reporting.
@table-of-contents[] @table-of-contents[]
@ -29,19 +29,19 @@ Then,
@itemize[ @itemize[
@item{If your program has a module file @nonterm{prog}, run it with @item{If your program has a module file @nonterm{prog}, run it with
@commandline{mzscheme -l errortrace -t @nonterm{prog}}} @commandline{racket -l errortrace -t @nonterm{prog}}}
@item{If you program is a non-module top-level sequence of @item{If you program is a non-module top-level sequence of
definitions and expressions, you can instead add definitions and expressions, you can instead add
@schemeblock[(require errortrace)] @schemeblock[(require errortrace)]
to the beginning of the program or start MzScheme with the @Flag{l} option before the to the beginning of the program or start Racket with the @Flag{l} option before the
arguments to load your program: arguments to load your program:
@commandline{mzscheme -l errortrace ...}} @commandline{racket -l errortrace ...}}
@item{If you have no main program and you want to use @item{If you have no main program and you want to use
MzScheme interactively, include the @Flag{i} flag Racket interactively, include the @Flag{i} flag
before @Flag{l}: before @Flag{l}:
@commandline{mzscheme -i -l errortrace}} @commandline{racket -i -l errortrace}}
] ]
After starting @schememodname[errortrace] in one of these ways, when an After starting @schememodname[errortrace] in one of these ways, when an
@ -64,7 +64,7 @@ handler or the error display handler.
Invoking the Invoking the
@schememodname[errortrace] module sets the compilation @schememodname[errortrace] module sets the compilation
handler to instrument Scheme source code. It also sets the error handler to instrument Racket source code. It also sets the error
display handler to report source information for an exception, and it display handler to report source information for an exception, and it
sets the @scheme[use-compiled-file-paths] parameter to trigger the use sets the @scheme[use-compiled-file-paths] parameter to trigger the use
of Errortrace-specific @filepath{.zo} files. of Errortrace-specific @filepath{.zo} files.

View File

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

View File

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

View File

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

View File

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

View File

@ -34,13 +34,13 @@
@(require scribble/manual) @(require scribble/manual)
@title{@bold{Lazy Scheme}} @title{@bold{Lazy Racket}}
@author["Eli Barzilay"] @author["Eli Barzilay"]
@defmodulelang[lazy] @defmodulelang[lazy]
Lazy Scheme is available as both a language level and a module that Lazy Racket is available as both a language level and a module that
can be used to write lazy code. To write lazy code, simply use can be used to write lazy code. To write lazy code, simply use
@schememodname[lazy] as your module's language: @schememodname[lazy] as your module's language:

View File

@ -16,9 +16,9 @@
@title{@bold{Make}: Dependency Manager} @title{@bold{Make}: Dependency Manager}
The @schememodname[make] library provides a Scheme version of the The @schememodname[make] library provides a Racket version of the
popular @exec{make} utility. Its syntax is intended to imitate the popular @exec{make} utility. Its syntax is intended to imitate the
syntax of @exec{make}, only in Scheme. syntax of @exec{make}, only in Racket.
@table-of-contents[] @table-of-contents[]
@ -26,7 +26,7 @@ syntax of @exec{make}, only in Scheme.
@section[#:tag "overview"]{Overview} @section[#:tag "overview"]{Overview}
@margin-note{If you want to build Scheme modules with automatic @margin-note{If you want to build Racket modules with automatic
dependency tracking, just use @exec{raco make} as described in dependency tracking, just use @exec{raco make} as described in
@|raco-manual|.} @|raco-manual|.}
@ -77,10 +77,10 @@ utility uses existing programs to build your project --- each rule has
a shell command line. a shell command line.
The @schememodname[make] library provides similar functionality, The @schememodname[make] library provides similar functionality,
except that the description is in Scheme, and the steps that are except that the description is in Racket, and the steps that are
needed to build target files are implemented as Scheme functions. needed to build target files are implemented as Racket functions.
Here's a Scheme program that is equivalent to the above: Here's a Racket program that is equivalent to the above:
@schemeblock[ @schemeblock[
(require make) (require make)
@ -258,7 +258,7 @@ function helps with a few:
@item{taming to some degree the differing conventions of Unix and @item{taming to some degree the differing conventions of Unix and
Windows, } Windows, }
@item{setting up suitable dependencies on PLT Scheme headers, and} @item{setting up suitable dependencies on Racket headers, and}
@item{using a pre-compiled binary when a @filepath{precompiled} @item{using a pre-compiled binary when a @filepath{precompiled}
directory is present.} directory is present.}

View File

@ -3,7 +3,7 @@
@title[#:tag "com" #:style 'toc]{COM} @title[#:tag "com" #:style 'toc]{COM}
MysterX allows scripting of most COM components from Scheme. A COM MysterX allows scripting of most COM components from Racket. A COM
component can be scripted in MysterX if it supports OLE Automation via component can be scripted in MysterX if it supports OLE Automation via
the @tt{IDispatch} interface, and if it publishes type information the @tt{IDispatch} interface, and if it publishes type information
using the @tt{ITypeInfo} interface. using the @tt{ITypeInfo} interface.

View File

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

View File

@ -3,7 +3,7 @@
@title[#:tag "methprop"]{COM Methods and Properties} @title[#:tag "methprop"]{COM Methods and Properties}
MysterX allows scripting of most COM components from Scheme. A COM MysterX allows scripting of most COM components from Racket. A COM
component can be scripted in MysterX if it supports OLE Automation component can be scripted in MysterX if it supports OLE Automation
via the @tt{IDispatch} interface, and if it publishes type via the @tt{IDispatch} interface, and if it publishes type
information using the @tt{ITypeInfo} interface. information using the @tt{ITypeInfo} interface.

View File

@ -1,12 +1,12 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@bold{MysterX}: Using Windows COM Objects in Scheme} @title{@bold{MysterX}: Using Windows COM Objects in Racket}
@author["Paul Steckler"] @author["Paul Steckler"]
@bold{MysterX} is a toolkit for building Windows applications from @bold{MysterX} is a toolkit for building Windows applications from
@as-index{ActiveX} and COM components, using Scheme as glue code. @as-index{ActiveX} and COM components, using Racket as glue code.
Dynamic HTML (DHTML) is used for component presentation and Dynamic HTML (DHTML) is used for component presentation and
event-handling. event-handling.

View File

@ -12,11 +12,11 @@ Recent versions of Windows come with DCOM; DCOM packages for Windows
Two Windows DLLs support low-level operations in MysterX: Two Windows DLLs support low-level operations in MysterX:
@filepath{myspage.dll} and @filepath{myssink.dll}. Both are installed @filepath{myspage.dll} and @filepath{myssink.dll}. Both are installed
in the registry (using @exec{regsvr32.exe}) when Setup PLT runs the in the registry (using @exec{regsvr32.exe}) when @exec{raco setup} runs the
MysterX post-installer. If you move the location of your PLT MysterX post-installer. If you move the location of your Racket
installation, you may need to re-run Setup PLT to make MysterX installation, you may need to re-run @exec{raco setup} to make MysterX
work. Neither of these DLLs is specific to a PLT Scheme version, so work. Neither of these DLLs is specific to a Racket version, so
it's ok for one version of PLT Scheme to use the DLLs registered by it's ok for one version of Racket to use the DLLs registered by
another. another.
@margin-note{Prior to version 369.4, @filepath{myssink.dll} was @margin-note{Prior to version 369.4, @filepath{myssink.dll} was
@ -77,7 +77,7 @@ class system, you may also need
] ]
Several MysterX procedures take HTML strings as input. The Several MysterX procedures take HTML strings as input. The
@schememodname[xml] library provides procedures that convert Scheme @schememodname[xml] library provides procedures that convert Racket
syntax into XML strings. You may find using these procedures useful syntax into XML strings. You may find using these procedures useful
in creating HTML strings for use by MysterX. in creating HTML strings for use by MysterX.

View File

@ -9,20 +9,20 @@
(list @elem{@(tt name) COM @|what|}) (list @elem{@(tt name) COM @|what|})
(apply tt proto))) (apply tt proto)))
@title{@bold{MzCOM}: Scheme as a Windows COM Object} @title{@bold{MzCOM}: Racket as a Windows COM Object}
@author["Paul Steckler"] @author["Paul Steckler"]
@exec{MzCOM.exe} is a Windows COM (i.e., Component Object Model) class @exec{MzCOM.exe} is a Windows COM (i.e., Component Object Model) class
wrapper for PLT Scheme. wrapper for Racket.
During normal installation of MzCOM, the executable is registered as a During normal installation of MzCOM, the executable is registered as a
COM object automatically. If you move the PLT Scheme installation COM object automatically. If you move the Racket installation
folder, re-register @exec{MzCOM.exe} with folder, re-register @exec{MzCOM.exe} with
@commandline{mzcom.exe /RegServer} @commandline{mzcom.exe /RegServer}
The @exec{MzCOM.exe} executable find DLLs and PLT Scheme library The @exec{MzCOM.exe} executable find DLLs and Racket library
collections relative to its own path. collections relative to its own path.
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@ -61,11 +61,11 @@ From Visual C++:
where @tt{<version>} is the version number. You'll need the where @tt{<version>} is the version number. You'll need the
definition of @tt{IID_IMzObj} (see @secref["guids"]). The header file definition of @tt{IID_IMzObj} (see @secref["guids"]). The header file
@filepath{mzcom.h} is generated as @filepath{src\worksp\mzcom\} when @filepath{mzcom.h} is generated as @filepath{src\worksp\mzcom\} when
building from the PLT Scheme source distribution. The above C/C++ code building from the Racket source distribution. The above C/C++ code
is for illustration; your actual code should check return values, of is for illustration; your actual code should check return values, of
course. course.
Using @schememodname[mysterx] to manipulate COM objects within Scheme, Using @schememodname[mysterx] to manipulate COM objects within Racket,
you can load MzCOM with either you can load MzCOM with either
@schemeblock[ @schemeblock[
@ -84,7 +84,7 @@ methods may be called directly or by using OLE Automation.
@section[#:tag "guids"]{GUIDs} @section[#:tag "guids"]{GUIDs}
When compiled from the PLT Scheme source distibrution, the directory When compiled from the Racket source distibrution, the directory
@filepath{src\worksp\mzcom\} contains the file @filepath{MzCOM_i.c} @filepath{src\worksp\mzcom\} contains the file @filepath{MzCOM_i.c}
that contains GUIDs for MzCOM. Those GUIDs are as follows: that contains GUIDs for MzCOM. Those GUIDs are as follows:
@ -122,15 +122,15 @@ MzCOM support three COM methods:
Takes and returns @tt{BSTR}s (BASIC strings). The returned Takes and returns @tt{BSTR}s (BASIC strings). The returned
value is the result of evaluating the input expression, value is the result of evaluating the input expression,
formatted as a string. The input string may contain several formatted as a string. The input string may contain several
S-expressions. The embedded PLT Scheme updates its environment S-expressions. The embedded Racket updates its environment
with each evaluation. Therefore, it is possible to define with each evaluation. Therefore, it is possible to define
procedures in a call to @tt{Eval}, and use the procedures in procedures in a call to @tt{Eval}, and use the procedures in
subsequent calls.} subsequent calls.}
@item{@com-index["Reset" "method"]{Reset :: void Reset(void)} @item{@com-index["Reset" "method"]{Reset :: void Reset(void)}
Resets the Scheme environment to the initial environment. Resets the Racket environment to the initial environment.
Also, the custodian for the primary Scheme thread is invoked, Also, the custodian for the primary Racket thread is invoked,
shutting all its managed values.} shutting all its managed values.}
] ]
@ -155,8 +155,8 @@ means to obtain COM error information.
@section{Evaluation thread} @section{Evaluation thread}
The PLT Scheme evaluator runs in a Win32 thread created when MzCOM is The Racket evaluator runs in a Win32 thread created when MzCOM is
loaded. If an expression kills the primary MzScheme thread, as in loaded. If an expression kills the primary Racket thread, as in
@schemeblock[ @schemeblock[
(kill-thread (current-thread)) (kill-thread (current-thread))

View File

@ -1,10 +1,10 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@bold{MzLib}: Legacy PLT Libraries} @title{@bold{MzLib}: Legacy Racket Libraries}
The @filepath{mzlib} collection contains wrappers and libraries for The @filepath{mzlib} collection contains wrappers and libraries for
compatibility with older versions of PLT Scheme. In many ways, the compatibility with older versions of Racket. In many ways, the
libraries of the @filepath{mzlib} collection go with the libraries of the @filepath{mzlib} collection go with the
@schememodname[mzscheme] legacy language. Newer variants of many @schememodname[mzscheme] legacy language. Newer variants of many
libraries reside in the @filepath{scheme} collection. libraries reside in the @filepath{scheme} collection.

View File

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

View File

@ -9,15 +9,15 @@
@defmodule[openssl] @defmodule[openssl]
The @schememodname[openssl] library provides glue for the OpenSSL The @schememodname[openssl] library provides glue for the OpenSSL
library with the Scheme port system. It provides functions nearly library with the Racket port system. It provides functions nearly
identically to the standard TCP subsystem in PLT Scheme, plus a identically to the standard TCP subsystem in Racket, plus a
generic @scheme[ports->ssl-ports] interface. generic @scheme[ports->ssl-ports] interface.
To use this library, you will need OpenSSL installed on your machine, To use this library, you will need OpenSSL installed on your machine,
but but
@itemize[ @itemize[
@item{for Windows, the PLT Scheme distribution for Windows includes @item{for Windows, the Racket distribution for Windows includes
the necessary DLLs.} the necessary DLLs.}
@item{for Mac OS X, version 10.2 and later provides the necessary @item{for Mac OS X, version 10.2 and later provides the necessary
@ -344,8 +344,8 @@ collection for testing purposes where the peer identifies itself using
For Windows, @schememodname[openssl] relies on @filepath{libeay32.dll} For Windows, @schememodname[openssl] relies on @filepath{libeay32.dll}
and @filepath{ssleay32.dll}, where the DLLs are located in the same and @filepath{ssleay32.dll}, where the DLLs are located in the same
place as @filepath{libmzsch@nonterm{vers}.dll} (where @nonterm{vers} place as @filepath{libmzsch@nonterm{vers}.dll} (where @nonterm{vers}
is either @tt{xxxxxxx} or a mangling of PLT Scheme's version is either @tt{xxxxxxx} or a mangling of Racket's version
number). The DLLs are distributed as part of PLT Scheme. number). The DLLs are distributed as part of Racket.
For Unix variants, @schememodname[openssl] relies on For Unix variants, @schememodname[openssl] relies on
@filepath{libcryto.so} and @filepath{libssl.so}, which must be @filepath{libcryto.so} and @filepath{libssl.so}, which must be

View File

@ -7,7 +7,7 @@
@schememodname[scriblib/gui-eval] library support example @schememodname[scriblib/gui-eval] library support example
evaluations with results that are @schememodname[slideshow] picts.} evaluations with results that are @schememodname[slideshow] picts.}
The trick is that @schememodname[scheme/gui] is not generally The trick is that @schememodname[racket/gui] is not generally
available when rendering documentation, because it requires a GUI available when rendering documentation, because it requires a GUI
context. The picture output is rendered to an image file when the context. The picture output is rendered to an image file when the
@envvar{MREVAL} environment variable is set, so run the enclosing @envvar{MREVAL} environment variable is set, so run the enclosing
@ -27,5 +27,5 @@ generated image.
Like @scheme[interaction], etc., but actually evaluating the forms Like @scheme[interaction], etc., but actually evaluating the forms
only when the @envvar{MREVAL} environment variable is set, and then in only when the @envvar{MREVAL} environment variable is set, and then in
an evaluator that is initialized with @schememodname[scheme/gui/base] an evaluator that is initialized with @schememodname[racket/gui/base]
and @schememodname[slideshow]. } and @schememodname[slideshow]. }

View File

@ -11,7 +11,7 @@ libraries. The @schememodname[sgl] libraries to not address
system-level concerns, such as the attachment of GL rendering contexts system-level concerns, such as the attachment of GL rendering contexts
to displays. Instead, the libraries should work with any Racket to displays. Instead, the libraries should work with any Racket
extension that provides GL with access to the system (such as a extension that provides GL with access to the system (such as a
binding for @tt{glx}). Notably, the @schememodname[scheme/gui/base] binding for @tt{glx}). Notably, the @schememodname[racket/gui/base]
library provides support for rendering contexts via the library provides support for rendering contexts via the
@scheme[canvas%] class and its @method[canvas% with-gl-context] @scheme[canvas%] class and its @method[canvas% with-gl-context]
method. method.

View File

@ -57,7 +57,7 @@ Implementation} (a.k.a. @deftech{SRFI}) process allows individual
members of the Scheme community to propose libraries and extensions to members of the Scheme community to propose libraries and extensions to
be supported by multiple Scheme implementations. be supported by multiple Scheme implementations.
PLT Scheme is distributed with implementations of many SRFIs, most of Racket is distributed with implementations of many SRFIs, most of
which can be implemented as libraries. To import the bindings of SRFI which can be implemented as libraries. To import the bindings of SRFI
@math{n}, use @math{n}, use
@ -65,9 +65,9 @@ which can be implemented as libraries. To import the bindings of SRFI
(require @#,elem{@schemeidfont{srfi/}@math{n}}) (require @#,elem{@schemeidfont{srfi/}@math{n}})
] ]
This document lists the SRFIs that are supported by PLT Scheme and This document lists the SRFIs that are supported by Racket and
provides a link to the original SRFI specification (which is also provides a link to the original SRFI specification (which is also
distributed as part of PLT Scheme's documentation). distributed as part of Racket's documentation).
@table-of-contents[] @table-of-contents[]
@ -565,7 +565,7 @@ are also available from @schememodname[scheme/foreign].
)] )]
Take care NOT to confuse the internal date structure with the Take care NOT to confuse the internal date structure with the
PLT Scheme @scheme[date]; they are not the same, and all procedures Racket @scheme[date]; they are not the same, and all procedures
from the SRFI library expect the former. from the SRFI library expect the former.
@; ---------------------------------------- @; ----------------------------------------
@ -651,7 +651,7 @@ from the SRFI library expect the former.
@srfi[30]{Nested Multi-line Comments} @srfi[30]{Nested Multi-line Comments}
This SRFI's syntax is part of PLT Scheme's default reader. This SRFI's syntax is part of Racket's default reader.
@; ---------------------------------------- @; ----------------------------------------
@ -684,7 +684,7 @@ This SRFI's syntax is part of PLT Scheme's default reader.
(read-with-shared-structure #f "read-with-shared-structure") (read-with-shared-structure #f "read-with-shared-structure")
)] )]
This SRFI's syntax is part of PLT Scheme's default reader and printer. This SRFI's syntax is part of Racket's default reader and printer.
@; ---------------------------------------- @; ----------------------------------------
@ -919,7 +919,7 @@ Returns @scheme[#t] if @scheme[v] is a promise, @scheme[#f] otherwise.}
Original specification: @link["../srfi-std/srfi-62.html"]{SRFI 62} Original specification: @link["../srfi-std/srfi-62.html"]{SRFI 62}
This SRFI's syntax is part of PLT Scheme's default reader (no This SRFI's syntax is part of Racket's default reader (no
@scheme[require] is needed). @scheme[require] is needed).
@; ---------------------------------------- @; ----------------------------------------

View File

@ -5,7 +5,7 @@
@defmodulelang[swindle] @defmodulelang[swindle]
Swindle extends PLT Scheme with many additional features. The main Swindle extends Racket with many additional features. The main
feature that started this project is a CLOS-like object system based feature that started this project is a CLOS-like object system based
on Tiny-CLOS from Xerox, but there is a lot more. on Tiny-CLOS from Xerox, but there is a lot more.
@ -32,7 +32,7 @@ only a subset of the system is needed.
simple ones like @scheme[inc!], and @scheme[push!]. (Available simple ones like @scheme[inc!], and @scheme[push!]. (Available
separately using @scheme[swindle/setf], where the names separately using @scheme[swindle/setf], where the names
@scheme[setf!] and @scheme[psetf!] are used to avoid changing the @scheme[setf!] and @scheme[psetf!] are used to avoid changing the
Scheme form)} Racket form)}
@item{Easy macro-defining macros --- simple @scheme[syntax-rules] macros with @item{Easy macro-defining macros --- simple @scheme[syntax-rules] macros with
@scheme[defsubst], and a generic @scheme[defmacro] utility, all with a local @scheme[defsubst], and a generic @scheme[defmacro] utility, all with a local
@ -57,7 +57,7 @@ only a subset of the system is needed.
stand-alone methods, method-combination, and some MOP extensions. stand-alone methods, method-combination, and some MOP extensions.
(Available without syntax bindings in @scheme[swindle/tiny-clos])} (Available without syntax bindings in @scheme[swindle/tiny-clos])}
@item{Good integration with the Scheme implementation: primitive @item{Good integration with the Racket implementation: primitive
values have corresponding Swindle classes, and struct types can also values have corresponding Swindle classes, and struct types can also
be used as type specializers. A Swindle class will be made when be used as type specializers. A Swindle class will be made when
needed, and it will reflect the struct hierarchy. In addition, needed, and it will reflect the struct hierarchy. In addition,
@ -81,7 +81,7 @@ only a subset of the system is needed.
@item{A language that can easily create HTML, where the result is @item{A language that can easily create HTML, where the result is
human-editable. (@scheme[swindle/html])} human-editable. (@scheme[swindle/html])}
@item{Customizable syntax: easy to add customized languages to DrScheme. @item{Customizable syntax: easy to add customized languages to DrRacket.
(@scheme[custom])} (@scheme[custom])}
] ]
@ -133,8 +133,8 @@ whole Swindle environment.
Compilation definitions.} Compilation definitions.}
@item{@scheme[swindle/tool] (module) --- @item{@scheme[swindle/tool] (module) ---
Setup for Swindle in DrScheme: makes some languages available in Setup for Swindle in DrRacket: makes some languages available in
DrScheme, including custom Swindle-based languages.} DrRacket, including custom Swindle-based languages.}
@item{@scheme[swindle/custom] (module) --- @item{@scheme[swindle/custom] (module) ---
A sample file that demonstrates how to create a Swindle-based A sample file that demonstrates how to create a Swindle-based

View File

@ -17,7 +17,7 @@
@defform[(kernel-syntax-case stx-expr trans?-expr clause ...)]{ @defform[(kernel-syntax-case stx-expr trans?-expr clause ...)]{
A syntactic form like @scheme[syntax-case*], except that the literals A syntactic form like @scheme[syntax-case*], except that the literals
are built-in as the names of the primitive PLT Scheme forms as are built-in as the names of the primitive Racket forms as
exported by @schememodname[scheme/base]; see @secref[#:doc refman exported by @schememodname[scheme/base]; see @secref[#:doc refman
"fully-expanded"]. "fully-expanded"].
@ -37,7 +37,7 @@ is @scheme[mzscheme], since the binding of @mzscheme-if from
A syntactic form like @scheme[kernel-syntax-case], except that it A syntactic form like @scheme[kernel-syntax-case], except that it
takes an additional list of extra literals that are in addition to the takes an additional list of extra literals that are in addition to the
primitive PLT Scheme forms.} primitive Racket forms.}
@defform[(kernel-syntax-case/phase stx-expr phase-expr clause ...)]{ @defform[(kernel-syntax-case/phase stx-expr phase-expr clause ...)]{
@ -56,8 +56,8 @@ level, as indicated by @scheme[phase-expr].}
@defproc[(kernel-form-identifier-list) (listof identifier?)]{ @defproc[(kernel-form-identifier-list) (listof identifier?)]{
Returns a list of identifiers that are bound normally, Returns a list of identifiers that are bound normally,
@scheme[for-syntax], and @scheme[for-template] to the primitive PLT @scheme[for-syntax], and @scheme[for-template] to the primitive
Scheme forms for expressions, internal-definition positions, and Racket forms for expressions, internal-definition positions, and
module-level and top-level positions. This function is useful for module-level and top-level positions. This function is useful for
generating a list of stopping points to provide to generating a list of stopping points to provide to
@scheme[local-expand]. @scheme[local-expand].

View File

@ -18,7 +18,7 @@ values.}
Inspects @scheme[stx] to check whether evaluating it will declare a Inspects @scheme[stx] to check whether evaluating it will declare a
module named @scheme[expected-module-sym]---at least if @scheme[module] is bound module named @scheme[expected-module-sym]---at least if @scheme[module] is bound
in the top-level to MzScheme's @scheme[module]. The syntax object @scheme[stx] can in the top-level to Racket's @scheme[module]. The syntax object @scheme[stx] can
contain a compiled expression. Also, @scheme[stx] can be an end-of-file, on contain a compiled expression. Also, @scheme[stx] can be an end-of-file, on
the grounds that @scheme[read-syntax] can produce an end-of-file. the grounds that @scheme[read-syntax] can produce an end-of-file.

View File

@ -151,7 +151,7 @@ identifiers used by the @scheme[reader-option]s.
@item{@scheme[#:info] specifies an implementation of reflective @item{@scheme[#:info] specifies an implementation of reflective
information that is used by external tools to manipulate the information that is used by external tools to manipulate the
@emph{source} of modules in the language @scheme[_something]. For @emph{source} of modules in the language @scheme[_something]. For
example, DrScheme uses information from @scheme[#:info] to example, DrRacket uses information from @scheme[#:info] to
determine the style of syntax coloring that it should use for determine the style of syntax coloring that it should use for
editing a module's source. editing a module's source.
@ -178,7 +178,7 @@ identifiers used by the @scheme[reader-option]s.
key, for which it returns @scheme[language-module]; it returns key, for which it returns @scheme[language-module]; it returns
the given default value for any other key. the given default value for any other key.
In the case of the DrScheme syntax-coloring example, DrScheme In the case of the DrRacket syntax-coloring example, DrRacket
supplies @scheme['color-lexer] as the symbol argument, and it supplies @scheme['color-lexer] as the symbol argument, and it
supplies @scheme[#f] as the default. The default-filtering supplies @scheme[#f] as the default. The default-filtering
argument (i.e., the third argument to the @scheme[#:info] argument (i.e., the third argument to the @scheme[#:info]
@ -189,7 +189,7 @@ identifiers used by the @scheme[reader-option]s.
reflective information that is used by external tools to reflective information that is used by external tools to
manipulate the module in the language @scheme[_something] in manipulate the module in the language @scheme[_something] in
its @emph{expanded}, @emph{compiled} or @emph{declared} form its @emph{expanded}, @emph{compiled} or @emph{declared} form
(as opposed to source). For example, when MzScheme starts a (as opposed to source). For example, when Racket starts a
program, it uses information attached to the main module to program, it uses information attached to the main module to
initialize the run-time environment. initialize the run-time environment.
@ -219,8 +219,8 @@ identifiers used by the @scheme[reader-option]s.
@scheme[language-data] are bound, the same as for @scheme[language-data] are bound, the same as for
@scheme[#:info]. @scheme[#:info].
In the case of the MzScheme run-time configuration example, In the case of the Racket run-time configuration example,
MzScheme uses the @scheme[#:language-info] vector to obtain a Racket uses the @scheme[#:language-info] vector to obtain a
function, and then it passes @scheme['configure-runtime] to the function, and then it passes @scheme['configure-runtime] to the
function to obtain information about configuring the runtime function to obtain information about configuring the runtime
environment. See also @secref[#:doc refman "configure-runtime"].} environment. See also @secref[#:doc refman "configure-runtime"].}

View File

@ -47,9 +47,9 @@ the same name (as extracted by @scheme[syntax-e]) and @scheme[a-id]
has no binding other than at the top level. has no binding other than at the top level.
This procedure is useful in conjunction with @scheme[syntax-case*] to This procedure is useful in conjunction with @scheme[syntax-case*] to
match procedure names that are normally bound by MzScheme. For match procedure names that are normally bound by Racket. For
example, the @scheme[include] macro uses this procedure to recognize example, the @scheme[include] macro uses this procedure to recognize
@scheme[build-path]; using @scheme[free-identifier=?] would not work @scheme[build-path]; using @scheme[free-identifier=?] would not work
well outside of @scheme[module], since the top-level well outside of @scheme[module], since the top-level
@scheme[build-path] is a distinct variable from the MzScheme export @scheme[build-path] is a distinct variable from the @schememodname[racket/base] export
(though it's bound to the same procedure, initially).} (though it's bound to the same procedure, initially).}

View File

@ -16,7 +16,7 @@
@defmodule[test-engine/scheme-tests] @defmodule[test-engine/scheme-tests]
This module provides test forms for use in Scheme programs, as well This module provides test forms for use in Racket programs, as well
as parameters to configure the behavior of test reports. as parameters to configure the behavior of test reports.
Each check form may only occur at the top-level; results are collected Each check form may only occur at the top-level; results are collected

View File

@ -18,8 +18,8 @@ depth of the continuation.
@item{Throw away @filepath{.zo} versions of your source} @item{Throw away @filepath{.zo} versions of your source}
@item{Prefix your program with @item{Prefix your program with
@schemeblock[(require trace)] @schemeblock[(require trace)]
perhaps by starting @exec{mzscheme} with perhaps by starting @exec{racket} with
@commandline{mzscheme -l trace ...} @commandline{racket -l trace ...}
before arguments to load your program.} before arguments to load your program.}
@item{Run your program} @item{Run your program}
] ]
@ -40,7 +40,7 @@ parameter.
@defmodule[trace]{Invoking the @defmodule[trace]{Invoking the
@schememodname[trace] module sets the evaluation handler @schememodname[trace] module sets the evaluation handler
(via @scheme[current-eval]) to instrument Scheme source code.} (via @scheme[current-eval]) to instrument Racket source code.}
NOTE: @schememodname[trace] has no effect on code loaded as NOTE: @schememodname[trace] has no effect on code loaded as
compiled byte code (i.e., from a @filepath{.zo} file) or native code compiled byte code (i.e., from a @filepath{.zo} file) or native code

View File

@ -10,10 +10,10 @@
@(define (selflink s) (link s (tt s))) @(define (selflink s) (link s (tt s)))
@title{@bold{Version}: PLT Version Checking} @title{@bold{Version}: Racket Version Checking}
The version collection contains several version-related pieces that The version collection contains several version-related pieces that
are used by PLT Scheme. See also @scheme[version] from are used by Racket. See also @scheme[version] from
@schememodname[scheme/base]. @schememodname[scheme/base].
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@ -25,7 +25,7 @@ are used by PLT Scheme. See also @scheme[version] from
@defthing[patchlevel exact-nonnegative-integer?]{ @defthing[patchlevel exact-nonnegative-integer?]{
Indicates the current installed patch level, which is normally zero, Indicates the current installed patch level, which is normally zero,
but may be updated by patches to DrScheme.} but may be updated by patches to DrRacket.}
@; ---------------------------------------- @; ----------------------------------------
@ -72,20 +72,20 @@ indicates the current state of the curent installation:
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@section{DrScheme Version Tool} @section{DrRacket Version Tool}
@defmodule[version/tool] @defmodule[version/tool]
The @scheme[version/tool] library implements a DrScheme tool that The @scheme[version/tool] library implements a DrRacket tool that
@itemize[ @itemize[
@item{makes the patchlevel display as a version @tt{p}@nonterm{N} @item{makes the patchlevel display as a version @tt{p}@nonterm{N}
suffix in DrScheme (though the base verion reported by suffix in DrRacket (though the base verion reported by
@scheme[(version)] is not changed);} @scheme[(version)] is not changed);}
@item{if enabled by the user, periodically checks whether a @item{if enabled by the user, periodically checks whether a
new PLT Scheme distribution is available for download.} new Racket distribution is available for download.}
] ]
@ -97,11 +97,11 @@ The @scheme[version/tool] library implements a DrScheme tool that
The @schememodname[version/utils] library provides a few of convenient The @schememodname[version/utils] library provides a few of convenient
utilities for dealing with version strings. Unless explicitly noted, utilities for dealing with version strings. Unless explicitly noted,
these functions do not handle legacy versions of PLT Scheme.} these functions do not handle legacy versions of Racket.}
@defproc[(valid-version? [str string?]) boolean?]{ @defproc[(valid-version? [str string?]) boolean?]{
Returns @scheme[#t] if @scheme[str] is a valid PLT Scheme version Returns @scheme[#t] if @scheme[str] is a valid Racket version
string, @scheme[#f] otherwise.} string, @scheme[#f] otherwise.}
@defproc[(version->list [str valid-version?]) @defproc[(version->list [str valid-version?])
@ -131,7 +131,7 @@ alpha version. @scheme[str] is assumed to be a valid version.}
Converts the version string into an integer. For version Converts the version string into an integer. For version
@scheme["X.YY.ZZZ.WWW"], the result will be @schemevalfont{XYYZZZWWW}. @scheme["X.YY.ZZZ.WWW"], the result will be @schemevalfont{XYYZZZWWW}.
This function works also for legacy PLT Scheme versions, by This function works also for legacy Racket versions, by
translating @scheme["XYY.ZZZ"] to @schemevalfont{XYYZZZ000}. The translating @scheme["XYY.ZZZ"] to @schemevalfont{XYYZZZ000}. The
resulting integer can thefore be used to conveniently compare any two resulting integer can thefore be used to conveniently compare any two
(valid) version strings. If the version string is invalid the (valid) version strings. If the version string is invalid the