]> gitweb.factorcode.org Git - factor.git/commitdiff
repair overwritten changes
authorCat Stevens <catb0t@protonmail.ch>
Mon, 12 Feb 2018 04:22:19 +0000 (23:22 -0500)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 12 Feb 2018 04:24:48 +0000 (20:24 -0800)
extra/help/lint/coverage/coverage-tests.factor
extra/help/lint/coverage/coverage.factor

index 400cd984d97646f2f27aecba68f98f77391edf6e..075fda78466b9a7bbfa98731b8b429d9162250a4 100644 (file)
@@ -1,6 +1,6 @@
-USING: accessors fuel.help.private help.lint.coverage
-help.lint.coverage.private help.markup help.syntax kernel
-literals math math.matrices sequences sorting tools.test vocabs ;
+USING: accessors help.lint.coverage help.lint.coverage.private 
+help.markup help.syntax kernel literals math math.matrices 
+sequences sorting tools.test vocabs ;
 IN: help.lint.coverage.tests
 
 <PRIVATE
index ebb9ae53fdd5c41fd3eddbf0a1673ea880924410..b83fd15b1110c5d648fe66cdf2a49eff0020baa4 100644 (file)
@@ -1,9 +1,9 @@
 USING: accessors arrays classes classes.error combinators
 combinators.short-circuit continuations english eval formatting
-fry fuel.help.private generic help help.lint help.lint.checks help.markup io
+fry generic help help.lint help.lint.checks help.markup io
 io.streams.string io.styles kernel math namespaces parser
 prettyprint sequences sequences.deep sets sorting splitting strings summary
-vocabs words words.alias ;
+vocabs vocabs.parser words words.alias ;
 FROM: namespaces => set ;
 IN: help.lint.coverage
 
@@ -78,6 +78,13 @@ DEFER: ?pluralize
 M: word-help-coverage summary
     [ (present-coverage) ] with-string-writer ; inline
 
+: find-word ( name -- word/f )
+    dup words-named dup length {
+        { 0 [ 2drop f ] }
+        { 1 [ first nip ] }
+        [ drop <ambiguous-use-error> throw-restarts ]
+    } case ;
+
 : sorted-loaded-child-vocabs ( prefix -- assoc )
     loaded-child-vocab-names natural-sort ; inline