~ chicken-core (chicken-5) a2f3fb1209301c78c518f91a6691be25a2fad8ec


commit a2f3fb1209301c78c518f91a6691be25a2fad8ec
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Sat Jun 18 22:37:52 2011 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Sat Jun 18 22:39:06 2011 +0200

    cherry-picked fix for #578

diff --git a/eval.scm b/eval.scm
index 6fdc3bfd..2499052b 100644
--- a/eval.scm
+++ b/eval.scm
@@ -698,9 +698,8 @@
 			     (let loop ([ids (##sys#strip-syntax (cadr x))])
 			       (if (null? ids)
 				   '(##core#undefined)
-				   (let-values ([(exp _) 
-						 (##sys#do-the-right-thing
-						  (car ids) #f imp?)])
+				   (let-values (((exp _) 
+						 (##sys#do-the-right-thing (car ids) #f imp?)))
 				     `(##core#begin ,exp ,(loop (cdr ids))) ) ) )
 			     e #f tf cntr se) ) ]
 
@@ -1243,7 +1242,7 @@
 		 (if comp?
 		     `(##core#declare (uses ,id))
 		     `(##sys#load-library ',id #f) )
-		 impid #t)
+		 impid #f)
 		#t) )
 	      ((memq id ##sys#explicit-library-modules)
 	       (let* ((info (##sys#extension-information id 'require-extension))
diff --git a/tests/syntax-tests.scm b/tests/syntax-tests.scm
index ca80ec87..82aa7d53 100644
--- a/tests/syntax-tests.scm
+++ b/tests/syntax-tests.scm
@@ -914,3 +914,7 @@
   (set-cdr! a a)
   `(1 ,@a))
 
+;; #578: "use" with import-specifier has no effect for internal modules on csi's top-level
+
+(use (prefix srfi-1 list-))
+take
Trap