aboutsummaryrefslogtreecommitdiffstats
path: root/csc/compare.csc
diff options
context:
space:
mode:
Diffstat (limited to 'csc/compare.csc')
-rw-r--r--csc/compare.csc26
1 files changed, 13 insertions, 13 deletions
diff --git a/csc/compare.csc b/csc/compare.csc
index cbf8b6d..ab7e3c1 100644
--- a/csc/compare.csc
+++ b/csc/compare.csc
@@ -77,17 +77,17 @@
(define (pretty w x indent)
(cond
((list? x)
- (fprintf w "{}(\n" indent)
+ (fprintf w "{} (\n" indent)
(loop with new-indent = (string-append indent " ")
for v in x
do (pretty w v new-indent))
- (fprintf w "{})\n" indent))
+ (fprintf w "{} )\n" indent))
((and (pair? x)
(symbol? (car x)))
- (fprintf w "{}({} .\n" indent (car x))
+ (fprintf w "{} ({} .\n" indent (car x))
(pretty w (cdr x) (string-append indent " "))
- (fprintf w "{})\n" indent))
- (else (fprintf w "{}{}\n" indent x))))
+ (fprintf w "{} )\n" indent))
+ (else (fprintf w "{} {}\n" indent x))))
(define (diff* w x y indent)
@@ -99,13 +99,13 @@
(and (string? x) (string? y)))
(if (equal? x y)
(begin
- (fprintf w "{} {}\n" indent x)
+ (fprintf w "{} {}\n" indent x)
#t)
(begin
- (fprintf w "{}-{}\n{}+{}\n" indent x indent y)
+ (fprintf w "{}- {}\n{}+ {}\n" indent x indent y)
#f)))
((and (alist? x) (alist? y))
- (fprintf w "{} (\n" indent)
+ (fprintf w "{} (\n" indent)
(let ((key-lcs (lcs (map car x) (map car y) symbol=?))
(indent* (string-append indent " "))
(equal #t))
@@ -123,10 +123,10 @@
(set! equal #f)
else
if (symbol=? (caar x) (caar y) (car key-lcs))
- do (fprintf w "{} ({} .\n" indent* (car key-lcs))
+ do (fprintf w "{} ({} .\n" indent* (car key-lcs))
(set! equal (and (diff* w (cdar x) (cdar y) (string-append indent* " "))
equal))
- (fprintf w "{} )\n" indent*)
+ (fprintf w "{} )\n" indent*)
(set! x (cdr x))
(set! y (cdr y))
(set! key-lcs (cdr key-lcs))
@@ -138,10 +138,10 @@
do (pretty w (car x) (string-append indent* "-"))
(set! x (cdr x))
(set! equal #f))
- (fprintf w "{} )\n" indent)
+ (fprintf w "{} )\n" indent)
equal))
((and (list? x) (list? y))
- (fprintf w "{} (\n" indent)
+ (fprintf w "{} (\n" indent)
(let* ((common (lcs x y equal?))
(indent* (string-append indent " "))
(equal #t))
@@ -181,7 +181,7 @@
(set! x (cdr x))
(set! y (cdr y))
(set! equal #f))
- (fprintf w "{} )\n" indent)
+ (fprintf w "{} )\n" indent)
equal))))