Documentation updates

db4
Slava Pestov 2008-04-04 19:40:08 -05:00
parent 979d0b7dfe
commit d046c3b614
5 changed files with 11 additions and 10 deletions

View File

@ -13,9 +13,9 @@ HELP: builtin-class
{ $class-description "The class of built-in classes." }
{ $examples
"The class of arrays is a built-in class:"
{ $example "USING: arrays classes prettyprint ;" "array builtin-class? ." "t" }
{ $example "USING: arrays classes.builtin prettyprint ;" "array builtin-class? ." "t" }
"However, an instance of the array class is not a built-in class; it is not even a class:"
{ $example "USING: classes prettyprint ;" "{ 1 2 3 } builtin-class? ." "f" }
{ $example "USING: classes.builtin prettyprint ;" "{ 1 2 3 } builtin-class? ." "f" }
} ;
HELP: builtins

View File

@ -296,7 +296,7 @@ HELP: tuple-slots
{ tuple-slots tuple>array } related-words
HELP: define-tuple-slots
{ $values { "class" tuple-class } { "slots" "a sequence of strings" } }
{ $values { "class" tuple-class } }
{ $description "Defines slot accessor and mutator words for the tuple." }
$low-level-note ;

View File

@ -40,7 +40,7 @@ PRIVATE>
>r copy-tuple-slots r>
layout-class prefix ;
: tuple-slots ( tuple -- array )
: tuple-slots ( tuple -- seq )
prepare-tuple>array drop copy-tuple-slots ;
: slots>tuple ( tuple class -- array )
@ -48,7 +48,7 @@ PRIVATE>
[ tuple-size ] [ [ set-array-nth ] curry ] bi 2each
] keep ;
: >tuple ( tuple -- array )
: >tuple ( tuple -- seq )
unclip slots>tuple ;
: slot-names ( class -- seq )

View File

@ -1,7 +1,7 @@
USING: help.markup help.syntax kernel sequences words
math strings vectors quotations generic effects classes
vocabs.loader definitions io vocabs source-files
quotations namespaces compiler.units ;
quotations namespaces compiler.units assocs ;
IN: parser
ARTICLE: "vocabulary-search-shadow" "Shadowing word names"
@ -446,8 +446,8 @@ HELP: eval
{ $errors "Throws an error if the input is malformed, or if the evaluation itself throws an error." } ;
HELP: filter-moved
{ $values { "assoc" "an assoc where the keys are definitions" } { "newassoc" "an assoc where the keys are definitions" } }
{ $description "Removes all definitions from the assoc which are no longer present in the current " { $link file } "." } ;
{ $values { "assoc1" assoc } { "assoc2" assoc } { "seq" "an seqence of definitions" } }
{ $description "Removes all definitions from " { $snippet "assoc2" } " which are in " { $snippet "assoc1" } " or are are no longer present in the current " { $link file } "." } ;
HELP: forget-smudged
{ $description "Forgets removed definitions and prints a warning message if any of them are still referenced from other source files." } ;

View File

@ -1,6 +1,7 @@
USING: prettyprint io kernel help.markup help.syntax
prettyprint.sections prettyprint.config words hashtables math
prettyprint.config words hashtables math
strings definitions ;
IN: prettyprint.sections
HELP: position
{ $var-description "The prettyprinter's current character position." } ;
@ -78,7 +79,7 @@ HELP: section
} } ;
HELP: construct-section
{ $values { "style" hashtable } { "length" integer } { "section" section } }
{ $values { "length" integer } { "class" "a subclass of " { $link section } } { "section" section } }
{ $description "Creates a new section with the given length starting from " { $link position } ", advancing " { $link position } "." } ;
HELP: <indent