Bootstrap fix

release
Slava Pestov 2007-12-12 00:32:35 -05:00
parent 9ec1911625
commit 0670633393
3 changed files with 16 additions and 16 deletions

View File

@ -203,17 +203,3 @@ HELP: define-class
{ $values { "word" word } { "members" "a sequence of class words" } { "superclass" class } { "metaclass" class } }
{ $description "Sets a property indicating this word is a class word, thus making it an instance of " { $link class } ", and registers it with " { $link typemap } " and " { $link class<map } "." }
$low-level-note ;
: $predicate ( element -- )
{ { "object" object } { "?" "a boolean" } } $values
[
"Tests if the object is an instance of the " ,
first "predicating" word-prop \ $link swap 2array ,
" class." ,
] { } make $description ;
M: predicate word-help* drop \ $predicate ;
HELP: $predicate
{ $values { "element" "a markup element of the form " { $snippet "{ word }" } } }
{ $description "Prints the boilerplate description of a class membership predicate word such as " { $link array? } " or " { $link integer? } "." } ;

View File

@ -1,5 +1,5 @@
USING: help.markup help.crossref help.topics help.syntax
definitions io prettyprint inspector help.lint ;
definitions io prettyprint inspector help.lint arrays math ;
IN: help
ARTICLE: "printing-elements" "Printing markup elements"
@ -156,3 +156,7 @@ HELP: sort-articles
{ $description "Sorts a sequence of help topics." } ;
{ article-children article-parent xref-help } related-words
HELP: $predicate
{ $values { "element" "a markup element of the form " { $snippet "{ word }" } } }
{ $description "Prints the boilerplate description of a class membership predicate word such as " { $link array? } " or " { $link integer? } "." } ;

View File

@ -4,7 +4,7 @@ USING: arrays io kernel namespaces parser prettyprint sequences
words assocs definitions generic quotations effects
slots continuations tuples debugger combinators
vocabs help.stylesheet help.topics help.crossref help.markup
sorting ;
sorting classes ;
IN: help
GENERIC: word-help* ( word -- content )
@ -15,12 +15,22 @@ GENERIC: word-help* ( word -- content )
[ swap 2array 1array ] [ 2drop f ] if
] ?if ;
: $predicate ( element -- )
{ { "object" object } { "?" "a boolean" } } $values
[
"Tests if the object is an instance of the " ,
first "predicating" word-prop \ $link swap 2array ,
" class." ,
] { } make $description ;
M: word word-help* drop f ;
M: slot-reader word-help* drop \ $slot-reader ;
M: slot-writer word-help* drop \ $slot-writer ;
M: predicate word-help* drop \ $predicate ;
: all-articles ( -- seq )
articles get keys
all-words [ word-help ] subset append ;