bootstrap fix

cvs
Slava Pestov 2006-01-02 06:04:02 +00:00
parent 808c7a7f57
commit d75d86a781
7 changed files with 29 additions and 14 deletions

View File

@ -196,7 +196,9 @@ vectors words ;
"/library/help/commands.factor"
"/library/help/syntax.factor"
"/library/help/tutorial.factor"
"/library/help/collections.facts"
"/library/help/sequences.facts"
"/library/help/tutorial.facts"
"/library/collections/growable.facts"
"/library/collections/arrays.facts"

View File

@ -87,17 +87,10 @@ HELP: n> "( -- ns )"
{ $values { "ns" "a hashtable" } }
{ $description "Pops a namespace from the namestack." } ;
ARTICLE: "sequences-make" "Constructing sequences using an accumulator"
"The library supports an idiom where sequences can be constructed without passing the partial sequence being built on the stack. This reduces stack noise, and thus simplifies code and makes it easier to understand."
{ $subsection make }
{ $subsection , }
{ $subsection ?, }
{ $subsection % }
{ $subsection # } ;
HELP: make "( quot exemplar -- seq )"
{ $values { "quot" "a quotation" } { "exemplar" "a sequence" } }
{ $description "Calls the quotation in a new " { $emphasis "dynamic scope" } ". The quotation and any words it calls can execute the " { $link , } " and " { $link % } " words to accumulate elements. When the quotation returns, all accumulated elements are collected into a sequence with the same type as " { $snippet "exemplar" } "." } ;
{ $description "Calls the quotation in a new " { $emphasis "dynamic scope" } ". The quotation and any words it calls can execute the " { $link , } " and " { $link % } " words to accumulate elements. When the quotation returns, all accumulated elements are collected into a sequence with the same type as " { $snippet "exemplar" } "." }
{ $examples { $example "[ 1 , 2 , 3 , ] { } make ." "{ 1 2 3 }" } } ;
HELP: , "( elt -- )"
{ $values { "elt" "an object" } }

View File

@ -100,9 +100,13 @@ $terpri
"The " { $snippet "get" } " and " { $snippet "set" } " words read and write variable values. The " { $snippet "get" } " word searches up the chain of nested namespaces, while " { $snippet "set" } " always sets variable values in the current namespace only. Namespaces are dynamically scoped; when a quotation is called from a nested scope, any words called by the quotation also execute in that scope."
{ $subsection get }
{ $subsection set }
"Various utility words abstract away common variable access patterns:"
{ $subsection "namespaces-change" }
{ $subsection "namespaces-combinators" }
{ $subsection "namespaces-utilities" }
"A useful facility for constructing sequences by holding an accumulator sequence in a variable:"
{ $subsection "namespaces-make" }
"Implementation details your code probably does not care about:"
{ $subsection "namespaces-internals" } ;
ARTICLE: "namespaces-combinators" "Namespace combinators"
@ -123,6 +127,13 @@ ARTICLE: "namespaces-utilities" "Namespace utilities"
{ $subsection global }
{ $subsection set-global } ;
ARTICLE: "namespaces-make" "Constructing sequences"
"There is a lexicon of words for constructing sequences without passing the partial sequence being built on the stack. This reduces stack noise."
{ $subsection make }
{ $subsection , }
{ $subsection % }
{ $subsection # } ;
ARTICLE: "namespaces-internals" "Namespace implementation details"
"The namestack holds namespaces."
{ $subsection namestack* }

View File

@ -92,8 +92,11 @@ M: simple-element print-element [ print-element ] each ;
: $examples ( content -- )
"Examples" $subheading print-element ;
: textual-list ( seq quot -- )
[ "," format* bl ] interleave ; inline
: $see-also ( content -- )
"See also" $subheading [ pprint bl ] each ;
"See also" $subheading [ 1array $link ] textual-list ;
: $see ( content -- )
terpri*
@ -102,7 +105,9 @@ M: simple-element print-element [ print-element ] each ;
: $example ( content -- )
first2 swap dup <input>
[ " " format* format* format* ] ($code) ;
[
input-style [ format* ] with-style terpri format*
] ($code) ;
! Some links
TUPLE: link name ;
@ -154,7 +159,7 @@ DEFER: help
: $side-effects ( content -- )
"Side effects" $subheading "Modifies " print-element
[ $snippet ] [ "," format* bl ] interleave ;
[ $snippet ] textual-list ;
: $notes ( content -- )
"Notes" $subheading print-element ;

View File

@ -25,7 +25,8 @@ $terpri
{ $subsection "sequences-comparing" }
"Some implementation details which your code should probably not care about:"
{ $subsection "sequences-unsafe" }
{ $subsection "sequences-growable" } ;
{ $subsection "sequences-growable" }
{ $see-also "namespaces-make" } ;
ARTICLE: "sequence-implementations" "Sequence implementations"
"There are two main categories of sequences. Concrete sequences are backed by actual storage:"

View File

@ -32,6 +32,9 @@ USING: styles ;
{ wrap-margin f }
} ;
: input-style
H{ { font-style bold } } ;
: url-style
H{
{ font "Monospaced" }