Would this be something that is open to change? Would there be an objections to changing this behavior? I think this problem will hurt modularity and growth of the guile ecosystem in the future. From a cursory look at the code I don't see any technical reason for this.
On May 3, 2020 2:33:50 PM CDT, "Ludovic Courtès" <l...@gnu.org> wrote: >Hi Martin, > >Martin Becze <mjbe...@riseup.net> skribis: > >> Guile currently doesn't allow loading multiple versions of a Module. For >> example this will not work. >> >> --- start.scm >> (import (a) (b (2))) >> (helloA) >> (helloB) >> >> --- a/a.scm >> (library (a) >> (export helloA) >> (import (rnrs) (b (1))) >> (define helloA (lambda () >> (display "hello from A1\n") >> (helloB)))) >> >> --- b1/b.scm >> (library (b (1)) >> (export helloB) >> (import (rnrs))) >> >> (define helloB (lambda () >> (display "hello from B1\n"))) >> >> --- b2/b.scm >> (library (b (2)) >> (export helloB) >> (import (rnrs)) >> (define helloB (lambda () (display "hello from B2\n")))) >> >> Is there are away to get around this? What is the reason for this >> behavior? Is it part of r6rs or something? > >I’m not sure what R6RS says, but Guile supports only one instance of a >module with a given name at run time. > >The only way around it would be to give the two modules different names. > >HTH, >Ludo’. > > -- Sent from my Android device with K-9 Mail. Please excuse my brevity.