From ebda32d108faf53a3a7b24ba2afed824a4764a6d Mon Sep 17 00:00:00 2001 From: OGINO Masanori Date: Thu, 19 Dec 2013 02:00:43 +0900 Subject: [PATCH] Add (import ...) to etc/tak.scm and t/*.scm. Note that this commit only fixes 'unbound variable' errors. For now t/dynamic-wind.scm, t/exception.scm and t/ir-macro.scm seem buggy on my Linux (amd64) machine. Signed-off-by: OGINO Masanori --- etc/tak.scm | 4 ++++ t/closure.scm | 3 +++ t/dynamic-wind.scm | 3 +++ t/exception.scm | 3 +++ t/ir-macro.scm | 3 +++ t/letrec.scm | 3 +++ t/tailcall.scm | 6 +++++- 7 files changed, 24 insertions(+), 1 deletion(-) diff --git a/etc/tak.scm b/etc/tak.scm index 2a918d0e..69f4b5b0 100644 --- a/etc/tak.scm +++ b/etc/tak.scm @@ -1,3 +1,7 @@ +(import (scheme base) + (scheme time) + (scheme write)) + (define (time f) (let ((start (current-jiffy))) (f) diff --git a/t/closure.scm b/t/closure.scm index b74568e2..e747818b 100644 --- a/t/closure.scm +++ b/t/closure.scm @@ -1,3 +1,6 @@ +(import (scheme base) + (scheme write)) + (begin (define foo (lambda (a) diff --git a/t/dynamic-wind.scm b/t/dynamic-wind.scm index 7e8edaa6..f34f2213 100644 --- a/t/dynamic-wind.scm +++ b/t/dynamic-wind.scm @@ -1,3 +1,6 @@ +(import (scheme base) + (scheme write)) + (define (print obj) (write obj) (newline) diff --git a/t/exception.scm b/t/exception.scm index 86b244a9..ee92356b 100644 --- a/t/exception.scm +++ b/t/exception.scm @@ -1,3 +1,6 @@ +(import (scheme base) + (scheme write)) + (define (print obj) (write obj) (newline) diff --git a/t/ir-macro.scm b/t/ir-macro.scm index 28d4985c..a68806d6 100644 --- a/t/ir-macro.scm +++ b/t/ir-macro.scm @@ -1,3 +1,6 @@ +(import (scheme base) + (picrin macro)) + (define-syntax aif (ir-macro-transformer (lambda (form inject cmp) diff --git a/t/letrec.scm b/t/letrec.scm index 05e2e19e..435a15bf 100644 --- a/t/letrec.scm +++ b/t/letrec.scm @@ -1,3 +1,6 @@ +(import (scheme base) + (scheme write)) + (define (print obj) (write obj) (newline) diff --git a/t/tailcall.scm b/t/tailcall.scm index bbd14c2a..9c8cefd4 100644 --- a/t/tailcall.scm +++ b/t/tailcall.scm @@ -1,6 +1,10 @@ +(import (scheme base) + (scheme write)) + (define (sum k acc) (if (zero? k) acc (sum (- k 1) (+ k acc)))) -(display (sum 1000 0)) +(write (sum 1000 0)) +(newline)