vocab-browser: Improve predicate class listing

db4
Eduardo Cavazos 2008-09-04 10:50:22 -05:00
parent 19036845bd
commit fcd89748aa
1 changed files with 4 additions and 13 deletions

View 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