diff --git a/basis/prettyprint/prettyprint-docs.factor b/basis/prettyprint/prettyprint-docs.factor index 299c72f0a4..57ecd8fda4 100644 --- a/basis/prettyprint/prettyprint-docs.factor +++ b/basis/prettyprint/prettyprint-docs.factor @@ -159,9 +159,10 @@ ARTICLE: "prettyprint" "The prettyprinter" $nl "Prettyprinter words are found in the " { $vocab-link "prettyprint" } " vocabulary." $nl -"The key words to print an object to " { $link output-stream } "; the first two emit a trailing newline, the second two do not:" +"The key words to print an object to " { $link output-stream } "; the first three emit a trailing newline, the second three do not:" { $subsections . + ... short. pprint pprint-short @@ -205,6 +206,15 @@ HELP: . "Printing a large object can take a long time and consume a lot of memory. If you need to print large objects, use " { $link short. } " or set some " { $link "prettyprint-variables" } " to limit output size." } ; +HELP: ... +{ $values { "obj" object } } +{ $description "Prettyprints an object to " { $link output-stream } " with a trailing line break. Output is unlimited in length." } +{ $warning + "Printing a large object can take a long time and consume a lot of memory. If you need to print large objects, use " { $link short. } " or set some " { $link "prettyprint-variables" } " to limit output size." +} ; + +{ . ... } related-words + HELP: unparse { $values { "obj" object } { "str" "Factor source string" } } { $description "Outputs a prettyprinted string representation of an object. Output is influenced by many variables; see " { $link "prettyprint-variables" } "." } diff --git a/basis/prettyprint/prettyprint.factor b/basis/prettyprint/prettyprint.factor index 6a73536c2a..fe8f4b2b37 100644 --- a/basis/prettyprint/prettyprint.factor +++ b/basis/prettyprint/prettyprint.factor @@ -21,6 +21,8 @@ IN: prettyprint : . ( obj -- ) pprint nl ; +: ... ( obj -- ) [ . ] without-limits ; + : pprint-use ( obj -- ) [ pprint* ] with-use ; : unparse ( obj -- str ) [ pprint ] with-string-writer ;