all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* use-modules in gexps
@ 2020-02-02 20:27 Ricardo Wurmus
  2020-02-05 14:19 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2020-02-02 20:27 UTC (permalink / raw)
  To: Guix-devel

Hi Guix,

I just watched the excellent FOSDEM talk about G-expressions by Chris
Marusich.  One person asked at the end about why it is necessary to use
“with-imported-modules” when inside of the G-expression “use-modules” is
used.

I wondered if perhaps we could add a G-expression compiler for module
imports, so that instead of

(with-imported-modules (source-module-closure '((my module)))
  #~(begin
     (use-modules (my module))
     …))

we would do

  #~(begin
     #$(use-modules (my module))
     …)

which would have the effect of adding (my module) — or the module
closure – to the list of modules needed by the current G-expression.

Can a G-expression compiler help accumulate state (e.g. by making
G-expressions values in the state monad) or can it only be compiled down
to a value at the current location?

--
Ricardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-07 21:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-02 20:27 use-modules in gexps Ricardo Wurmus
2020-02-05 14:19 ` Ludovic Courtès
2020-02-05 15:18   ` Ricardo Wurmus
2020-02-07 21:31     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.