Re: [Chicken-users] How to use units and modules together?
That did the trick. Thanks Evan. On Sun, Apr 30, 2017 at 9:32 PM, Evan Hansonwrote: Hi Matt, You're very close. The only step you missed was emitting an import file for your "other" module so that csc knows what to do when you "(import other)" in main.scm. This should work (note "-j other"): csc other.scm -c -j other csc other.o main.scm Cheers, Evan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] How to use units and modules together?
Hi Matt, You're very close. The only step you missed was emitting an import file for your "other" module so that csc knows what to do when you "(import other)" in main.scm. This should work (note "-j other"): csc other.scm -c -j other csc other.o main.scm Cheers, Evan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] How to use units and modules together?
Is using units and modules together supported? I'd like to use modules but don't want to have to install them as eggs. I have tried this: =main.scm= (declare (uses other)) (import other) (other-print "Hello") ==end =other.scm= (declare (unit other)) (module other (other-print) (import scheme chicken) (define (other-print arg) (print "Got: " arg))) (import other) ==end== Compile like this: csc other.scm -c csc other.o main.scm === It won't let me import other: Syntax error (import): cannot import from undefined module other Expansion history: (##core#begin (import other)) (import other)<-- However if I comment out the (import other) I can call other-print like this: (other#other-print "Hello") and it works. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users