guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice for importing things in a Guile module


From: Zelphir Kaltstahl
Subject: Re: Advice for importing things in a Guile module
Date: Sun, 24 Dec 2023 16:19:45 +0000

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]