~ chicken-core (chicken-5) 81e400fc2516b64d2c768fcd5e97772ecc8e5327


commit 81e400fc2516b64d2c768fcd5e97772ecc8e5327
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Tue Jan 16 23:01:57 2018 +1300
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Tue Jan 16 23:34:26 2018 +1300

    Make the "eval-modules" unit depend on "modules"
    
    The "eval-modules" unit needs to load the "modules" unit, since the
    `##sys#import-library-hook' procedure must be defined before it can be
    redefined in eval-modules.scm. So, we add a dependency on "eval" (since
    "eval" loads "modules", but must itself be loaded first).
    
    Also, drop the "eval" dependency from "modules", since "modules" must be
    loaded before "eval", and add a comment explaining why. This is similar
    to the relationship between "expand" and "modules", which already has a
    comment to explain it.
    
    Make "modules" use the "chicken-syntax" unit, since "modules" needs the
    various ##sys#-prefixed macro environments to be defined before it can
    refer to them when registering core modules. "chicken-syntax" will then
    load "expand" and "internal" as necessary.

diff --git a/eval-modules.scm b/eval-modules.scm
index 7f97d1cf..4083868f 100644
--- a/eval-modules.scm
+++ b/eval-modules.scm
@@ -25,7 +25,8 @@
 
 
 (declare
-  (unit eval-modules))
+  (unit eval-modules)
+  (uses eval))
 
 (include "common-declarations.scm")
 
diff --git a/eval.scm b/eval.scm
index b47407e7..f819999b 100644
--- a/eval.scm
+++ b/eval.scm
@@ -27,7 +27,7 @@
 
 (declare
   (unit eval)
-  (uses chicken-syntax expand internal modules)
+  (uses modules)
   (not inline ##sys#alias-global-hook ##sys#user-read-hook ##sys#syntax-error-hook))
 
 #>
diff --git a/modules.scm b/modules.scm
index 6606c35c..b02717cb 100644
--- a/modules.scm
+++ b/modules.scm
@@ -24,9 +24,12 @@
 ; POSSIBILITY OF SUCH DAMAGE.
 
 
+;; this unit needs the "eval" unit, but must be initialized first, so it doesn't
+;; declare "eval" as used - if you use "-explicit-use", take care of this.
+
 (declare
   (unit modules)
-  (uses eval expand internal)
+  (uses chicken-syntax)
   (disable-interrupts)
   (fixnum)
   (not inline ##sys#alias-global-hook)
diff --git a/tests/scrutiny.expected b/tests/scrutiny.expected
index f4ec7931..44afef85 100644
--- a/tests/scrutiny.expected
+++ b/tests/scrutiny.expected
@@ -43,10 +43,10 @@ Warning: at toplevel:
   assignment of value of type `fixnum' to toplevel variable `scheme#car' does not match declared type `(forall (a) (procedure scheme#car ((pair a *)) a))'
 
 Warning: at toplevel:
-  expected a single result in `let' binding of `g127', but received 2 results
+  expected a single result in `let' binding of `g19', but received 2 results
 
 Warning: at toplevel:
-  in procedure call to `g127', expected a value of type `(procedure () *)' but was given a value of type `fixnum'
+  in procedure call to `g19', expected a value of type `(procedure () *)' but was given a value of type `fixnum'
 
 Note: in toplevel procedure `foo':
   expected a value of type boolean in conditional, but was given a value of type `(procedure bar () *)' which is always true:
Trap