diff --git a/collects/lang/htdp-lib.scrbl b/collects/lang/htdp-lib.scrbl new file mode 100644 index 0000000000..82ec779972 --- /dev/null +++ b/collects/lang/htdp-lib.scrbl @@ -0,0 +1,162 @@ +#lang scribble/doc +@(require scribble/manual + scribble/eval + (for-label scheme/base + scheme/contract + scheme/class + scheme/gui/base + lang/posn + lang/imageeq + lang/prim)) + +@(define htdp @italic{How to Design Programs}) +@(define (htdp-ref s) @secref[#:doc '(lib "scribblings/htdp-langs/htdp-langs.scrbl") s]) + +@title{@bold{HtDP}: Languages as Libraries} + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Beginning Student} + +@defmodule[lang/htdp-beginner] + +The @schememodname[lang/htdp-beginner] module provides the Beginning +Student language for @|htdp|; see @htdp-ref["beginner"]. + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Beginning Student with Abbreviations} + +@defmodule[lang/htdp-beginner-abbr] + +The @schememodname[lang/htdp-beginner-abbr] module provides the +Beginning Student with Abbreviations language for @|htdp|; see +@htdp-ref["beginner-abbr"]. + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Intermediate Student} + +@defmodule[lang/htdp-intermediate] + +The @schememodname[lang/htdp-intermediate] module provides the +Intermediate Student language for @|htdp|; see +@htdp-ref["intermediate"]. + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Intermediate Student with Lambda} + +@defmodule[lang/htdp-intermediate-lam] + +The @schememodname[lang/htdp-intermediate-lam] module provides the +Intermediate Student with Lambda language for @|htdp|; see +@htdp-ref["intermediate-lam"]. + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Advanced Student} + +@defmodule[lang/htdp-advanced] + +The @schememodname[lang/htdp-advanced] module provides the Advanced +Student language for @|htdp|; see @htdp-ref["advanced"]. + +@; ------------------------------------------------------------ +@section{Pretty Big Text (Legacy Language)} + +@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], +@schememodname[mzlib/etc], @schememodname[mzlib/file], +@schememodname[mzlib/list], @schememodname[mzlib/class], +@schememodname[mzlib/unit], @schememodname[mzlib/include], +@schememodname[mzlib/defmacro], @schememodname[mzlib/pretty], +@schememodname[mzlib/string], @schememodname[mzlib/thread], +@schememodname[mzlib/math], @schememodname[mzlib/match], +@schememodname[mzlib/shared], and @schememodname[lang/posn]. + +@; ------------------------------------------------------------ + +@section{Pretty Big (Legacy Language)} + +@defmodule[lang/plt-pretty-big] + +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. + +@; ---------------------------------------------------------------------- + +@section{@scheme[posn]s in @italic{HtDP} Languages} + +@defmodule[lang/posn] + +@defstruct[posn ([x any/c] [y any/c])]{ + +The @scheme[posn] structure type that is also provided by +@scheme[lang/htdp-beginner].} + + +@; ---------------------------------------------------------------------- + +@section{Image Equality in @italic{HtDP} Languages} + +@defmodule[lang/imageeq] + +@defproc[(image=? [i1 (is-a?/c image-snip%)] + [i2 (is-a?/c image-snip%)]) + boolean?]{ + +The image-comparison operator that is also provided by +@scheme[lang/htdp-beginner].} + +@; ---------------------------------------------------------------------- + +@section{Higher-order Primitives in @italic{HtDP} Beginner} + +@defmodule[lang/prim] + +The @schememodname[lang/prim] module defines two syntactic forms for +use by the implementors of teachpacks, which the teachpack is to be +used with the @|htdp| Beginner Student +languages. In Beginner Student, primitive names (for built-in +procedures) are distinguished from other types of expressions, so that +they can be syntactically restricted to application positions. + +@defform[(define-higher-order-primitive id proc-id (arg ...))]{ + + Defines @scheme[id] to be a primitive operator whose implementation is + @scheme[proc-id]. Normally, @scheme[id] is exported from the teachpack and + @scheme[proc-id] is not. + + For each non-procedure argument, the corresponding @scheme[arg] should be + an underscore. For each procedure argument, the corresponding @scheme[arg] + should be the usual name of the procedure. + + @as-examples[ + @schemeblock[ + (define-higher-order-primitive convert-gui convert-gui/proc (f2c)) + ]] +} + +@defform[(provide-higher-order-procedure id (arg ...))]{ + + Like @scheme[define-higher-order-primitive], but the function + @scheme[id] is exported as the primitive operator named + @scheme[id].} + +@defform[(define-primitive id proc-id)]{ + + Defines @scheme[id] to be a primitive operator whose implementation + is @scheme[proc-id], and that takes no procedures as + arguments. Normally, @scheme[id] is exported from the teachpack and + @scheme[proc-id] is not.} + +@defform[(provide-primitive id)]{ + + Like @scheme[define-primitive], but the function @scheme[id] is + exported as the primitive operator named @scheme[id].} + +@defform[(provide-primitives id ...)]{ + + Multiple-identifier version of @scheme[provide-primitive].} + diff --git a/collects/lang/info.ss b/collects/lang/info.ss index b57188de00..1a57d67828 100644 --- a/collects/lang/info.ss +++ b/collects/lang/info.ss @@ -14,3 +14,5 @@ (string-constant teaching-languages) (string-constant how-to-design-programs) (string-constant beginning-student)))) + +(define scribblings '(("htdp-lib.scrbl"))) diff --git a/collects/scribblings/htdp-langs/advanced.scrbl b/collects/scribblings/htdp-langs/advanced.scrbl index f33dda6364..feb0a2c94d 100644 --- a/collects/scribblings/htdp-langs/advanced.scrbl +++ b/collects/scribblings/htdp-langs/advanced.scrbl @@ -31,7 +31,7 @@ @(bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) -@title[#:style 'toc]{Advanced Student} +@title[#:style 'toc #:tag "advanced"]{Advanced Student} @declare-exporting[lang/htdp-advanced] diff --git a/collects/scribblings/htdp-langs/beginner-abbr.scrbl b/collects/scribblings/htdp-langs/beginner-abbr.scrbl index 8e2c744a63..247fec0306 100644 --- a/collects/scribblings/htdp-langs/beginner-abbr.scrbl +++ b/collects/scribblings/htdp-langs/beginner-abbr.scrbl @@ -18,7 +18,7 @@ @(bd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) -@title[#:style 'toc]{Beginning Student with List Abbreviations} +@title[#:style 'toc #:tag "beginner-abbr"]{Beginning Student with List Abbreviations} @declare-exporting[lang/htdp-beginner-abbr] diff --git a/collects/scribblings/htdp-langs/beginner.scrbl b/collects/scribblings/htdp-langs/beginner.scrbl index 6ae613e072..a1e31b9136 100644 --- a/collects/scribblings/htdp-langs/beginner.scrbl +++ b/collects/scribblings/htdp-langs/beginner.scrbl @@ -5,7 +5,7 @@ (for-label lang/htdp-beginner)) -@title[#:style 'toc]{Beginning Student} +@title[#:style 'toc #:tag "beginner"]{Beginning Student} @declare-exporting[lang/htdp-beginner] diff --git a/collects/scribblings/htdp-langs/intermediate-lambda.scrbl b/collects/scribblings/htdp-langs/intermediate-lambda.scrbl index cbdac2e819..e2a32ea467 100644 --- a/collects/scribblings/htdp-langs/intermediate-lambda.scrbl +++ b/collects/scribblings/htdp-langs/intermediate-lambda.scrbl @@ -30,7 +30,7 @@ @(bbd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) -@title[#:style 'toc]{Intermediate Student with Lambda} +@title[#:style 'toc #:tag "intermediate-lam"]{Intermediate Student with Lambda} @declare-exporting[lang/htdp-intermediate-lambda] diff --git a/collects/scribblings/htdp-langs/intermediate.scrbl b/collects/scribblings/htdp-langs/intermediate.scrbl index a0773e3b99..80ffda0bd7 100644 --- a/collects/scribblings/htdp-langs/intermediate.scrbl +++ b/collects/scribblings/htdp-langs/intermediate.scrbl @@ -17,7 +17,7 @@ (define beg-require (scheme require)))) @(bd beg-define beg-define-struct beg-cond beg-if beg-and beg-or beg-check-expect beg-require) -@title[#:style 'toc]{Intermediate Student} +@title[#:style 'toc #:tag "intermediate"]{Intermediate Student} @declare-exporting[lang/htdp-intermediate] diff --git a/collects/scribblings/setup-plt/setup-plt.scrbl b/collects/scribblings/setup-plt/setup-plt.scrbl index c359454d4f..bec77d183b 100644 --- a/collects/scribblings/setup-plt/setup-plt.scrbl +++ b/collects/scribblings/setup-plt/setup-plt.scrbl @@ -243,7 +243,7 @@ Optional @filepath{info.ss} fields trigger additional actions by manuals with the same sorting position are ordered alphabetically. For a pair of manuals with sorting numbers @scheme[_n] and @scheme[_m], the groups for the manuals are - separated by space or a label if @scheme[(truncate (/ _n 10))]and + separated by space if @scheme[(truncate (/ _n 10))]and @scheme[(truncate (/ _m 10))] are different.} @item{@scheme[mzscheme-launcher-names] : @scheme[(listof string?)]