From 5a9dbc2c0f1e47fd937893f6372e2d7e4f0a190c Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 23 Mar 2009 01:18:24 -0500 Subject: [PATCH] Remove useless declarations --- basis/environment/environment-docs.factor | 6 +++--- basis/farkup/farkup-docs.factor | 2 +- basis/help/syntax/syntax.factor | 12 ++++-------- basis/io/encodings/strict/strict-docs.factor | 4 ++-- basis/io/files/unique/unique-docs.factor | 8 ++++---- basis/lists/lists-docs.factor | 4 ---- 6 files changed, 14 insertions(+), 22 deletions(-) diff --git a/basis/environment/environment-docs.factor b/basis/environment/environment-docs.factor index b48a7a01ad..0f88181f28 100644 --- a/basis/environment/environment-docs.factor +++ b/basis/environment/environment-docs.factor @@ -17,7 +17,7 @@ HELP: (set-os-envs) { $notes "In most cases, use " { $link set-os-envs } " instead." } ; -HELP: os-env ( key -- value ) +HELP: os-env { $values { "key" string } { "value" string } } { $description "Looks up the value of a shell environment variable." } { $examples @@ -39,14 +39,14 @@ HELP: set-os-envs "Names and values of environment variables are operating system-specific. Windows NT allows values up to 32766 characters in length." } ; -HELP: set-os-env ( value key -- ) +HELP: set-os-env { $values { "value" string } { "key" string } } { $description "Set an environment variable." } { $notes "Names and values of environment variables are operating system-specific." } ; -HELP: unset-os-env ( key -- ) +HELP: unset-os-env { $values { "key" string } } { $description "Unset an environment variable." } { $notes diff --git a/basis/farkup/farkup-docs.factor b/basis/farkup/farkup-docs.factor index 8c6b07a01c..036f0d667a 100644 --- a/basis/farkup/farkup-docs.factor +++ b/basis/farkup/farkup-docs.factor @@ -9,7 +9,7 @@ HELP: write-farkup { $values { "string" string } } { $description "Parse a Farkup string and writes the resulting HTML to " { $link output-stream } "." } ; -HELP: parse-farkup ( string -- farkup ) +HELP: parse-farkup { $values { "string" string } { "farkup" "a Farkup syntax tree node" } } { $description "Parses Farkup and outputs a tree of " { $link "farkup-ast" } "." } ; diff --git a/basis/help/syntax/syntax.factor b/basis/help/syntax/syntax.factor index 044768aec2..1844d18d94 100644 --- a/basis/help/syntax/syntax.factor +++ b/basis/help/syntax/syntax.factor @@ -1,4 +1,4 @@ -! Copyright (C) 2005, 2008 Slava Pestov. +! Copyright (C) 2005, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays kernel parser sequences words help help.topics namespaces vocabs definitions compiler.units @@ -7,17 +7,13 @@ IN: help.syntax SYNTAX: HELP: scan-word bootstrap-word - dup set-word - dup >link save-location - \ ; parse-until >array swap set-word-help ; + [ >link save-location ] [ [ \ ; parse-until >array ] dip set-word-help ] bi ; SYNTAX: ARTICLE: location [ - \ ; parse-until >array [ first2 ] keep 2 tail
+ \ ; parse-until >array [ first2 ] [ 2 tail ] bi
over add-article >link ] dip remember-definition ; SYNTAX: ABOUT: - in get vocab - dup changed-definition - scan-object >>help drop ; + in get vocab scan-object >>help changed-definition ; diff --git a/basis/io/encodings/strict/strict-docs.factor b/basis/io/encodings/strict/strict-docs.factor index b7edec2de7..d93c5dd24e 100644 --- a/basis/io/encodings/strict/strict-docs.factor +++ b/basis/io/encodings/strict/strict-docs.factor @@ -3,6 +3,6 @@ USING: help.syntax help.markup ; IN: io.encodings.strict -HELP: strict ( encoding -- strict-encoding ) -{ $values { "encoding" "an encoding descriptor" } { "strict-encoding" "a strict encoding descriptor" } } +HELP: strict ( code -- strict ) +{ $values { "code" "an encoding descriptor" } { "strict" "a strict encoding descriptor" } } { $description "Makes an encoding strict, that is, in the presence of a malformed code point, an error is thrown. Note that the existence of a replacement character in a file (U+FFFD) also throws an error." } ; diff --git a/basis/io/files/unique/unique-docs.factor b/basis/io/files/unique/unique-docs.factor index b8a4431a73..74fc045032 100644 --- a/basis/io/files/unique/unique-docs.factor +++ b/basis/io/files/unique/unique-docs.factor @@ -23,7 +23,7 @@ HELP: unique-retries { unique-length unique-retries } related-words -HELP: make-unique-file ( prefix suffix -- path ) +HELP: make-unique-file { $values { "prefix" "a string" } { "suffix" "a string" } { "path" "a pathname string" } } { $description "Creates a file that is guaranteed not to exist in the directory stored in " { $link current-temporary-directory } ". The file name is composed of a prefix, a number of random digits and letters, and the suffix. Returns the full pathname." } @@ -31,18 +31,18 @@ HELP: make-unique-file ( prefix suffix -- path ) { unique-file make-unique-file cleanup-unique-file } related-words -HELP: cleanup-unique-file ( prefix suffix quot: ( path -- ) -- ) +HELP: cleanup-unique-file { $values { "prefix" "a string" } { "suffix" "a string" } { "quot" "a quotation" } } { $description "Creates a file with " { $link make-unique-file } " and calls the quotation with the path name on the stack." } { $notes "The unique file will be deleted after calling this word." } ; -HELP: unique-directory ( -- path ) +HELP: unique-directory { $values { "path" "a pathname string" } } { $description "Creates a directory in the value in " { $link current-temporary-directory } " that is guaranteed not to exist in and returns the full pathname." } { $errors "Throws an error if the directory cannot be created after a number of tries. The most likely error is incorrect directory permissions on the temporary directory." } ; -HELP: cleanup-unique-directory ( quot -- ) +HELP: cleanup-unique-directory { $values { "quot" "a quotation" } } { $description "Creates a directory with " { $link unique-directory } " and calls the quotation with the pathname on the stack using the " { $link with-temporary-directory } " combinator. The quotation can access the " { $link current-temporary-directory } " symbol for the name of the temporary directory. Subsequent unique files will be created in this unique directory until the combinator returns." } { $notes "The directory will be deleted after calling this word, even if an error is thrown in the quotation. This combinator is like " { $link with-unique-directory } " but does not delete the directory." } ; diff --git a/basis/lists/lists-docs.factor b/basis/lists/lists-docs.factor index c03a869ebd..8782c3d9b4 100644 --- a/basis/lists/lists-docs.factor +++ b/basis/lists/lists-docs.factor @@ -83,10 +83,6 @@ HELP: nil? { nil nil? } related-words -HELP: list? ( object -- ? ) -{ $values { "object" "an object" } { "?" "a boolean" } } -{ $description "Returns true if the object conforms to the list protocol." } ; - { 1list 2list 3list } related-words HELP: 1list