unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Extensible G-Expressions
@ 2015-03-17 21:40 Ludovic Courtès
  0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2015-03-17 21:40 UTC (permalink / raw)
  To: guix-devel

Hello!

I just merged the ‘wip-extensible-gexps’ in ‘master’.  This breaks the
ABI, so make sure to run:

  make clean-go && make

Before that, in a gexp like:

  #~(system* #$foo)

‘foo’ had to be either a package, an origin, a derivation, or a
serializable Scheme object such as a string or number.

Now the gexp mechanism is extensible: it’s possible to define
“compilers” for new types high-level objects.  A compiler is a procedure
that compiles the high-level object to a derivation.

There’s a compiler for packages and there’s one for origins, but it’s
possible to define compilers for, say, service configuration objects
such as <nscd-configuration> and whatnot.  This should make it possible
to shift from an explicit style to a more declarative style (the service
procedures could become normal instead of monadic, for instance, with
the “plumbing” hidden in gexp compilers.)

My main motivation for this, though, was to allow (guix packages) itself
to use gexps (for instance in ‘patch-and-repack’), which was not
possible before because (guix gexps) depended on (guix packages).

Comments & bug reports welcome!

Ludo’.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-17 21:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17 21:40 Extensible G-Expressions Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

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).