From 1c359f8d7aac2a3924d37416c69173077c8c5286 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 3 Apr 2011 17:37:28 -0700 Subject: [PATCH 1/2] io: fix help lint --- core/io/io-docs.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/io/io-docs.factor b/core/io/io-docs.factor index 86f27f5186..ef64896dfb 100644 --- a/core/io/io-docs.factor +++ b/core/io/io-docs.factor @@ -245,11 +245,11 @@ HELP: lines { $description "Reads lines of text until from the " { $link input-stream } " until it is exhausted, collecting them in a sequence of strings." } ; HELP: each-line -{ $values { "quot" { $quotation "( str -- )" } } } +{ $values { "quot" { $quotation "( ... line -- ... )" } } } { $description "Calls the quotation with successive lines of text, until the current " { $link input-stream } " is exhausted." } ; HELP: each-block -{ $values { "quot" { $quotation "( block -- )" } } } +{ $values { "quot" { $quotation "( ... block -- ... )" } } } { $description "Calls the quotation with successive blocks of data, until the current " { $link input-stream } " is exhausted." } ; HELP: stream-contents From 59a708638c0e393844b0f09c2c6f67d3f57c2916 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 3 Apr 2011 22:33:51 -0700 Subject: [PATCH 2/2] alien.c-types: add summary and docs for no-c-type error --- basis/alien/c-types/c-types-docs.factor | 2 +- basis/alien/c-types/c-types.factor | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/basis/alien/c-types/c-types-docs.factor b/basis/alien/c-types/c-types-docs.factor index e14a5cb5e1..dc1754a149 100644 --- a/basis/alien/c-types/c-types-docs.factor +++ b/basis/alien/c-types/c-types-docs.factor @@ -21,7 +21,7 @@ HELP: HELP: no-c-type { $values { "name" c-type-name } } { $description "Throws a " { $link no-c-type } " error." } -{ $error-description "Thrown by " { $link c-type } " if a given string does not name a C type. When thrown during compile time, indicates a typo in an " { $link alien-invoke } " or " { $link alien-callback } " form." } ; +{ $error-description "Thrown by " { $link c-type } " if a given word is not a C type." } ; HELP: c-type { $values { "name" c-type-name } { "c-type" c-type } } diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index 19103ce3a8..48f608037b 100644 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -3,7 +3,7 @@ USING: accessors alien alien.accessors arrays byte-arrays classes combinators compiler.units cpu.architecture delegate fry kernel layouts locals macros math math.order quotations -sequences system words words.symbol ; +sequences system words words.symbol summary ; QUALIFIED: math IN: alien.c-types @@ -37,7 +37,9 @@ unboxer : ( -- c-type ) \ c-type new ; inline -ERROR: no-c-type name ; +ERROR: no-c-type word ; + +M: no-c-type summary drop "Not a C type" ; ! C type protocol GENERIC: c-type ( name -- c-type ) foldable