generic.single generic.standard generic.hook io io.pathnames
io.streams.string io.styles kernel make namespaces prettyprint
prettyprint.backend prettyprint.config prettyprint.custom
-prettyprint.sections sequences sets sorting strings summary words
-words.symbol words.constant words.alias vocabs slots ;
+prettyprint.sections sequences sets slots sorting strings summary
+words words.symbol words.constant words.alias vocabs ;
FROM: namespaces => set ;
FROM: classes => members ;
RENAME: members sets => set-members
: synopsis ( defspec -- str )
[
+ string-limit? off
0 margin set
1 line-limit set
[ synopsis* ] with-in
<PRIVATE
: seeing-word ( word -- )
- vocabulary>> dup [ vocab ] when pprinter-in set ;
+ vocabulary>> dup [ lookup-vocab ] when pprinter-in set ;
: word-synopsis ( word -- )
{
M: method synopsis*
[ definer. ]
- [ "method-class" word-prop pprint-word ]
+ [ "method-class" word-prop pprint-class ]
[ "method-generic" word-prop pprint-word ] tri ;
M: mixin-instance synopsis*
M: pathname synopsis* pprint* ;
+M: alias summary
+ [
+ 0 margin set 1 line-limit set
+ [
+ {
+ [ seeing-word ]
+ [ definer. ]
+ [ pprint-word ]
+ [ stack-effect pprint-effect ]
+ } cleave
+ ] with-in
+ ] with-string-writer ;
+
M: word summary synopsis ;
GENERIC: declarations. ( obj -- )
<block \ MIXIN: pprint-word
dup pprint-word <block
dup members [
- hard line-break
+ hard add-line-break
\ INSTANCE: pprint-word pprint-word pprint-word
] with each block> block> ;
M: word see-class* drop ;
M: builtin-class see-class*
- drop "! Built-in class" comment. ;
+ <block
+ \ BUILTIN: pprint-word
+ [ pprint-word ]
+ [ <block "slots" word-prop [ pprint-slot ] each pprint-; block> ] bi
+ block> ;
: see-class ( class -- )
dup class? [
: seeing-implementors ( class -- seq )
dup implementors
- [ [ reader? ] [ writer? ] bi or not ] filter
- [ method ] with map
+ [ [ reader? ] [ writer? ] bi or ] reject
+ [ lookup-method ] with map
natural-sort ;
: seeing-methods ( generic -- seq )