add lots of main.ss files where appropriate

svn: r8764
This commit is contained in:
Eli Barzilay 2008-02-22 16:28:31 +00:00
parent 9ff5e00b58
commit f5bc96418d
32 changed files with 174 additions and 130 deletions

View File

@ -1,7 +1,7 @@
#lang scribble/doc
@(require scribble/manual
(for-label browser/browser
(for-label browser
browser/browser-unit
browser/browser-sig
browser/htmltext
@ -20,7 +20,7 @@
@title{@bold{Browser}: Simple HTML Rendering}
The @schememodname[browser/browser] library provides the following
The @schememodname[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%]
@ -29,7 +29,7 @@ an external browser (such as Firefox).
@section[#:tag "browser"]{Browser}
@defmodule[browser/browser]
@defmodule[browser]
The browser supports basic HTML commands, plus special Scheme
hyperlinks of the form @(litchar "<A MZSCHEME=sexpr>...</A>"). When

3
collects/browser/main.ss Normal file
View File

@ -0,0 +1,3 @@
#lang scheme/base
(require "browser.ss")
(provide (all-from-out "browser.ss"))

View File

@ -2,26 +2,26 @@
@(require scribble/manual
(for-label scheme/base
scheme/contract
config/config))
config))
@title{@bold{Config}: Installation and Search Paths}
@section{Configuring Directories and Search Paths}
@defmodule[config/config]{
@defmodule[config]{
The @schememodname[config/config] library specifies the location of
The @schememodname[config] library specifies the location of
directories (such as the main documentation directory) and also
directory search paths (such as a list of directories to search for
documentation).}
@bold{Note:} Instead of @scheme[require]ing
@schememodname[config/config] directly, use the
@schememodname[config] directly, use the
@schememodname[setup/dirs] library, which combines information from
@schememodname[config/config] and other sources.
@schememodname[config] and other sources.
The @schememodname[config/config] module must export the following
The @schememodname[config] module must export the following
values. In all cases where a @scheme[delay]ed value is expected for an
exported identifier, the value can be a @scheme[delay]ed @scheme[#f]
to indicate the default.
@ -109,7 +109,7 @@ normally takes precedence over the main collection directory).
@defmodule[setup/configtab]{
The @schememodname[setup/configtab] library defines a language module
that can be used to implement @schememodname[config/config].}
that can be used to implement @schememodname[config].}
When @schememodname[setup/configtab] is used as a language module, the
module body must consist of a sequence of
@ -117,7 +117,7 @@ module body must consist of a sequence of
@schemeblock[(define _id _val)]
declarations, where each @scheme[_id] is one of the names that the
@schememodname[config/config] library must export, and @scheme[_val] is
@schememodname[config] library must export, and @scheme[_val] is
an expression for the value (which will be automatically wrapped with
@scheme[delay] when needed). If a required export has no corresponding
@scheme[define], a definition with @scheme[#f] is inserted

4
collects/config/main.ss Normal file
View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "config.ss")
(provide (all-from-out "config.ss"))

View File

@ -1,9 +1,9 @@
#lang scribble/doc
#lang scribble/doc
@(require
@(require
scribble/manual
(for-label scheme
dynext/dynext))
(for-label scheme
dynext))
@title{@bold{Dynext}: Running a C Compiler/Linker}

4
collects/dynext/main.ss Normal file
View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "dynext.ss")
(provide (all-from-out "dynext.ss"))

View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "embedded-gui.ss")
(provide (all-from-out "embedded-gui.ss"))

View File

@ -0,0 +1,3 @@
#lang scheme/base
(require "framework.ss")
(provide (all-from-out "framework.ss"))

View File

@ -1,4 +1,4 @@
#lang setup/infotab
(define mred-launcher-libraries (list "games.ss"))
(define mred-launcher-libraries (list "main.ss"))
(define mred-launcher-names (list "PLT Games"))

View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "graphics.ss")
(provide (all-from-out "graphics.ss"))

View File

@ -6,7 +6,7 @@ from the "Special" menu.
Though less recommended, you can also run
(require (lib "guibuilder.ss" "guibuilder"))
(require (lib ".ss" "guibuilder"))
to get a stand-alone builder. Save your files with the extension
".gui" to ensure that they can be re-loaded later.

View File

@ -2,7 +2,7 @@
@(require scribble/manual
scribble/eval
(for-label html/html)
(for-label xml/xml))
(for-label xml))
@title{@bold{HTML}: Parsing Library}
@ -26,7 +26,7 @@ Reads (X)HTML from a port, producing an @scheme[html] instance.}
(listof content)]{
Reads HTML from a port, producing an xexpr compatible with the
@schememodname[xml/xml] library (which defines @scheme[content]).}
@schememodname[xml] library (which defines @scheme[content]).}
@ -34,11 +34,11 @@ Reads HTML from a port, producing an xexpr compatible with the
@def+int[
(module html-example scheme
(code:comment #, @t{Some of the symbols in html/html and xml/xml conflict with})
(code:comment #, @t{Some of the symbols in html/html and xml conflict with})
(code:comment #, @t{each other and with scheme/base language, so we prefix})
(code:comment #, @t{to avoid namespace conflict.})
(require (prefix-in h: html/html)
(prefix-in x: xml/xml))
(prefix-in x: xml))
(define an-html
(h:read-xhtml
@ -77,7 +77,7 @@ Reads HTML from a port, producing an xexpr compatible with the
@section{HTML Structures}
@scheme[pcdata], @scheme[entity], and @scheme[attribute] are defined
in the @schememodname[xml/xml] documentation.
in the @schememodname[xml] documentation.
A @scheme[html-content] is either
@itemize[

View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "launcher.ss")
(provide (all-from-out "launcher.ss"))

View File

@ -50,7 +50,7 @@ can use the make collection.
Here's the equivalent Scheme program:
(require (lib "make.ss" "make"))
(require make)
(define (make-output in out)
...)
@ -72,11 +72,11 @@ abstract over the various make lines (for example, the
a.output, b.output, and c.output lines are very similar and
it would be good to write a program to generate those
lines).
_make.ss_
---------
The make.ss library in the `make' collection provides a
The make library in the `make' collection provides a
`make' macro and a `make/proc' procedure.
> (make ((target (depend ...) command ...) ...) argv)
@ -118,7 +118,7 @@ The `target' field is a string or a list of strings naming
the target(s), and the `orig-exn' field is the original
exception.
make.ss also provides the following parameters:
make also provides the following parameters:
> (make-print-checking [on?]) - If #f, make only prints when
it is making a target. Otherwise, it prints when it is

4
collects/make/main.ss Normal file
View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "make.ss")
(provide (all-from-out "make.ss"))

View File

@ -66,7 +66,7 @@ _MysterX_
Load the MysterX module with
(require (lib "mysterx.ss" "mysterx"))
(require mysterx)
Because some MysterX code relies on the PLT Scheme class system, you
will likely need to run

4
collects/mysterx/main.ss Normal file
View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "mysterx.ss")
(provide (all-from-out "mysterx.ss"))

View File

@ -5,8 +5,8 @@ PLoT collection: Quick Start
2.1 Making basic plots
After loading the correct module using (require (lib "plot.ss"
"plot")) try (plot (line (lambda (x) x)))
After loading the correct module using (require plot) try
(plot (line (lambda (x) x)))
Any other function with the contract number -> number can be plotted
using the same form. To plot multiple items, use the functions mix and

4
collects/plot/main.ss Normal file
View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "plot.ss")
(provide (all-from-out "plot.ss"))

View File

@ -1,94 +1,78 @@
(module plot mzscheme
(require
(lib "list.ss")
(lib "etc.ss")
(lib "math.ss" "plot")
(lib "view.ss" "plot")
(lib "renderer-helpers.ss" "plot")
(lib "renderers.ss" "plot")
(lib "fit.ss" "plot")
(lib "class.ss"))
#lang mzscheme
; plot : plottable (option value)*
(define-syntax plot
(syntax-rules ()
[(_ ren )
(instantiate 2d-view% () (renderer ren))]
[(_ ren (option value) ...)
(instantiate 2d-view% () (renderer ren) (option value) ...)]))
(require mzlib/list mzlib/etc mzlib/class
"math.ss" "view.ss" "renderer-helpers.ss" "renderers.ss" "fit.ss")
(define-syntax plot3d
(syntax-rules ()
[(_ ren )
(instantiate 3d-view% () (renderer ren))]
[(_ ren (option value) ...)
(instantiate 3d-view% () (renderer ren) (option value) ...)]))
;; plot : plottable (option value)*
(define-syntax plot
(syntax-rules ()
[(_ ren )
(instantiate 2d-view% () (renderer ren))]
[(_ ren (option value) ...)
(instantiate 2d-view% () (renderer ren) (option value) ...)]))
; mix-int : renderer renderer -> renderer
; creates a renderer that will renderer both of the inputs
(define (mix-int renderer1 renderer2)
(lambda (view)
(send view reset-to-default)
(renderer1 view)
(send view reset-to-default)
(renderer2 view)))
(define-syntax plot3d
(syntax-rules ()
[(_ ren )
(instantiate 3d-view% () (renderer ren))]
[(_ ren (option value) ...)
(instantiate 3d-view% () (renderer ren) (option value) ...)]))
; mix : renderer+ -> renderer
; combine any number of renderers
(define (mix r1 . the-rest)
(if (empty? the-rest)
r1
(mix-int r1 (apply mix the-rest))))
;; mix-int : renderer renderer -> renderer
;; creates a renderer that will renderer both of the inputs
(define (mix-int renderer1 renderer2)
(lambda (view)
(send view reset-to-default)
(renderer1 view)
(send view reset-to-default)
(renderer2 view)))
; make-2d-renderer : (2d-view% -> void)
; provides a user with the ability to create their own renderers
; without providing the implimentation
(define custom identity)
;; mix : renderer+ -> renderer
;; combine any number of renderers
(define (mix r1 . the-rest)
(if (empty? the-rest)
r1
(mix-int r1 (apply mix the-rest))))
;;
(define-syntax fit
(syntax-rules ()
[(_ func ((param guess) ...) data)
(fit-int func
'((param guess) ...)
data)]))
;; make-2d-renderer : (2d-view% -> void)
;; provides a user with the ability to create their own renderers
;; without providing the implimentation
(define custom identity)
(provide
;;
(define-syntax fit
(syntax-rules ()
[(_ func ((param guess) ...) data)
(fit-int func '((param guess) ...) data)]))
;fitting
fit
(struct fit-result (rms
variance
names
final-params
std-error
std-error-percent
function))
; to make plots
plot
plot3d
(provide
; to combine/create renderers
mix
custom
;; fitting
fit
(struct fit-result
(rms variance names final-params std-error std-error-percent function))
;; to make plots
plot
plot3d
; 2d-renderers
error-bars
points
line
vector-field
contour
shade
; 3d-rendereres
surface
mesh3d
;; to combine/create renderers
mix
custom
; from math-tools
derivative
gradient
make-vec
))
;; 2d-renderers
error-bars
points
line
vector-field
contour
shade
;; 3d-rendereres
surface
mesh3d
;; from math-tools
derivative
gradient
make-vec
)

View File

@ -214,10 +214,10 @@ gl-vector-norm: gl-vector -> real-number
_sgl.ss_
Use the sgl.ss module by adding (require (lib "sgl.ss" "sgl)) to your program.
To prefix the function names with "gl-" use the form (require (prefix gl- (lib
"sgl.ss" "sgl"))) instead. The sgl.ss module provides a more Scheme-like
interface to the GL functions in gl.ss.
Use the sgl.ss module by adding (require sgl) to your program. To prefix the
function names with "gl-" use the form (require (prefix gl- sgl)) instead.
The sgl.ss module provides a more Scheme-like interface to the GL functions in
gl.ss.
Functions in sgl.ss take symbols instead of integers for GLenum arguments.
Each function checks that the given symbol is an acceptable argument and

3
collects/sgl/main.ss Normal file
View File

@ -0,0 +1,3 @@
#lang scheme/base
(require "sgl.ss")
(provide (all-from-out "sgl.ss"))

View File

@ -51,7 +51,7 @@
To load SrPersist, use
(require (lib "srpersist.ss" "srpersist"))
(require srpersist)
For Windows, if you get errors when loading, your Windows installation
may be missing certain ODBC libraries. Look for ODBC Data Sources

View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "srpersist.ss")
(provide (all-from-out "srpersist.ss"))

View File

@ -0,0 +1,3 @@
#lang scheme/base
(require "string-constant.ss")
(provide (all-from-out "string-constant.ss"))

View File

@ -1,6 +1,6 @@
#lang scribble/doc
@(require scribble/manual
(for-label string-constants/string-constant
(for-label string-constants
scheme))
@title{@bold{String Constants}: GUI Internationalization}
@ -11,7 +11,7 @@ DrScheme's GUI.
@; ----------------------------------------------------------------------
@section{Using String Constants}
@defmodule[string-constants/string-constant]
@defmodule[string-constants]
@defform[(string-constant name)]{

View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "tex2page.ss")
(provide (all-from-out "tex2page.ss"))

View File

@ -106,7 +106,7 @@ usual policy for reporting size information.
LaTeX output
------------
The LaTeX texpict function set is loaded by the _texpict.ss_ library.
The LaTeX texpict function set is loaded by the _texpict_ library.
The library is available in unit form via _texpict-unit.ss_, which
provides a `texpict@' unit with no imports and taht exports
`texpict-common^' and `texpict-extra^'. The _texpict-sig.ss_ library

4
collects/texpict/main.ss Normal file
View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "calltrace.ss")
(provide (all-from-out "calltrace.ss"))

4
collects/trace/main.ss Normal file
View File

@ -0,0 +1,4 @@
#lang scheme/base
(require "calltrace.ss")
(provide (all-from-out "calltrace.ss"))

View File

@ -2,7 +2,7 @@
@(require scribble/manual
(for-label scheme
trace/calltrace-lib))
trace))
@title[#:tag "top"]{@bold{Trace}: Instrumentation to Show Function Calls}
@ -17,19 +17,19 @@ depth of the continuation.
@itemize{
@item{Throw away @filepath{.zo} versions of your source}
@item{Prefix your program with
@schemeblock[(require trace/calltrace)]
@schemeblock[(require trace)]
perhaps by starting @exec{mzscheme} with
@commandline{mzscheme -l trace/calltrace ...}
@commandline{mzscheme -l trace ...}
before arguments to load your program.}
@item{Run your program}
}
The @schememodname[trace/calltrace] module is odd; don't import it
into another module. Instead, the @schememodname[trace/calltrace]
The @schememodname[trace] module is odd; don't import it
into another module. Instead, the @schememodname[trace]
module is meant to be invoked from the top-level, so that it can
install an evaluation handler, exception handler, etc.
To reuse parts of the code of @schememodname[trace/calltrace], import
To reuse parts of the code of @schememodname[trace], import
@schememodname[trace/calltrace-lib]. It contains all of the bindings
described here, but it but does not set the @scheme[current-eval]
parameter.
@ -38,11 +38,11 @@ parameter.
@section{Installing Calltrace}
@defmodule[trace/calltrace]{Invoking the
@schememodname[trace/calltrace] module sets the evaluation handler
@defmodule[trace]{Invoking the
@schememodname[trace] module sets the evaluation handler
(via @scheme[current-eval]) to instrument Scheme source code.}
NOTE: @schememodname[trace/calltrace] 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
(i.e., from a @filepath{.dll}, @filepath{.so}, or @filepath{.dylib}
file).
@ -53,7 +53,7 @@ default. The @scheme[instrumenting-enabled] parameter affects only the
way that source code is compiled, not the way that exception
information is reported.
Do not load @schememodname[trace/calltrace] before writing
Do not load @schememodname[trace] before writing
@filepath{.zo} files. Calltrace instruments S-expressions with
unprintable values; this works fine if the instrumented S-expression
is passed to the default eval handler, but neither the S-expression
@ -65,7 +65,7 @@ nor its byte-code form can be marshalled to a string.
@defmodule[trace/calltrace-lib]{The
@schememodname[trace/calltrace-lib] module provides functions that
implement @scheme[trace/calltrace].}
implement @scheme[trace].}
@defboolparam[instrumenting-enabled on?]{
@ -78,7 +78,7 @@ A procedure suitable for use with @scheme[current-eval], which
instruments expressions for Calltrace output (when instrumentation is
not disabled via @scheme[instrumenting-enabled]).
Requiring @scheme[trace/calltrace] installs this procedure as the
Requiring @scheme[trace] installs this procedure as the
value for @scheme[current-eval].}