[Top][All Lists]

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

use-modules in gexps

From: Ricardo Wurmus
Subject: use-modules in gexps
Date: Sun, 02 Feb 2020 21:27:58 +0100
User-agent: mu4e 1.2.0; emacs 26.3

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

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)))
     (use-modules (my module))

we would do

     #$(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?


reply via email to

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