On 2021-12-01 11:00 +0100, Linus Björnstam wrote:
> This is in line with the limitations of guile's R6RS implementation. I
> think this is a long standing, low priority bug. It has to do with the
> expansion of library (or define-library in this case) not properly
> resetting the current module.
>
In experiments with using guild for byte compilation
in LilyPond, I am hitting what seems like a bug. When
a variable is not defined declaratively in a way that
makes the compiler aware of it, the module it is
defined in can compile, but modules using it cannot.
Here is an example. fail.scm
Hi Sam!
I am not a maintainer , nor a very proficient guile hacker, but I do have some
input.
This is in line with the limitations of guile's R6RS implementation. I think
this is a long standing, low priority bug. It has to do with the expansion of
library (or define-library in this case) not
Guile is unable to handle more than one define-library per file. For
example, this is "mylibs.sld", which contains two define-library:
(define-library (example mylib)
(import (scheme base))
(export f)
(begin
(define (f x)
(+ x 1
(define-library (example main)
(import