Megatest

mod3.scm at [235f4e077d]
Login

File testeval/mod3.scm artifact 9eca8b9972 part of check-in 235f4e077d



(declare (uses mod1))
(declare (uses mod2))

(module mod3
	*

(import scheme
	chicken.eval
	mod1 mod2 all)

(define (vars) ;; 
  (- *mod2somevar* *mod1somevar*))

(define (mod1ok)
  (let ((modallenv (module-environment 'all)))
    (eval '*mod1somevar* modallenv)))

(define (mod2ok)
   (let ((modallenv (module-environment 'all)))
    (eval '*mod2somevar* modallenv)))
			 
(define (addsome)
  (let ((modallenv (module-environment 'all)))
    (eval '(+ *mod1somevar* *mod2somevar*) modallenv)))

)

(import mod3)

(print "vars: "(vars))
(print "mod1ok: "(mod1ok))
(print "mod2ok: "(mod2ok))
(print "addsome: "(addsome)) ;; => 5555