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: Re: Advice for importing things in a Guile module Date: Sun, 24 Dec 2023 16:19:45 +0000 Message-ID: References: <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="24419"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Dec 24 17:20:29 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 1rHRDI-0006A1-QS for guile-user@m.gmane-mx.org; Sun, 24 Dec 2023 17:20:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHRCl-0003W7-Ci; Sun, 24 Dec 2023 11:19:55 -0500 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 1rHRCj-0003Vt-SS for guile-user@gnu.org; Sun, 24 Dec 2023 11:19:53 -0500 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 1rHRCg-0000zH-0Z for guile-user@gnu.org; Sun, 24 Dec 2023 11:19:53 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 07E4A240027 for ; Sun, 24 Dec 2023 17:19:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1703434787; bh=0ZRvzzgO3Lev9jp9gxRQvb4zNN0i3yAo/SKNRbG71oo=; h=Message-ID:Date:MIME-Version:Subject:To:From: Content-Transfer-Encoding:From; b=Cwc5vegbWEriKnHMmxzdQvFohyQrTv65cbTPs7Af8dYSIqLIAkdSsakmWbrQe5Q+X uFDGJ2UbZqbJ9n8McHgJcAoFCNClnfFgIM67I1GrsnbmUnCV1FRZg0s8XNIDVyRxF8 uBBeAp7BL7iUZ+oC9rAg5VYPEm0IXQlqB2+dPsDoTHmmR+iRqXHo+rGbuO54/tp/QB krVPY3ppDkxU+neKMRSJt2jyQmgscXzEoJeHeIFkyRpoxZr7ulKEp85BwTRsQp/+yF MCqUkOBL1fj1y19cejImtyUWOCjZYOYNbSPDIDJAhSmRXusfgA1PijPf3aK9qzxLjZ CcjNzq4wxcjgA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SymTG45Ghz9rxB for ; Sun, 24 Dec 2023 17:19:46 +0100 (CET) Content-Language: en-US In-Reply-To: <070b2158-1c3c-32fa-4291-f7835f3a46f7@posteo.de> Received-SPF: pass client-ip=185.67.36.65; envelope-from=zelphirkaltstahl@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, 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-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:19389 Archived-At: Hello Guile Users! Does anyone know more about this? I wish you all a merry Christmas or other holiday you might be celebrating. Zelphir On 6/29/23 11:35, Zelphir Kaltstahl wrote: > 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