Received: (at submit) by debbugs.gnu.org; 2 Dec 2015 16:31:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 11:31:53 2015 Received: from localhost ([127.0.0.1]:36405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1a4AJs-0007vl-Ts for submit <at> debbugs.gnu.org; Wed, 02 Dec 2015 11:31:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35302) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from <sph@HIDDEN>) id 1a4AJY-0007us-Iq for submit <at> debbugs.gnu.org; Wed, 02 Dec 2015 11:31:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <sph@HIDDEN>) id 1a4AJW-0002lu-9a for submit <at> debbugs.gnu.org; Wed, 02 Dec 2015 11:31:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <sph@HIDDEN>) id 1a4AJW-0002lq-7P for submit <at> debbugs.gnu.org; Wed, 02 Dec 2015 11:31:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <sph@HIDDEN>) id 1a4AJV-0000UT-Hp for bug-guile@HIDDEN; Wed, 02 Dec 2015 11:31:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <sph@HIDDEN>) id 1a4AJS-0002ke-0f for bug-guile@HIDDEN; Wed, 02 Dec 2015 11:31:29 -0500 Received: from mout01.posteo.de ([185.67.36.65]:50857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <sph@HIDDEN>) id 1a4AJR-0002k5-R4 for bug-guile@HIDDEN; Wed, 02 Dec 2015 11:31:25 -0500 Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id AFFB820999 for <bug-guile@HIDDEN>; Wed, 2 Dec 2015 17:31:23 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3p9m5R38FRz5vND for <bug-guile@HIDDEN>; Wed, 2 Dec 2015 17:31:23 +0100 (CET) To: bug-guile@HIDDEN From: tantalum <sph@HIDDEN> Subject: public-interface of r6rs-library exports import instead of new definition Message-ID: <565F1CDA.9010907@HIDDEN> Date: Wed, 2 Dec 2015 16:31:22 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.0 (----) when using resolve-interface to resolve a r6rs-library module, i found that when the r6rs-library defines and exports a procedure with the same name as a procedure that it imports, only the imported procedure will be available in the interface module. this does not seem to happen with modules that are defined with "define-module". example file "test-module.scm" with the following content: ---- (library (test-module) (export zero?) (import (rnrs base)) (define (zero? a) "defined in test-module")) ---- file "test.scm" with the following content: ---- (set! %load-path (list (getcwd))) (define module (resolve-interface (quote (test-module)))) (define imported-zero? (module-ref module (quote zero?))) (display (imported-zero? 0)) (newline) ---- when executing "guile test.scm", the following is written to the standard output: ---- #t ---- i would expect to see "defined in test-module" instead. i do not suppose this is desired behaviour because the reference manual says r6rs-libraries and guile modules are equivalent. the following in "test-module.scm" produces the expected result: ---- (define-module (test-module)) (define (zero? a) "defined in test-module") (export zero?) ---- the tests were made with a recent guile 2.1.1 build (which by the way displays "Copyright (C) 2014" with "-v" and on the repl)
tantalum <sph@HIDDEN>
:bug-guile@HIDDEN
.
Full text available.bug-guile@HIDDEN
:bug#22076
; Package guile
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.