aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/csc/compiler.csc4
-rw-r--r--lib/csc/macros.csc2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/csc/compiler.csc b/lib/csc/compiler.csc
index d18c373..e2e682e 100644
--- a/lib/csc/compiler.csc
+++ b/lib/csc/compiler.csc
@@ -131,7 +131,6 @@
(define (ir1->bytecode expr)
- (printf "ir1 =\n{}\n" expr)
(define c (closure-convert (ir1->ir2 expr (lambda (x) *tail*))))
(printf "ir2 =\n{}\n" c)
(define b (ir2->ir3 c))
@@ -198,8 +197,9 @@
(match program
((('import . imports1) ('import . imports2) . rest)
- (compile (cons (list 'import (append imports1 imports2)) rest)))
+ (compile (cons (cons 'import (append imports1 imports2)) rest)))
((('import . imports) . body)
+ (printf "imports {}\n" imports)
(define compiled-body (ir1->bytecode (expand-body 'main body (make-import-map imports))))
(encode (link (revappend library-code (list compiled-body (list (list 'exit (list 'const 0))))))))
(_ (error "unexpected form in compile" program))))))
diff --git a/lib/csc/macros.csc b/lib/csc/macros.csc
index 739f532..fc8aa79 100644
--- a/lib/csc/macros.csc
+++ b/lib/csc/macros.csc
@@ -651,7 +651,7 @@
(let* ((transformer (expand-syntax-object transformer-form))
(body (expand-syntax-object (with-binding ident transformer body-form))))
body))
- (_ (raise-syntax-error "unexpected form in let-syntax"))))))
+ (_ (raise-syntax-error "unexpected form in let-syntax" x))))))
(define (split-args-rest formals)