From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 13 22:51:52 2022 Received: (at submit) by debbugs.gnu.org; 14 Jan 2022 03:51:52 +0000 Received: from localhost ([127.0.0.1]:35141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8Dd2-0002ZV-BV for submit@debbugs.gnu.org; Thu, 13 Jan 2022 22:51:52 -0500 Received: from lists.gnu.org ([209.51.188.17]:36840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8BVL-0004ZJ-9R for submit@debbugs.gnu.org; Thu, 13 Jan 2022 20:35:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8BVJ-0006Kx-P1 for bug-guile@gnu.org; Thu, 13 Jan 2022 20:35:46 -0500 Received: from w4.tutanota.de ([81.3.6.165]:42740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8BVI-00069M-7z for bug-guile@gnu.org; Thu, 13 Jan 2022 20:35:45 -0500 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id 669E9106014E for ; Fri, 14 Jan 2022 01:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1642124141; s=s1; d=tuta.io; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=Bk8YGsYpSk1E3u0s5A+U12v8DtUBujdR5BEJ7stSino=; b=4WwNZgh1JnmZJ9m4ixx0NdsbBPKB+ea26R5zP0nLhiNGhdfMnyJaSUz9AwIs6KHC 4mjw0q8EinYP/+7CKD1rZ1uL3PJjjca3m2nDKp5b2zDJYfMwt8E8HuJBPW3I+mM9zdo JMRiQXssnHnQylP9/GpA1kQlq/M+eUjbHRdJ+GQp4TD+9F8xLsSE6PBq5rAUvL0SzCh zKacnIObdjN+Dv+9G1TWw3Y1helP/Lz3SkfDLLiLDCE+pciQzJzRqz3s8u+kKn16+zl NBzhxs3TdxYCgiw2R7zUIvP/3PwRZPlKdEA1rQQcl4pYDX0A35l+keVhxpkhAyWQggL lDfYfnqbgg== Date: Fri, 14 Jan 2022 02:35:41 +0100 (CET) From: zacnix@tuta.io To: bug-guile@gnu.org Message-ID: Subject: Guile 3.0.7.14-118ee re-export bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=81.3.6.165; envelope-from=zacnix@tuta.io; helo=w4.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 13 Jan 2022 22:51:51 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) There's a difference in exports depending on if you use use-modules vs reso= lve-module. If a module re-exports a function and the module is imported using use-modu= les the re-export seems to work as one would expect as the documentation sa= ys, the cdr of the pair is the member of the public interface.=20 If you use a resolve-module and then try to pull out the cdr using module-r= ef it fails with a "No variable named...." If you try module-variable you s= imply get a #f. If you try doing the module-ref with the original name then= it pulls it through just fine. Is this the expected behavior? As the user I would've expected no differenc= e between use modules and the resolve-module method. Thank you. #! guiles/main.scm (add-to-load-path "$LOC") ;(use-modules (guiles two)) (define m (resolve-module '(guiles two))) (define no-print (module-ref m 'no-print)) (display m) (display "\n") (display no-print) !# #! guiles/one.scm (define-module (guiles one) =C2=A0 #:export (print)) (define (print str) =C2=A0 (display str)) !# #! guiles/two.scm (define-module (guiles two) =C2=A0 #:use-module (guiles one) =C2=A0 #:re-export ((print . no-print))) !#