Bootstrap fix
parent
9ec1911625
commit
0670633393
|
@ -203,17 +203,3 @@ HELP: define-class
|
||||||
{ $values { "word" word } { "members" "a sequence of class words" } { "superclass" class } { "metaclass" 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 } "." }
|
{ $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 ;
|
$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? } "." } ;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: help.markup help.crossref help.topics help.syntax
|
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
|
IN: help
|
||||||
|
|
||||||
ARTICLE: "printing-elements" "Printing markup elements"
|
ARTICLE: "printing-elements" "Printing markup elements"
|
||||||
|
@ -156,3 +156,7 @@ HELP: sort-articles
|
||||||
{ $description "Sorts a sequence of help topics." } ;
|
{ $description "Sorts a sequence of help topics." } ;
|
||||||
|
|
||||||
{ article-children article-parent xref-help } related-words
|
{ 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? } "." } ;
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: arrays io kernel namespaces parser prettyprint sequences
|
||||||
words assocs definitions generic quotations effects
|
words assocs definitions generic quotations effects
|
||||||
slots continuations tuples debugger combinators
|
slots continuations tuples debugger combinators
|
||||||
vocabs help.stylesheet help.topics help.crossref help.markup
|
vocabs help.stylesheet help.topics help.crossref help.markup
|
||||||
sorting ;
|
sorting classes ;
|
||||||
IN: help
|
IN: help
|
||||||
|
|
||||||
GENERIC: word-help* ( word -- content )
|
GENERIC: word-help* ( word -- content )
|
||||||
|
@ -15,12 +15,22 @@ GENERIC: word-help* ( word -- content )
|
||||||
[ swap 2array 1array ] [ 2drop f ] if
|
[ swap 2array 1array ] [ 2drop f ] if
|
||||||
] ?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: word word-help* drop f ;
|
||||||
|
|
||||||
M: slot-reader word-help* drop \ $slot-reader ;
|
M: slot-reader word-help* drop \ $slot-reader ;
|
||||||
|
|
||||||
M: slot-writer word-help* drop \ $slot-writer ;
|
M: slot-writer word-help* drop \ $slot-writer ;
|
||||||
|
|
||||||
|
M: predicate word-help* drop \ $predicate ;
|
||||||
|
|
||||||
: all-articles ( -- seq )
|
: all-articles ( -- seq )
|
||||||
articles get keys
|
articles get keys
|
||||||
all-words [ word-help ] subset append ;
|
all-words [ word-help ] subset append ;
|
||||||
|
|
Loading…
Reference in New Issue