]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/hints/hints.factor
basis: use lint.vocabs tool to trim using lists
[factor.git] / basis / hints / hints.factor
index b5b41603d263f90e651c3b81648b90034f4a00d5..403bb4e12e3c7dd05da1cfd437a6f221d1591760 100644 (file)
@@ -1,16 +1,15 @@
 ! Copyright (C) 2008, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs byte-arrays byte-vectors classes
-combinators definitions effects fry generic generic.single
-generic.standard hashtables io.binary io.encodings
-io.streams.string kernel kernel.private math math.parser
-namespaces parser sbufs sequences sequences.private splitting
-splitting.private strings vectors words ;
+combinators definitions fry generic generic.single
+generic.standard hashtables kernel kernel.private math
+math.parser parser sbufs sequences splitting strings vectors
+words ;
 IN: hints
 
 GENERIC: specializer-predicate ( spec -- quot )
 
-M: class specializer-predicate predicate-def ;
+M: class specializer-predicate '[ _ instance? ] ;
 
 M: object specializer-predicate '[ _ eq? ] ;
 
@@ -24,7 +23,7 @@ M: object specializer-declaration class-of ;
     "specializer" word-prop ;
 
 : make-specializer ( specs -- quot )
-    dup length iota <reversed>
+    dup length <iota> <reversed>
     [ (picker) 2array ] 2map
     [ drop object eq? ] assoc-reject
     [ [ t ] ] [
@@ -95,11 +94,15 @@ set-specializer
     set-specializer
 ] each
 
-{ subseq subseq-unsafe } [
-    { { fixnum fixnum string } { fixnum fixnum array } }
+{ suffix prefix } [
+    { { string object } { array object } }
     set-specializer
 ] each
 
+\ subseq
+{ { fixnum fixnum string } { fixnum fixnum array } }
+set-specializer
+
 \ reverse!
 { { string } { array } }
 set-specializer
@@ -124,15 +127,6 @@ set-specializer
 
 \ assoc-stack { vector } set-specializer
 
-{ >le >be } [
-    { { fixnum fixnum } { bignum fixnum } }
-    set-specializer
-] each
-
-{ le> be> } [
-    { byte-array } set-specializer
-] each
-
 \ base> { string fixnum } set-specializer
 
 M\ hashtable at*