Of course I can. Hopefully, it will help:
---
$ cat foo.scm
(declare (unit foo))

(module foo (quux)
  (import chicken scheme)
  (define (quux)
    (display "quux")))

$ cat bar.scm
(declare (unit bar))
(declare (uses foo))

(module bar (baz)
  (import chicken scheme)
  (import foo)
  (define (baz)
    (quux)
    (display "baz\n")))

$ csc -c foo.scm bar.scm

Syntax error (import): cannot import from undefined module
---
As I understand it, this should work, but it obviously doesn't. Does
anybody know why?

On Sun, Oct 16, 2016, 16:17 Christian Kellermann <ck...@pestilenz.org>
wrote:

> * Josh Barrett <jbarrett...@gmail.com> [161016 21:57]:
> > I really like modules. I tend to use several per project, if not one per
> > file. However, when it comes time to compile an executable, I'd rather
> not
> > have 50 random .so files cluttering up the place. I've tried using
> > compilation units (which seems to be the endorsed method of compiling
> > multiple files together), but I can't get them to work with modules.
>
> Those two concepts don't contradict each other, you can use both.
>
> Can you show us a simple example of your use case that does not work?
>
> Kind regards,
>
> Christian
>
>
> --
> May you be peaceful, may you live in safety, may you be free from
> suffering, and may you live with ease.
>
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to