unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Marc Coquand <marc@coquand.email>
To: Felix Lechner <felix.lechner@lease-up.com>
Cc: help-guix@gnu.org
Subject: Re: With imported functions instead of module?
Date: Thu, 12 Dec 2024 17:45:55 +0200	[thread overview]
Message-ID: <87msh0nbv0.fsf@coquand.email> (raw)
In-Reply-To: <877c85m1vz.fsf@lease-up.com> (message from Felix Lechner on Thu, 12 Dec 2024 06:06:40 -0800)

Hmm,

Well essentially what I'm looking for is an easier way of importing
procedures within G-expressions.

So basically if I have

(define (my-procedure args)
   ...)

(define notify-mail-gexp
  (with-imported-modules
   '((guix build utils)
   ...)
   #~(begin
   (my-procedure)))

I'm wondering if there is a way to call my-procedure without moving the
definition to a separate module and importing that module in the
"with-imported-modules" 

-- 
Marc

On Thu, Dec 12 2024, Felix Lechner wrote:

> Hi Marc,
>
> On Thu, Dec 12 2024, Marc Coquand wrote:
>
>> Is there a way to import functions instead of entire modules?
>
> Are you looking for something more than the selective import of module
> bindings via '@'? [1]
>
> Kind regards
> Felix
>
> P.S. In Guile, the preferred term for functions may be procedures.
>
> [1] https://www.gnu.org/software/guile/manual/html_node/Using-Guile-Modules.html#index-_0040


  reply	other threads:[~2024-12-12 15:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 10:52 With imported functions instead of module? Marc Coquand
2024-12-12 14:06 ` Felix Lechner via
2024-12-12 15:45   ` Marc Coquand [this message]
2024-12-12 20:44     ` Felix Lechner via
2024-12-13 12:08       ` Marc Coquand

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://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87msh0nbv0.fsf@coquand.email \
    --to=marc@coquand.email \
    --cc=felix.lechner@lease-up.com \
    --cc=help-guix@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).