From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Newsgroups: gmane.lisp.guile.user Subject: Re: Loading multiple versions of a Module Date: Sun, 03 May 2020 21:33:50 +0200 Message-ID: <87a72ozuch.fsf@gnu.org> References: <85ade4f5-7bee-6fb1-6f64-0278e186e6e0@riseup.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="84986"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: guile-user@gnu.org Cancel-Lock: sha1:qz6YZrmy/wWcdw68+B0heCiNhQo= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun May 03 21:34:14 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVKNR-000M0h-Ix for guile-user@m.gmane-mx.org; Sun, 03 May 2020 21:34:13 +0200 Original-Received: from localhost ([::1]:52866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVKNQ-0006jx-LL for guile-user@m.gmane-mx.org; Sun, 03 May 2020 15:34:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVKNH-0006jm-2X for guile-user@gnu.org; Sun, 03 May 2020 15:34:03 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:45620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVKNG-0005wN-0j for guile-user@gnu.org; Sun, 03 May 2020 15:34:02 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jVKN9-000LjS-Lh for guile-user@gnu.org; Sun, 03 May 2020 21:33:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 =?utf-8?Q?Flor=C3=A9al?= an 228 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Received-SPF: pass client-ip=159.69.161.202; envelope-from=guile-user@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/03 15:33:56 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16419 Archived-At: Hi Martin, Martin Becze 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’.