factor/library/tools/describe.facts

34 lines
1.9 KiB
Plaintext
Raw Normal View History

2006-03-25 01:06:52 -05:00
IN: inspector
2006-06-04 16:20:40 -04:00
USING: help io kernel prettyprint words ;
2006-03-25 01:06:52 -05:00
HELP: summary "( object -- string )"
{ $values { "object" "an object" } { "string" "a string" } }
{ $contract "Outputs a brief description of the object." } ;
HELP: sheet "( object -- sheet )"
{ $values { "object" "an object" } { "sheet" "a sequence of sequences" } }
{ $contract "Outputs a representation of the object for the " { $link describe } " word, which is a table where each row corresponds to an object slot, and consists of a number of columns, presumably including the slot name and value." } ;
HELP: slot-sheet "( object -- sheet )"
{ $values { "object" "an object" } { "sheet" "a sequence of sequences" } }
{ $description "Outputs a table of object slot names and values. This is used by the default implementation of " { $link sheet } "." } ;
HELP: describe "( object -- )"
{ $values { "object" "an object" } }
{ $description "Print a tabular overview of the object, featuring expanding outliners of the default stream supports them (for example, in the Factor UI)."
"For sequences and hashtables, this outputs the entries of the collection. For all other object types, slot names and values are shown." }
2006-03-27 01:24:18 -05:00
{ $notes "Slot values are converted to strings using " { $link unparse-short } "." }
{ $examples { $code "global describe" } } ;
2006-03-25 01:06:52 -05:00
HELP: stack. "( seq -- )"
{ $values { "seq" "a sequence" } }
{ $description "Prints an outliner listing elements of a sequence in reverse order. Elements are coverted to strings using " { $link unparse-short } "." }
{ $notes "This word is used in the implementation of " { $link .s } " and " { $link .r } "." } ;
2006-06-04 16:20:40 -04:00
HELP: callstack. "( seq -- )"
{ $values { "seq" "a sequence" } }
{ $description "Displays a sequence output by " { $link callstack } " in a nice way, by highlighting the current execution point in every call frame." } ;
2006-03-25 01:06:52 -05:00
HELP: .r "( -- )"
{ $description "Displays the contents of the return stack, with the top of the stack printed first." } ;