]> gitweb.factorcode.org Git - factor.git/commitdiff
help-lint fixes for recent changes
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 7 Dec 2011 20:26:35 +0000 (12:26 -0800)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 7 Dec 2011 20:26:35 +0000 (12:26 -0800)
basis/combinators/smart/smart-docs.factor
basis/combinators/smart/smart.factor
basis/generalizations/generalizations-docs.factor
basis/help/handbook/handbook.factor
basis/math/vectors/vectors-docs.factor
basis/tools/profiler/sampling/sampling-docs.factor

index bc7b88a0fc5753ea9b311ee82b0a89edc191a287..729adc49d7cae5106ac9f69352a4107a988ee663 100644 (file)
@@ -1,13 +1,13 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: classes.tuple help.markup help.syntax kernel math
-quotations sequences stack-checker ;
+quotations sequences stack-checker arrays ;
 IN: combinators.smart
 
 HELP: input<sequence
 { $values
-     { "quot" quotation }
-     { "newquot" quotation }
+    { "seq" sequence }
+    { "quot" quotation }
 }
 { $description "Infers the number of inputs, " { $snippet "n" } ", to " { $snippet "quot" } " and calls the " { $snippet "quot" } " with the first " { $snippet "n" } " values from a sequence." }
 { $examples
@@ -20,8 +20,8 @@ HELP: input<sequence
 
 HELP: output>array
 { $values
-     { "quot" quotation }
-     { "newquot" quotation }
+    { "quot" quotation }
+    { "array" array }
 }
 { $description "Infers the number of outputs from the quotation and constructs an array from those outputs." }
 { $examples
@@ -36,8 +36,8 @@ HELP: output>array
 
 HELP: output>sequence
 { $values
-     { "quot" quotation } { "exemplar" "an exemplar" }
-     { "newquot" quotation }
+    { "quot" quotation } { "exemplar" "an exemplar" }
+    { "seq" sequence }
 }
 { $description "Infers the number of outputs from the quotation and constructs a new sequence from those objects of the same type as the exemplar." }
 { $examples
@@ -50,8 +50,7 @@ HELP: output>sequence
 
 HELP: reduce-outputs
 { $values
-     { "quot" quotation } { "operation" quotation }
-     { "newquot" quotation }
+    { "quot" quotation } { "operation" quotation }
 }
 { $description "Infers the number of outputs from " { $snippet "quot" } " and reduces them using " { $snippet "operation" } ". The identity for the " { $link reduce } " operation is the first output." }
 { $examples
@@ -64,8 +63,8 @@ HELP: reduce-outputs
 
 HELP: sum-outputs
 { $values
-     { "quot" quotation }
-     { "n" integer }
+    { "quot" quotation }
+    { "n" integer }
 }
 { $description "Infers the number of outputs from " { $snippet "quot" } " and returns their sum." }
 { $examples
@@ -78,8 +77,8 @@ HELP: sum-outputs
 
 HELP: append-outputs
 { $values
-     { "quot" quotation }
-     { "seq" sequence }
+    { "quot" quotation }
+    { "seq" sequence }
 }
 { $description "Infers the number of outputs from " { $snippet "quot" } " and returns a sequence of the outputs appended." }
 { $examples
@@ -92,8 +91,8 @@ HELP: append-outputs
 
 HELP: append-outputs-as
 { $values
-     { "quot" quotation } { "exemplar" sequence }
-     { "seq" sequence }
+    { "quot" quotation } { "exemplar" sequence }
+    { "seq" sequence }
 }
 { $description "Infers the number of outputs from " { $snippet "quot" } " and returns a sequence of type " { $snippet "exemplar" } " of the outputs appended." }
 { $examples
@@ -119,7 +118,7 @@ HELP: keep-inputs
 HELP: dropping
 { $values
     { "quot" quotation }
-    { "quot" quotation }
+    { "quot'" quotation }
 }
 { $description "Outputs a quotation that, when called, will have the effect of dropping the number of inputs to the original quotation." }
 { $examples
@@ -132,7 +131,7 @@ HELP: dropping
 
 HELP: input<sequence-unsafe
 { $values
-    { "quot" quotation }
+    { "seq" sequence }
     { "quot" quotation }
 }
 { $description "An unsafe version of " { $link input<sequence-unsafe } "." } ;
@@ -140,7 +139,6 @@ HELP: input<sequence-unsafe
 HELP: map-reduce-outputs
 { $values
     { "quot" quotation } { "mapper" quotation } { "reducer" quotation }
-    { "quot" quotation }
 }
 { $description "Infers the number of outputs from " { $snippet "quot" } " and, treating those outputs as a sequence, calls " { $link map-reduce } " on them." }
 { $examples
@@ -154,7 +152,6 @@ HELP: map-reduce-outputs
 HELP: nullary
 { $values
     { "quot" quotation }
-    { "quot" quotation }
 }
 { $description "Infers the number of inputs to a quotation and drops them from the stack." }
 { $examples
@@ -167,7 +164,6 @@ HELP: nullary
 HELP: preserving
 { $values
     { "quot" quotation }
-    { "quot" quotation }
 }
 { $description "Calls a quotation and leaves any consumed inputs on the stack beneath the quotation's outputs." }
 { $examples
@@ -183,7 +179,6 @@ HELP: preserving
 HELP: smart-apply
 { $values
     { "quot" quotation } { "n" integer }
-    { "quot" quotation }
 }
 { $description "Applies a quotation to the datastack " { $snippet "n" } " times, starting lower on the stack and working up in increments of the number of inferred inputs to the quotation." }
 { $examples
@@ -198,42 +193,36 @@ HELP: smart-apply
 HELP: smart-if
 { $values
     { "pred" quotation } { "true" quotation } { "false" quotation }
-    { "quot" quotation }
 }
 { $description "A version of " { $link if } " that takes three quotations, where the first quotation is a predicate that preserves any inputs it consumes." } ;
 
 HELP: smart-if*
 { $values
     { "pred" quotation } { "true" quotation } { "false" quotation }
-    { "quot" quotation }
 }
 { $description "A version of " { $link if } " that takes three quotations, where the first quotation is a predicate that preserves any inputs it consumes, the second is the " { $snippet "true" } " branch, and the third is the " { $snippet "false" } " branch. If the " { $snippet "true" }  " branch is taken, the values are left on the stack and the quotation is called. If the " { $snippet "false" } " branch is taken, the number of inputs inferred from predicate quotation is dropped and the quotation is called." } ;
 
 HELP: smart-unless
 { $values
     { "pred" quotation } { "false" quotation }
-    { "quot" quotation }
 }
 { $description "A version of " { $link unless } " that takes two quotations, where the first quotation is a predicate that preserves any inputs it consumes and the second is the " { $snippet "false" } " branch." } ;
 
 HELP: smart-unless*
 { $values
     { "pred" quotation } { "false" quotation }
-    { "quot" quotation }
 }
 { $description "A version of " { $link unless } " that takes two quotations, where the first quotation is a predicate that preserves any inputs it consumes and the second is the " { $snippet "false" } " branch. If the " { $snippet "true" }  " branch is taken, the values are left on the stack. If the " { $snippet "false" } " branch is taken, the number of inputs inferred from predicate quotation is dropped and the quotation is called." } ;
 
 HELP: smart-when
 { $values
     { "pred" quotation } { "true" quotation }
-    { "quot" quotation }
 }
 { $description "A version of " { $link when } " that takes two quotations, where the first quotation is a predicate that preserves any inputs it consumes and the second is the " { $snippet "true" } " branch." } ;
 
 HELP: smart-when*
 { $values
     { "pred" quotation } { "true" quotation }
-    { "quot" quotation }
 }
 { $description "A version of " { $link when } " that takes two quotations, where the first quotation is a predicate that preserves any inputs it consumes and the second is the " { $snippet "true" } " branch. If the " { $snippet "true" }  " branch is taken, the values are left on the stack and the quotation is called. If the " { $snippet "false" } " branch is taken, the number of inputs inferred from predicate quotation is dropped." } ;
 
index 8e50ed8ef74bb9adaeb9ddc1e8a6650535f637b8..bf88b2e6b25baecbded93433e58028fc721e09f4 100644 (file)
@@ -75,7 +75,7 @@ M: object infer-known* drop f ;
 : reduce-outputs ( quot operation -- )
     [ [ call ] [ [ drop ] compose outputs ] bi ] dip swap call-n ; inline
 
-: sum-outputs ( quot -- obj )
+: sum-outputs ( quot -- n )
     [ + ] reduce-outputs ; inline
 
 : map-outputs ( quot mapper -- )
index dee69e3cbd0a076ad5a6146b7054d98173634210..ea579aa83a8ddfb70da5f720b14ddd422869b5e7 100644 (file)
@@ -157,7 +157,7 @@ HELP: nkeep
 } ;\r
 \r
 HELP: ncurry\r
-{ $values { "quot" quotation } { "n" integer } }\r
+{ $values { "n" integer } }\r
 { $description "A generalization of " { $link curry } " that can work for any stack depth."\r
 } \r
 { $examples\r
@@ -170,7 +170,7 @@ HELP: ncurry
 } ;\r
 \r
 HELP: nwith\r
-{ $values { "quot" quotation } { "n" integer } }\r
+{ $values { "n" integer } }\r
 { $description "A generalization of " { $link with } " that can work for any stack depth."\r
 } \r
 { $examples\r
index 3964e34d94f8ca3a1983fdb067f3c9acca723b12..0ffdc7c652be535e81c2caa04b4665ee54192000 100644 (file)
@@ -288,7 +288,6 @@ ARTICLE: "handbook-language-reference" "The language"
     "locals"
     "namespaces"
     "namespaces-global"
-    "values"
 }
 { $heading "Abstractions" }
 { $subsections
index 12707a696f610630617d262d24e18e96f7ad58d7..edc76c1192e892e45a9348211a60c49f08927ecb 100644 (file)
@@ -441,12 +441,7 @@ HELP: vshuffle
         "int-4{ 0x11223344 0x11223344 0x11223344 0x11223344 }"
         "4 endian-swap vshuffle"
         "16 number-base [ . ] with-variable"
-        """int-4{
-    0x44332211
-    0x44332211
-    0x44332211
-    0x44332211
-}"""
+        "int-4{ 0x44332211 0x44332211 0x44332211 0x44332211 }"
     }
 } ;
 
index 5fa9cc3921f8deb0e37ee2bdf40f386ab4eb69e8..1a0a93788e5c8dbab76cd5e080ce5dedb9b8dec2 100644 (file)
@@ -145,9 +145,9 @@ HELP: samples-per-second
 HELP: samples>time
 { $values
     { "samples" integer }
-    { "time" duration }
+    { "seconds" integer }
 }
-{ $description "Converts a sample interval count to a " { $link duration } " based on the value of " { $link samples-per-second } "." } ;
+{ $description "Converts a sample interval count to an integer based on the value of " { $link samples-per-second } "." } ;
 
 HELP: top-down
 { $values