From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zelphir Kaltstahl Newsgroups: gmane.lisp.guile.user Subject: Advice for importing things in a Guile module Date: Thu, 29 Jun 2023 09:35:45 +0000 Message-ID: <070b2158-1c3c-32fa-4291-f7835f3a46f7@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18543"; mail-complaints-to="usenet@ciao.gmane.io" To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Jun 29 11:36:40 2023 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 1qEo4u-0004be-30 for guile-user@m.gmane-mx.org; Thu, 29 Jun 2023 11:36:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEo4G-0006iU-MX; Thu, 29 Jun 2023 05:36:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEo4C-0006iG-Tl for guile-user@gnu.org; Thu, 29 Jun 2023 05:35:57 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEo46-0001J9-2N for guile-user@gnu.org; Thu, 29 Jun 2023 05:35:52 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A2601240029 for ; Thu, 29 Jun 2023 11:35:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1688031346; bh=Ruaa0sSkSjurUjc3uNKj8SNFfIzv5QjPTl4ook5lMRY=; h=Message-ID:Date:MIME-Version:From:To:Subject:From; b=ifL31m1M+Rx4S/Q+UXq5s0H+eUjpgfk8nrIZNrnHF+T3cvsgpvgw8W/hC1cpHY+oP bZ2hLJh3kT+UiEBweDFEbEmZZSUz4TGZGxpOjwgWAe/Z+uNDrA8MEujvscz2cfb50e 08EqcMd625pyM010T/w7EAM0OTLUAelbbMCYFDTUC9k4+/ThENjfrjG8qpw6ORojuI QVavouRG/OV/8bVQFyy3fDY81zNfEgqGynW7dbHsa8JU4ViPRrD2Tlplnv7Trn0Xdr uQ+SfpCwntNRjF7gBIJyV4iai8IIOXdgvlZKY8kT6vjLLHSrYTxpiodRyVxODhvizD HIcnlC5pV3P5g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QsCxG1PlQz6twZ for ; Thu, 29 Jun 2023 11:35:46 +0200 (CEST) Content-Language: en-US Received-SPF: pass client-ip=185.67.36.65; envelope-from=zelphirkaltstahl@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 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-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19083 Archived-At: Hello Guile Users! Due to https://lists.gnu.org/archive/html/guile-user/2023-06/msg00020.html I am currently relying on `define-module', instead of `library'. However, I have not found a way to do the `(import (except (something) excluded-binding ...))' thing. So I have imports looking like the following example: ~~~~ (define-module (encode) #:use-module (rnrs base) #:use-module ((guile) #:select (lambda* λ)) ;; SRFI 1: list procedures #:use-module ((srfi srfi-1) #:select (drop take first second third)) ;; and more stuff here ... ) ~~~~ However, this results in warnings when loading (load "filename.scm") the module, such as: ~~~~ WARNING: (encode): `map' imported from both (rnrs base) and (srfi srfi-1) ~~~~ What can I do to use everything from rnrs base, except where things clash and avoid the warnings? Is there a way with `define-module' to import everything except something specific? Currently, it seems to me that `define-module' is more flexible, when it comes to re-exporting things, but `library' more flexible when importing things. Best regards, Zelphir -- repositories:https://notabug.org/ZelphirKaltstahl