Help lint now checks ABOUT:

db4
Slava Pestov 2008-06-30 01:44:46 -05:00
parent 4c31bc0aba
commit a91d51dc1c
1 changed files with 11 additions and 7 deletions

View File

@ -73,14 +73,13 @@ IN: help.lint
: all-word-help ( words -- seq ) : all-word-help ( words -- seq )
[ word-help ] filter ; [ word-help ] filter ;
TUPLE: help-error topic ; TUPLE: help-error topic error ;
: <help-error> ( topic delegate -- error ) C: <help-error> help-error
{ set-help-error-topic set-delegate } help-error construct ;
M: help-error error. M: help-error error.
"In " write dup help-error-topic ($link) nl "In " write dup topic>> pprint nl
delegate error. ; error>> error. ;
: check-something ( obj quot -- ) : check-something ( obj quot -- )
flush [ <help-error> , ] recover ; inline flush [ <help-error> , ] recover ; inline
@ -117,11 +116,16 @@ M: help-error error.
] 2curry each ] 2curry each
] keep ; ] keep ;
: check-about ( vocab -- )
[ vocab-help [ article drop ] when* ] check-something ;
: check-vocab ( vocab -- seq ) : check-vocab ( vocab -- seq )
"Checking " write dup write "..." print "Checking " write dup write "..." print
[ [
dup words [ check-word ] each [ check-about ]
"vocab-articles" get at [ check-article ] each [ words [ check-word ] each ]
[ "vocab-articles" get at [ check-article ] each ]
tri
] { } make ; ] { } make ;
: run-help-lint ( prefix -- alist ) : run-help-lint ( prefix -- alist )