Permalink
Browse files

Started adding cl-format code.

It loads, many tests run, about 75 fails.  Mostly due to type mismatches.  Probably 3 or 4 actual code problems revealed in tests.
  • Loading branch information...
dmiller committed Jun 29, 2010
1 parent c4c9341 commit c725895e907382e5f6636ecbaa6ae96ad96dd7b4
@@ -166,6 +166,41 @@
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
+ <ItemGroup>
+ <None Include="clojure\pprint.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\pprint\cl_format.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\pprint\column_writer.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\pprint\dispatch.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\pprint\pprint_base.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\pprint\pretty_writer.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\pprint\utilities.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\test_clojure\pprint.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\test_clojure\pprint\test_cl_format.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\test_clojure\pprint\test_helper.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="clojure\test_clojure\pprint\test_pretty.clj">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -10,7 +10,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; printing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(import '(System.IO.System.IO.TextWriter)) ;;; was (import '(java.io Writer)) (I have replaced ^Writer with ^System.IO.TextWriter throughout
+(import '(System.IO.TextWriter)) ;;; was (import '(java.io Writer)) (I have replaced ^Writer with ^System.IO.TextWriter throughout
;; Other global replaces: .write => .Write, .append => .Write, ^Class => ^Type, ^Character => ^Char
(def
^{:doc "*print-length* controls how many items of each collection the
@@ -0,0 +1,48 @@
+;;; pprint.clj -- Pretty printer and Common Lisp compatible format function (cl-format) for Clojure
+
+; Copyright (c) Rich Hickey. All rights reserved.
+; The use and distribution terms for this software are covered by the
+; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+; which can be found in the file epl-v10.html at the root of this distribution.
+; By using this software in any fashion, you are agreeing to be bound by
+; the terms of this license.
+; You must not remove this notice, or any other, from this software.
+
+;; Author: Tom Faulhaber
+;; April 3, 2009
+
+(ns
+ ^{:author "Tom Faulhaber",
+ :doc "A Pretty Printer for Clojure
+
+clojure.pprint implements a flexible system for printing structured data
+in a pleasing, easy-to-understand format. Basic use of the pretty printer is
+simple, just call pprint instead of println. More advanced users can use
+the building blocks provided to create custom output formats.
+
+Out of the box, pprint supports a simple structured format for basic data
+and a specialized format for Clojure source code. More advanced formats,
+including formats that don't look like Clojure data at all like XML and
+JSON, can be rendered by creating custom dispatch functions.
+
+In addition to the pprint function, this module contains cl-format, a text
+formatting function which is fully compatible with the format function in
+Common Lisp. Because pretty printing directives are directly integrated with
+cl-format, it supports very concise custom dispatch. It also provides
+a more powerful alternative to Clojure's standard format function.
+
+See documentation for pprint and cl-format for more information or
+complete documentation on the the clojure web site on github.",
+ :added "1.2"}
+ clojure.pprint
+ (:refer-clojure :exclude (deftype)))
+
+
+(load "pprint/utilities")
+(load "pprint/column_writer")
+(load "pprint/pretty_writer")
+(load "pprint/pprint_base")
+(load "pprint/cl_format")
+(load "pprint/dispatch")
+
+nil
Oops, something went wrong.

0 comments on commit c725895

Please sign in to comment.