unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Guile User <guile-user@gnu.org>
Subject: Advice for importing things in a Guile module
Date: Thu, 29 Jun 2023 09:35:45 +0000	[thread overview]
Message-ID: <070b2158-1c3c-32fa-4291-f7835f3a46f7@posteo.de> (raw)

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


             reply	other threads:[~2023-06-29  9:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29  9:35 Zelphir Kaltstahl [this message]
2023-12-24 16:19 ` Advice for importing things in a Guile module Zelphir Kaltstahl
2023-12-25 23:23 ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=070b2158-1c3c-32fa-4291-f7835f3a46f7@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).