]> gitweb.factorcode.org Git - factor.git/commitdiff
Help lint now checks ABOUT:
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 30 Jun 2008 06:44:46 +0000 (01:44 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 30 Jun 2008 06:44:46 +0000 (01:44 -0500)
extra/help/lint/lint.factor

index 82f7f998d7e8a61ee11872887b1d568d7c71bc38..221dca3c62da9b8e7f8399f7db88e5f6f7a5e171 100755 (executable)
@@ -73,14 +73,13 @@ IN: help.lint
 : all-word-help ( words -- seq )
     [ word-help ] filter ;
 
-TUPLE: help-error topic ;
+TUPLE: help-error topic error ;
 
-: <help-error> ( topic delegate -- error )
-    { set-help-error-topic set-delegate } help-error construct ;
+C: <help-error> 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 [ <help-error> , ] 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 )