view src/clojure/pprint.clj @ 10:ef7dbbd6452c

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