rlm@10
|
1 ;;; pprint.clj -- Pretty printer and Common Lisp compatible format function (cl-format) for Clojure
|
rlm@10
|
2
|
rlm@10
|
3 ; Copyright (c) Rich Hickey. All rights reserved.
|
rlm@10
|
4 ; The use and distribution terms for this software are covered by the
|
rlm@10
|
5 ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
|
rlm@10
|
6 ; which can be found in the file epl-v10.html at the root of this distribution.
|
rlm@10
|
7 ; By using this software in any fashion, you are agreeing to be bound by
|
rlm@10
|
8 ; the terms of this license.
|
rlm@10
|
9 ; You must not remove this notice, or any other, from this software.
|
rlm@10
|
10
|
rlm@10
|
11 ;; Author: Tom Faulhaber
|
rlm@10
|
12 ;; April 3, 2009
|
rlm@10
|
13
|
rlm@10
|
14 (ns
|
rlm@10
|
15 ^{:author "Tom Faulhaber",
|
rlm@10
|
16 :doc "A Pretty Printer for Clojure
|
rlm@10
|
17
|
rlm@10
|
18 clojure.pprint implements a flexible system for printing structured data
|
rlm@10
|
19 in a pleasing, easy-to-understand format. Basic use of the pretty printer is
|
rlm@10
|
20 simple, just call pprint instead of println. More advanced users can use
|
rlm@10
|
21 the building blocks provided to create custom output formats.
|
rlm@10
|
22
|
rlm@10
|
23 Out of the box, pprint supports a simple structured format for basic data
|
rlm@10
|
24 and a specialized format for Clojure source code. More advanced formats,
|
rlm@10
|
25 including formats that don't look like Clojure data at all like XML and
|
rlm@10
|
26 JSON, can be rendered by creating custom dispatch functions.
|
rlm@10
|
27
|
rlm@10
|
28 In addition to the pprint function, this module contains cl-format, a text
|
rlm@10
|
29 formatting function which is fully compatible with the format function in
|
rlm@10
|
30 Common Lisp. Because pretty printing directives are directly integrated with
|
rlm@10
|
31 cl-format, it supports very concise custom dispatch. It also provides
|
rlm@10
|
32 a more powerful alternative to Clojure's standard format function.
|
rlm@10
|
33
|
rlm@10
|
34 See documentation for pprint and cl-format for more information or
|
rlm@10
|
35 complete documentation on the the clojure web site on github.",
|
rlm@10
|
36 :added "1.2"}
|
rlm@10
|
37 clojure.pprint
|
rlm@10
|
38 (:refer-clojure :exclude (deftype)))
|
rlm@10
|
39
|
rlm@10
|
40
|
rlm@10
|
41 (load "pprint/utilities")
|
rlm@10
|
42 (load "pprint/column_writer")
|
rlm@10
|
43 (load "pprint/pretty_writer")
|
rlm@10
|
44 (load "pprint/pprint_base")
|
rlm@10
|
45 (load "pprint/cl_format")
|
rlm@10
|
46 (load "pprint/dispatch")
|
rlm@10
|
47
|
rlm@10
|
48 nil
|