Add PP-EXPRESSION debugging utility.
authorJoe Marshall <jmarshall@alum.mit.edu>
Tue, 2 Mar 2010 16:14:22 +0000 (08:14 -0800)
committerJoe Marshall <jmarshall@alum.mit.edu>
Tue, 2 Mar 2010 16:14:22 +0000 (08:14 -0800)
src/sf/cgen.scm

index 7cb7fb8a5c51281884a90e6dc2356b51c21d1a30..29ed4a68d121ddf2be2a7b98290e0efa5c4dae84 100644 (file)
@@ -240,4 +240,11 @@ USA.
 (define-method/cgen 'THE-ENVIRONMENT
   (lambda (interns expression)
     interns expression ; ignored
-    (make-the-environment)))
\ No newline at end of file
+    (make-the-environment)))
+\f
+;;; Debugging utility
+(define (pp-expression form)
+  (fluid-let ((*pp-primitives-by-name* #f)
+             (*pp-uninterned-symbols-by-name* #f)
+             (*unparse-abbreviate-quotations?* #t))
+    (pp (cgen/external-with-declarations form))))
\ No newline at end of file