From a91d51dc1c3f946e335c93cdd97a81d758cff164 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 30 Jun 2008 01:44:46 -0500 Subject: [PATCH] Help lint now checks ABOUT: --- extra/help/lint/lint.factor | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/extra/help/lint/lint.factor b/extra/help/lint/lint.factor index 82f7f998d7..221dca3c62 100755 --- a/extra/help/lint/lint.factor +++ b/extra/help/lint/lint.factor @@ -73,14 +73,13 @@ IN: help.lint : all-word-help ( words -- seq ) [ word-help ] filter ; -TUPLE: help-error topic ; +TUPLE: help-error topic error ; -: ( topic delegate -- error ) - { set-help-error-topic set-delegate } help-error construct ; +C: help-error M: help-error error. - "In " write dup help-error-topic ($link) nl - delegate error. ; + "In " write dup topic>> pprint nl + error>> error. ; : check-something ( obj quot -- ) flush [ , ] recover ; inline @@ -117,11 +116,16 @@ M: help-error error. ] 2curry each ] keep ; +: check-about ( vocab -- ) + [ vocab-help [ article drop ] when* ] check-something ; + : check-vocab ( vocab -- seq ) "Checking " write dup write "..." print [ - dup words [ check-word ] each - "vocab-articles" get at [ check-article ] each + [ check-about ] + [ words [ check-word ] each ] + [ "vocab-articles" get at [ check-article ] each ] + tri ] { } make ; : run-help-lint ( prefix -- alist )