unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Martin Becze <mjbecze@riseup.net>
To: guile-user@gnu.org, "Ludovic Courtès" <ludo@gnu.org>
Subject: Re: Loading multiple versions of a Module
Date: Sun, 03 May 2020 16:13:49 -0500	[thread overview]
Message-ID: <1039CA4E-A802-40D9-B2C1-66BB2840058E@riseup.net> (raw)
In-Reply-To: <87a72ozuch.fsf@gnu.org>

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" <ludo@gnu.org> wrote:
>Hi Martin,
>
>Martin Becze <mjbecze@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.


  reply	other threads:[~2020-05-03 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 22:28 Loading multiple versions of a Module Martin Becze
2020-05-03 19:33 ` Ludovic Courtès
2020-05-03 21:13   ` Martin Becze [this message]
2020-05-04  8:23     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1039CA4E-A802-40D9-B2C1-66BB2840058E@riseup.net \
    --to=mjbecze@riseup.net \
    --cc=guile-user@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).