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
* Josh Barrett [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
On 2016-10-16 22:52, Josh Barrett wrote:
> [...]
> $ 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?
> [...]
Hello,
this cannot work because the compiler cannot
Oh. Thanks. Can you generate a .import without compiling your module?
On Sun, Oct 16, 2016, 17:08 Thomas Chust wrote:
> On 2016-10-16 22:52, Josh Barrett wrote:
> > [...]
> > $ csc -c foo.scm bar.scm
> >
> > Syntax error (import): cannot import from undefined module
> > ---
> > As
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
Hi Josh,
On 2016-10-16 21:13, Josh Barrett wrote:
> Oh. Thanks. Can you generate a .import without compiling your module?
You can use the "-analyze-only" flag:
$ csc -analyze-only -emit-import-library foo foo.scm
Note that you must specify the modules whose import libraries should be
Yes, but that would make it unfeasable to run the code without compiling,
which is kind of the point.
At this point, I'm thinking of just (cond-expand)ing a (load) in when I'm
running in csi. Lazy and inefficient? Yes. Effective? Also yes.
On Sun, Oct 16, 2016, 17:37 Thomas Chust
On 2016-10-16 23:13, Josh Barrett wrote:
> [...]
> Can you generate a .import without compiling your module?
> [...]
Hello Josh,
as far as I know, the .import.scm files are always generated as a side
effect of compiling a source file.
However, it may be possible to discard the primary results
On Sun, Oct 16, 2016 at 5:35 PM, Evan Hanson wrote:
You can use the "-analyze-only" flag:
>
>$ csc -analyze-only -emit-import-library foo foo.scm
>
If you use -check-syntax (or equivalently -P) then you can use -J to
generate all import libraries. This is what I