 : word-path. ( word -- )
     [ word-vocabulary ":" ] keep unparse 3append write nl ;
 
-: lint. ( array -- )
+: (lint.) ( pair -- )
     first2 >r word-path. r> [
         bl bl bl bl
         dup .

: trim-self ( seq -- newseq )
    [ [ (trim-self) ] subset ] assoc-map ;

M: sequence run-lint ( seq -- seq )
    [
        global [ dup . flush ] bind
        dup lint
    ] { } map>assoc
    trim-self
    [ second empty? not ] subset ;

M: word run-lint ( word -- seq )
    1array run-lint ;

: lint-all ( -- seq )
    all-words run-lint
    [
        nip first dup def-hash get at
        [ first ] 2apply literalize = not
    ] assoc-subset
    dup [ lint. ] each ;

        def-hash get at [ bl bl bl bl word-path. ] each
        nl
    ] each nl nl ;

: lint. ( alist -- )
    [ (lint.) ] each ;
    

GENERIC: run-lint ( obj -- obj )
