]> gitweb.factorcode.org Git - factor.git/commitdiff
core: update some help $value types.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 23 May 2014 21:24:04 +0000 (14:24 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 23 May 2014 21:24:04 +0000 (14:24 -0700)
13 files changed:
core/arrays/arrays-docs.factor
core/byte-arrays/byte-arrays-docs.factor
core/byte-vectors/byte-vectors-docs.factor
core/checksums/checksums-docs.factor
core/generic/math/math-docs.factor
core/generic/single/single-docs.factor
core/memory/memory-docs.factor
core/quotations/quotations-docs.factor
core/sequences/sequences-docs.factor
core/sorting/sorting-docs.factor
core/splitting/splitting-docs.factor
core/syntax/syntax-docs.factor
core/vectors/vectors-docs.factor

index 5cdfcd3a80ff4897054b04f5d2f4ae0265c3ed46..d71649ef6c989d89c869a45a2eb7aca2f71f323f 100644 (file)
@@ -50,7 +50,7 @@ HELP: <array>
 { $description "Creates a new array with the given length and all elements initially set to " { $snippet "elt" } "." } ;
 
 HELP: >array
-{ $values { "seq" "a sequence" } { "array" array } }
+{ $values { "seq" sequence } { "array" array } }
 { $description "Outputs a freshly-allocated array with the same elements as a given sequence." } ;
 
 HELP: 1array
index 1d8fa45b900257dc95e2975efa6b39918e833139..eeb0832af8597c3f8fa72896fb608283a5c60563 100644 (file)
@@ -1,4 +1,4 @@
-USING: kernel help.markup help.syntax ;
+USING: kernel help.markup help.syntax sequences ;
 IN: byte-arrays
 
 ARTICLE: "byte-arrays" "Byte arrays"
@@ -39,7 +39,7 @@ HELP: (byte-array)
 { $description "Creates a new byte array with unspecified contents of length " { $snippet "n" } " bytes." } ;
 
 HELP: >byte-array
-{ $values { "seq" "a sequence" } { "byte-array" byte-array } }
+{ $values { "seq" sequence } { "byte-array" byte-array } }
 { $description "Outputs a freshly-allocated byte array whose elements have the same signed byte values as a given sequence." }
 { $errors "Throws an error if the sequence contains elements other than integers." } ;
 
index f8ea6c732e07d39bf56ac8152711a6695aa3d509..79c73c86ef3ee3b735431c7fce6446d2b257d4d8 100644 (file)
@@ -1,4 +1,4 @@
-USING: arrays byte-arrays help.markup help.syntax kernel combinators ;\r
+USING: help.markup help.syntax sequences ;\r
 IN: byte-vectors\r
 \r
 ARTICLE: "byte-vectors" "Byte vectors"\r
@@ -29,7 +29,7 @@ HELP: <byte-vector>
 { $description "Creates a new byte vector that can hold " { $snippet "n" } " bytes before resizing." } ;\r
 \r
 HELP: >byte-vector\r
-{ $values { "seq" "a sequence" } { "byte-vector" byte-vector } }\r
+{ $values { "seq" sequence } { "byte-vector" byte-vector } }\r
 { $description "Outputs a freshly-allocated byte vector with the same elements as a given sequence." }\r
 { $errors "Throws an error if the sequence contains elements other than integers." } ;\r
 \r
index 498e23f01fb639fc294b2c1f880ae67a7fbec004..b08bd9ec7082be0277fa4b5969a32e7a80ebd1bc 100644 (file)
@@ -1,12 +1,11 @@
-USING: help.markup help.syntax kernel math sequences quotations
-math.private byte-arrays strings ;
+USING: byte-arrays help.markup help.syntax sequences strings ;
 IN: checksums
 
 HELP: checksum
 { $class-description "The class of checksum algorithms." } ;
 
 HELP: hex-string
-{ $values { "seq" "a sequence" } { "str" "a string" } }
+{ $values { "seq" sequence } { "str" string } }
 { $description "Converts a sequence of values from 0-255 to a string of hex numbers from 0-ff." }
 { $examples
     { $example "USING: checksums io ;" "B{ 1 2 3 4 } hex-string print" "01020304" }
index e21e2114d9a0dd63a504c2812861a4a5b0d57f27..ed2339d8de6d17ee4cc7fcec7defd47dc4da9f95 100644 (file)
@@ -19,7 +19,7 @@ HELP: math-upgrade
 { $examples { $example "USING: generic.math math kernel prettyprint ;" "fixnum bignum math-upgrade ." "[ [ >bignum ] dip ]" } } ;
 
 HELP: no-math-method
-{ $values { "left" "an object" } { "right" "an object" } { "generic" generic } }
+{ $values { "left" object } { "right" object } { "generic" generic } }
 { $description "Throws a " { $link no-math-method } " error." }
 { $error-description "Thrown by generic words using the " { $link math-combination } " method combination if there is no suitable method defined for the two inputs." } ;
 
index 8f81be762c03b5139f6c076772c908a9d5625111..382337dcbfb55102db996b6760d39080525eba58 100644 (file)
@@ -1,9 +1,9 @@
-USING: generic help.markup help.syntax sequences math
-math.parser effects ;
+USING: effects generic help.markup help.syntax kernel math
+math.parser sequences ;
 IN: generic.single
 
 HELP: no-method
-{ $values { "object" "an object" } { "generic" "a generic word" } }
+{ $values { "object" object } { "generic" "a generic word" } }
 { $description "Throws a " { $link no-method } " error." }
 { $error-description "Thrown by the " { $snippet "generic" } " word to indicate it does not have a method for the class of " { $snippet "object" } "." } ;
 
@@ -24,4 +24,4 @@ HELP: inconsistent-next-method
     $nl
     "This usually indicates programmer error; if the intention above was to call the string method on the result of " { $link number>string } ", the code should be rewritten as follows:"
     { $code "M: integer error-test number>string error-test ;" }
-} ;
\ No newline at end of file
+} ;
index 3d3e15f953f74a5fcfeacc5703b48d7e2ee5cfd4..39e0e79fe3288e4dfd4938dd58734185e6025b19 100644 (file)
@@ -10,7 +10,7 @@ HELP: gc
 { $description "Performs a full garbage collection." } ;
 
 HELP: size
-{ $values { "obj" "an object" } { "n" "a size in bytes" } }
+{ $values { "obj" object } { "n" "a size in bytes" } }
 { $description "Outputs the size of the object in memory, in bytes. Tagged immediate objects such as fixnums and " { $link f } " will yield a size of 0." } ;
 
 HELP: save-image
index 10f0ac10dc3029e8acc3e82c3050c41032eb9853..edd79846cddbb9e96e2f1c9ee6696469c62cbc74 100644 (file)
@@ -1,5 +1,4 @@
-USING: arrays help.markup help.syntax strings sbufs
-vectors kernel combinators ;
+USING: help.markup help.syntax kernel sequences ;
 IN: quotations
 
 ARTICLE: "quotations" "Quotations"
@@ -49,7 +48,7 @@ HELP: quotation
 { $description "The class of quotations. See " { $link "syntax-quots" } " for syntax and " { $link "quotations" } " for general information." } ;
 
 HELP: >quotation
-{ $values { "seq" "a sequence" } { "quot" quotation } }
+{ $values { "seq" sequence } { "quot" quotation } }
 { $description "Outputs a freshly-allocated quotation with the same elements as a given sequence." } ;
 
 HELP: 1quotation
index d3d9ad047cae70daa26d25bdcc4dbbaf58dad94f..85ea78af839f0509e1c1e5cca74f0c2170c241f9 100644 (file)
@@ -268,18 +268,18 @@ HELP: first4
 { $errors "Throws an error if the sequence has less than four elements." } ;
 
 HELP: array-capacity
-{ $values { "array" "an array" } { "n" "a non-negative fixnum" } }
+{ $values { "array" array } { "n" "a non-negative fixnum" } }
 { $class-description "A predicate class whose instances are valid array sizes for the current architecture. The minimum value is zero and the maximum value is " { $link max-array-capacity } "." }
 { $description "Low-level array length accessor." }
 { $warning "This word is in the " { $vocab-link "sequences.private" } " vocabulary because it is unsafe. It does not check types, so improper use can corrupt memory." } ;
 
 HELP: array-nth
-{ $values { "n" "a non-negative fixnum" } { "array" "an array" } { "elt" object } }
+{ $values { "n" "a non-negative fixnum" } { "array" array } { "elt" object } }
 { $description "Low-level array element accessor." }
 { $warning "This word is in the " { $vocab-link "sequences.private" } " vocabulary because it is unsafe. It does not check types or array bounds, and improper use can corrupt memory. User code must use " { $link nth } " instead." } ;
 
 HELP: set-array-nth
-{ $values { "elt" object } { "n" "a non-negative fixnum" } { "array" "an array" } }
+{ $values { "elt" object } { "n" "a non-negative fixnum" } { "array" array } }
 { $description "Low-level array element mutator." }
 { $warning "This word is in the " { $vocab-link "sequences.private" } " vocabulary because it is unsafe. It does not check types or array bounds, and improper use can corrupt memory. User code must use " { $link set-nth } " instead." } ;
 
@@ -1041,7 +1041,7 @@ HELP: supremum
 { min max supremum infimum } related-words
 
 HELP: produce
-{ $values { "pred" { $quotation ( ..a -- ..b ? ) } } { "quot" { $quotation ( ..b -- ..a obj ) } } { "seq" "a sequence" } }
+{ $values { "pred" { $quotation ( ..a -- ..b ? ) } } { "quot" { $quotation ( ..b -- ..a obj ) } } { "seq" sequence } }
 { $description "Calls " { $snippet "pred" } " repeatedly. If the predicate yields " { $link f } ", stops, otherwise, calls " { $snippet "quot" } " to yield a value. Values are accumulated and returned in a sequence at the end." }
 { $examples
     "The following example divides a number by two until we reach zero, and accumulates intermediate results:"
@@ -1051,7 +1051,7 @@ HELP: produce
 } ;
 
 HELP: produce-as
-{ $values { "pred" { $quotation ( ..a -- ..b ? ) } } { "quot" { $quotation ( ..b -- ..a obj ) } } { "exemplar" sequence } { "seq" "a sequence" } }
+{ $values { "pred" { $quotation ( ..a -- ..b ? ) } } { "quot" { $quotation ( ..b -- ..a obj ) } } { "exemplar" sequence } { "seq" sequence } }
 { $description "Calls " { $snippet "pred" } " repeatedly. If the predicate yields " { $link f } ", stops, otherwise, calls " { $snippet "quot" } " to yield a value. Values are accumulated and returned in a sequence of type " { $snippet "exemplar" } " at the end." }
 { $examples "See " { $link produce } " for examples." } ;
 
index 69a2e33897afeec88cce47b0ab41046b8c92f688..22d17b57d33f27674b962b64ed601b8ecfde1fdf 100644 (file)
@@ -23,24 +23,24 @@ $nl
 ABOUT: "sequences-sorting"
 
 HELP: sort
-{ $values { "seq" "a sequence" } { "quot" { $quotation ( obj1 obj2 -- <=> ) } } { "sortedseq" "a new sorted sequence" } }
+{ $values { "seq" sequence } { "quot" { $quotation ( obj1 obj2 -- <=> ) } } { "sortedseq" "a new sorted sequence" } }
 { $description "Sorts the elements of " { $snippet "seq" } " into a new array using a stable sort." }
 { $notes "The algorithm used is the merge sort." } ;
 
 HELP: sort-with
-{ $values { "seq" "a sequence" } { "quot" { $quotation ( elt -- key ) } } { "sortedseq" "a new sorted sequence" } }
+{ $values { "seq" sequence } { "quot" { $quotation ( elt -- key ) } } { "sortedseq" "a new sorted sequence" } }
 { $description "Sorts the elements of " { $snippet "seq" } " by applying " { $link compare } " with " { $snippet "quot" } " to each pair of elements in the sequence." } ;
 
 HELP: inv-sort-with
-{ $values { "seq" "a sequence" } { "quot" { $quotation ( elt -- key ) } } { "sortedseq" "a new sorted sequence" } }
+{ $values { "seq" sequence } { "quot" { $quotation ( elt -- key ) } } { "sortedseq" "a new sorted sequence" } }
 { $description "Sorts the elements of " { $snippet "seq" } " by applying " { $link compare } " with " { $snippet "quot" } " to each pair of elements in the sequence and inverting the results." } ;
 
 HELP: sort-keys
-{ $values { "obj" "an object" } { "sortedseq" "a new sorted sequence" } }
+{ $values { "obj" object } { "sortedseq" "a new sorted sequence" } }
 { $description "Sorts the elements of " { $snippet "obj" } " (converting to an alist first if not a sequence), comparing first elements of pairs using the " { $link <=> } " word." } ;
 
 HELP: sort-values
-{ $values { "obj" "an object" } { "sortedseq" "a new sorted sequence" } }
+{ $values { "obj" object } { "sortedseq" "a new sorted sequence" } }
 { $description "Sorts the elements of " { $snippet "obj" } " (converting to an alist first if not a sequence), comparing second elements of pairs using the " { $link <=> } " word." } ;
 
 HELP: natural-sort
@@ -52,7 +52,7 @@ HELP: sort-pair
 { $description "If " { $snippet "a" } " is greater than " { $snippet "b" } ", exchanges " { $snippet "a" } " with " { $snippet "b" } "." } ;
 
 HELP: midpoint@
-{ $values { "seq" "a sequence" } { "n" integer } }
+{ $values { "seq" sequence } { "n" integer } }
 { $description "Outputs the index of the midpoint of " { $snippet "seq" } "." } ;
 
 { <=> compare natural-sort sort-with inv-sort-with sort-keys sort-values } related-words
index 2a598883f9c5764c1d8edde97e116b0bf3974a21..d1a2c6fd800e1ed1b47b5fa384ee4a1f6caaf0ce 100644 (file)
@@ -26,59 +26,59 @@ ARTICLE: "sequences-split" "Splitting sequences"
 ABOUT: "sequences-split"
 
 HELP: split1
-{ $values { "seq" "a sequence" } { "subseq" "a sequence" } { "before" "a new sequence" } { "after" "a new sequence" } }
+{ $values { "seq" sequence } { "subseq" sequence } { "before" "a new sequence" } { "after" "a new sequence" } }
 { $description "Splits " { $snippet "seq" } " at the first occurrence of " { $snippet "subseq" } ", and outputs the pieces before and after the split. If " { $snippet "subseq" } " does not occur in " { $snippet "seq" } ", then " { $snippet "before" } " is just " { $snippet "seq" } " and " { $snippet "after" } " is " { $link f } "." } ;
 
 HELP: split1-slice
-{ $values { "seq" "a sequence" } { "subseq" "a sequence" } { "before-slice" slice } { "after-slice" slice } }
+{ $values { "seq" sequence } { "subseq" sequence } { "before-slice" slice } { "after-slice" slice } }
 { $description "Splits " { $snippet "seq" } " at the first occurrence of " { $snippet "subseq" } ", and outputs the pieces before and after the split as slices. If " { $snippet "subseq" } " does not occur in " { $snippet "seq" } ", then " { $snippet "before" } " is just " { $snippet "seq" } " and " { $snippet "after" } " is " { $link f } "." } ;
 
 HELP: split1-when
-{ $values { "seq" "a sequence" } { "quot" { $quotation ( ... elt -- ... ? ) } } { "before" "a new sequence" } { "after" "a new sequence" } }
+{ $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... ? ) } } { "before" "a new sequence" } { "after" "a new sequence" } }
 { $description "Splits " { $snippet "seq" } " at the first occurrence of an element for which " { $snippet "quot" } " gives a true output and outputs the pieces before and after the split." } ;
 
 HELP: split1-when-slice
-{ $values { "seq" "a sequence" } { "quot" { $quotation ( ... elt -- ... ? ) } } { "before-slice" slice } { "after-slice" slice } }
+{ $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... ? ) } } { "before-slice" slice } { "after-slice" slice } }
 { $description "Splits " { $snippet "seq" } " at the first occurrence of an element for which " { $snippet "quot" } " gives a true output and outputs the pieces before and after the split as slices. If " { $snippet "subseq" } " does not occur in " { $snippet "seq" } ", then " { $snippet "before" } " is just " { $snippet "seq" } " and " { $snippet "after" } " is " { $link f } "." } ;
 
 HELP: split1-last
-{ $values { "seq" "a sequence" } { "subseq" "a sequence" } { "before" "a new sequence" } { "after" "a new sequence" } }
+{ $values { "seq" sequence } { "subseq" sequence } { "before" "a new sequence" } { "after" "a new sequence" } }
 { $description "Splits " { $snippet "seq" } " at the last occurrence of " { $snippet "subseq" } ", and outputs the pieces before and after the split. If " { $snippet "subseq" } " does not occur in " { $snippet "seq" } ", then " { $snippet "before" } " is just " { $snippet "seq" } " and " { $snippet "after" } " is " { $link f } "." } ;
 
 HELP: split1-last-slice
-{ $values { "seq" "a sequence" } { "subseq" "a sequence" } { "before-slice" slice } { "after-slice" slice } }
+{ $values { "seq" sequence } { "subseq" sequence } { "before-slice" slice } { "after-slice" slice } }
 { $description "Splits " { $snippet "seq" } " at the last occurrence of " { $snippet "subseq" } ", and outputs the pieces before and after the split as slices. If " { $snippet "subseq" } " does not occur in " { $snippet "seq" } ", then " { $snippet "before" } " is just " { $snippet "seq" } " and " { $snippet "after" } " is " { $link f } "." } ;
 
 { split1 split1-slice split1-last split1-last-slice } related-words
 
 HELP: split-when
-{ $values { "seq" "a sequence" } { "quot" { $quotation ( ... elt -- ... ? ) } } { "pieces" "a new array" } }
+{ $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... ? ) } } { "pieces" "a new array" } }
 { $description "Splits " { $snippet "seq" } " at each occurrence of an element for which " { $snippet "quot" } " gives a true output and outputs an array of pieces. The pieces do not include the elements along which the sequence was split." }
 { $examples { $example "USING: ascii kernel prettyprint splitting ;" "\"hello,world-how.are:you\" [ letter? not ] split-when ." "{ \"hello\" \"world\" \"how\" \"are\" \"you\" }" } } ;
 
 HELP: split-when-slice
-{ $values { "seq" "a sequence" } { "quot" { $quotation ( ... elt -- ... ? ) } } { "pieces" "a new array" } }
+{ $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... ? ) } } { "pieces" "a new array" } }
 { $description "Splits " { $snippet "seq" } " at each occurrence of an element for which " { $snippet "quot" } " gives a true output and outputs an array of pieces as slices. The pieces do not include the elements along which the sequence was split." } ;
 
 HELP: split
-{ $values { "seq" "a sequence" } { "separators" "a sequence" } { "pieces" "a new array" } }
+{ $values { "seq" sequence } { "separators" sequence } { "pieces" "a new array" } }
 { $description "Splits " { $snippet "seq" } " at each occurrence of an element of " { $snippet "separators" } " and outputs an array of pieces. The pieces do not include the elements along which the sequence was split." }
 { $examples { $example "USING: prettyprint splitting ;" "\"hello world-how are you?\" \" -\" split ." "{ \"hello\" \"world\" \"how\" \"are\" \"you?\" }" } } ;
 
 HELP: ?head
-{ $values { "seq" "a sequence" } { "begin" "a sequence" } { "newseq" "a new sequence" } { "?" "a boolean" } }
+{ $values { "seq" sequence } { "begin" sequence } { "newseq" "a new sequence" } { "?" "a boolean" } }
 { $description "Tests if " { $snippet "seq" } " starts with " { $snippet "begin" } ". If there is a match, outputs the subrange of " { $snippet "seq" } " excluding " { $snippet "begin" } ", and " { $link t } ". If there is no match, outputs " { $snippet "seq" } " and " { $link f } "." } ;
 
 HELP: ?head-slice
-{ $values { "seq" "a sequence" } { "begin" "a sequence" } { "newseq" slice } { "?" "a boolean" } }
+{ $values { "seq" sequence } { "begin" sequence } { "newseq" slice } { "?" "a boolean" } }
 { $description "Like " { $link ?head } ", except the resulting sequence is a " { $link slice } "." } ;
 
 HELP: ?tail
-{ $values { "seq" "a sequence" } { "end" "a sequence" } { "newseq" "a new sequence" } { "?" "a boolean" } }
+{ $values { "seq" sequence } { "end" sequence } { "newseq" "a new sequence" } { "?" "a boolean" } }
 { $description "Tests if " { $snippet "seq" } " ends with " { $snippet "end" } ". If there is a match, outputs the subrange of " { $snippet "seq" } " excluding " { $snippet "end" } ", and " { $link t } ". If there is no match, outputs " { $snippet "seq" } " and " { $link f } "." } ;
 
 HELP: ?tail-slice
-{ $values { "seq" "a sequence" } { "end" "a sequence" } { "newseq" slice } { "?" "a boolean" } }
+{ $values { "seq" sequence } { "end" sequence } { "newseq" slice } { "?" "a boolean" } }
 { $description "Like " { $link ?tail } ", except the resulting sequence is a " { $link slice } "." } ;
 
 HELP: string-lines
index c7d974deb4080d3a3d77eaa9bb1b82462fb9ecf2..708d9da67b5b0d25cc966323ee99af580c5cf8ac 100644 (file)
@@ -361,7 +361,7 @@ HELP: B{
 
 HELP: H{
 { $syntax "H{ { key value }... }" }
-{ $values { "key" "an object" } { "value" "an object" } }
+{ $values { "key" object } { "value" object } }
 { $description "Marks the beginning of a literal hashtable, given as a list of two-element arrays holding key/value pairs. Literal hashtables are terminated by " { $link POSTPONE: } } "." }
 { $examples { $code "H{ { \"tuna\" \"fish\" } { \"jalapeno\" \"vegetable\" } }" } } ;
 
@@ -406,7 +406,7 @@ $nl
 
 HELP: W{
 { $syntax "W{ object }" }
-{ $values { "object" "an object" } }
+{ $values { "object" object } }
 { $description "Marks the beginning of a literal wrapper. Literal wrappers are terminated by " { $link POSTPONE: } } "." }  ;
 
 HELP: POSTPONE:
index 2d9b2df90653f4954369d185b01238d77470e775..035d131dd2df4e8e35e9ea2b7084f21c23b8e83c 100644 (file)
@@ -1,6 +1,4 @@
-USING: arrays byte-arrays help.markup
-help.syntax kernel sbufs strings quotations sequences.private
-vectors.private combinators ;
+USING: help.markup help.syntax kernel sequences ;
 IN: vectors
 
 ARTICLE: "vectors" "Vectors"
@@ -37,7 +35,7 @@ HELP: <vector>
 { $description "Creates a new vector that can hold " { $snippet "n" } " elements before resizing." } ;
 
 HELP: >vector
-{ $values { "seq" "a sequence" } { "vector" vector } }
+{ $values { "seq" sequence } { "vector" vector } }
 { $description "Outputs a freshly-allocated vector with the same elements as a given sequence." } ;
 
 HELP: 1vector