]> gitweb.factorcode.org Git - factor.git/commitdiff
Update docs for GENERIC: GENERIC# and HOOK to show stack effect decl
authorNicholas Seckar <nseckar@gmail.com>
Mon, 9 Feb 2009 07:45:59 +0000 (23:45 -0800)
committerNicholas Seckar <nseckar@gmail.com>
Mon, 9 Feb 2009 07:45:59 +0000 (23:45 -0800)
core/syntax/syntax-docs.factor

index e08821bddd5a1a4ceec45e194fffde8a0c6ce9e6..035622454f62d7127218a470dafe0e0d220c8016 100644 (file)
@@ -551,12 +551,12 @@ HELP: BIN:
 { $examples { $example "USE: prettyprint" "BIN: 100 ." "4" } } ;
 
 HELP: GENERIC:
-{ $syntax "GENERIC: word" }
+{ $syntax "GENERIC: word" "GENERIC: word ( stack -- effect )" }
 { $values { "word" "a new word to define" } }
 { $description "Defines a new generic word in the current vocabulary. Initially, it contains no methods, and thus will throw a " { $link no-method } " error when called." } ;
 
 HELP: GENERIC#
-{ $syntax "GENERIC# word n" }
+{ $syntax "GENERIC# word n" "GENERIC# word n ( stack -- effect )" }
 { $values { "word" "a new word to define" } { "n" "the stack position to dispatch on" } }
 { $description "Defines a new generic word which dispatches on the " { $snippet "n" } "th most element from the top of the stack in the current vocabulary. Initially, it contains no methods, and thus will throw a " { $link no-method } " error when called." }
 { $notes
@@ -571,7 +571,7 @@ HELP: MATH:
 { $description "Defines a new generic word which uses the " { $link math-combination } " method combination." } ;
 
 HELP: HOOK:
-{ $syntax "HOOK: word variable" }
+{ $syntax "HOOK: word variable" "HOOK: word variable ( stack -- effect ) " }
 { $values { "word" "a new word to define" } { "variable" word } }
 { $description "Defines a new hook word in the current vocabulary. Hook words are generic words which dispatch on the value of a variable, so methods are defined with " { $link POSTPONE: M: } ". Hook words differ from other generic words in that the dispatch value is removed from the stack before the chosen method is called." }
 { $examples