]> gitweb.factorcode.org Git - factor.git/commitdiff
vocab-browser: Improve predicate class listing
authorEduardo Cavazos <dharmatech@finkelstein.stackeffects.info>
Thu, 4 Sep 2008 15:50:22 +0000 (10:50 -0500)
committerEduardo Cavazos <dharmatech@finkelstein.stackeffects.info>
Thu, 4 Sep 2008 15:50:22 +0000 (10:50 -0500)
unfinished/vocab-browser/vocab-browser.factor

index b1e719dbfe618979a2c6386e16bbe028a7ea15aa..cec2dd21e75cd0827f78eb789e68df19586c6ef0 100644 (file)
@@ -20,18 +20,6 @@ IN: vocab-browser
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: pprint-class ( class -- )
-  [
-    \ TUPLE: pprint-word dup pprint-word
-    dup superclass tuple eq?
-    [ "<" text dup superclass pprint-word ] unless
-    <block "slots" word-prop [ pprint-slot ] each
-    block> pprint-;
-  ]
-  with-pprint nl ;
-
-! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
 : word-effect-as-string ( word -- string )
   stack-effect dup
     [ effect>string ]
@@ -71,7 +59,10 @@ IN: vocab-browser
     [ drop ]
     [
       "Predicate Classes" $heading nl
-      [ pprint-class ] each
+      ! [ pprint-class ] each
+      [ { [ ] [ superclass ] } 1arr ] map
+      { "CLASS" "SUPERCLASS" } prefix
+      print-table
     ]
   if