]> gitweb.factorcode.org Git - factor.git/commitdiff
prettyprint.sections: more use of hash-sets.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 9 Mar 2013 00:32:09 +0000 (16:32 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 9 Mar 2013 00:32:09 +0000 (16:32 -0800)
basis/prettyprint/sections/sections.factor

index 23dc7025e4f137cc7a18a28f58eb51b5b35d4acb..de64eb3d593b1b6ff19052c8fd241993a1e1c345 100644 (file)
@@ -5,6 +5,7 @@ namespaces make sequences strings io.styles vectors words
 prettyprint.config splitting classes continuations
 accessors sets vocabs.parser combinators vocabs
 classes.maybe ;
+FROM: sets => members ;
 FROM: namespaces => set ;
 IN: prettyprint.sections
 
@@ -23,7 +24,7 @@ TUPLE: pprinter last-newline line-count indent ;
 
 : (record-vocab) ( vocab -- )
     dup pprinter-in get dup [ vocab-name ] when =
-    [ drop ] [ pprinter-use get conjoin ] if ;
+    [ drop ] [ pprinter-use get adjoin ] if ;
 
 GENERIC: vocabulary-name ( obj -- string )
 
@@ -347,7 +348,7 @@ M: block long-section ( block -- )
 
 : pprinter-manifest ( -- manifest )
     <manifest>
-    [ [ pprinter-use get keys >vector ] dip search-vocabs<< ]
+    [ [ pprinter-use get members >vector ] dip search-vocabs<< ]
     [ [ pprinter-in get ] dip current-vocab<< ]
     [ ]
     tri ;
@@ -355,7 +356,7 @@ M: block long-section ( block -- )
 : make-pprint ( obj quot -- block manifest )
     [
         0 position ,,
-        H{ } clone pprinter-use ,,
+        HS{ } clone pprinter-use ,,
         V{ } clone recursion-check ,,
         V{ } clone pprinter-stack ,,
     ] H{ } make [