~ chicken-core (chicken-5) e1d3b21427293bc7ce5208c46e54dad89aa8ed70


commit e1d3b21427293bc7ce5208c46e54dad89aa8ed70
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Tue Feb 2 23:33:55 2016 +1300
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Tue Mar 8 22:52:34 2016 +1300

    No implicit imports when explicit-use is given

diff --git a/batch-driver.scm b/batch-driver.scm
index 7521ff16..ead86869 100644
--- a/batch-driver.scm
+++ b/batch-driver.scm
@@ -182,8 +182,7 @@
   (initialize-compiler)
   (set! explicit-use-flag (memq 'explicit-use options))
   (set! emit-debug-info (memq 'debug-info options))
-  (let ((initforms `((import-for-syntax scheme chicken)
-		     (import scheme chicken)
+  (let ((initforms `((import-for-syntax ,@default-syntax-imports)
 		     (##core#declare
 		      ,@(append 
 			 default-declarations
@@ -192,7 +191,10 @@
 			     '())
 			 (if explicit-use-flag
 			     '()
-			     `((uses ,@units-used-by-default)))))))
+			     `((uses ,@default-units)))))
+		     ,@(if explicit-use-flag
+			   '()
+			   `((import ,@default-imports)))))
         (verbose (memq 'verbose options))
 	(outfile (cond ((memq 'output-file options) 
 			=> (lambda (node)
diff --git a/c-platform.scm b/c-platform.scm
index be17ca7c..ad5483cc 100644
--- a/c-platform.scm
+++ b/c-platform.scm
@@ -34,8 +34,11 @@
 	optimizer support compiler))
 
 (module chicken.compiler.c-platform
-    (default-declarations default-profiling-declarations
-     units-used-by-default
+    (;; Batch compilation defaults
+     default-declarations default-profiling-declarations
+     default-units default-imports default-syntax-imports
+
+     ;; Compiler flags
      valid-compiler-options valid-compiler-options-with-argument
 
      ;; For consumption by c-backend *only*
@@ -75,7 +78,10 @@
      (bound-to-procedure
        ##sys#profile-entry ##sys#profile-exit) ) ) )
 
-(define units-used-by-default '(library eval chicken-syntax))
+(define default-units '(library eval))
+(define default-imports '(scheme chicken))
+(define default-syntax-imports '(scheme chicken))
+
 (define words-per-flonum 4)
 
 (eq-inline-operator "C_eqp")
Trap