Hi all, I'm caught in the compiled vs. evaluated semantics...
In csi everything runs perfect, but in compiled mode I'm confuse why eval does not see most bindings. What am I missing? The crazy thing: in the attached file "bar" is bound only when compile as `csc tt.scm` (the "else" branch in the cond-expand) but unbound if compiled as `csc -Dv1 tt.scm`. The binding to bar however is correct in either case within "baz": (cond-expand (v1 (import foo)) (else (import (prefix foo foo:)) (define bar foo:bar))) (define (baz x) (bar x)) Scratching my head… This effects basically all the eggs. The only work around I found so far is to do the import/prefix trick in the file/unit exporting the binding. But that's tedious and probably not what I want to do. Thanks /Jörg
(module foo * (import scheme) (define (bar x) (+ x 2))) (cond-expand (v1 (import foo)) (else (import (prefix foo foo:)) (define bar foo:bar))) (define (baz x) (bar x)) (use extras) (format #t "baz: ~a\n" (eval '(baz 1))) (format #t "bar is unbound in compiled as `csc -Dv1 tt.scm` ~a\n" (eval '(bar 1))) (exit 0)
_______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
