From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Extensible G-Expressions Date: Tue, 17 Mar 2015 22:40:51 +0100 Message-ID: <87619zpajg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXzEQ-0003TX-3C for guix-devel@gnu.org; Tue, 17 Mar 2015 17:40:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXzEM-0000Sr-U6 for guix-devel@gnu.org; Tue, 17 Mar 2015 17:40:58 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXzEM-0000Sn-Rr for guix-devel@gnu.org; Tue, 17 Mar 2015 17:40:54 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:50860 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YXzEM-0001p3-4F for guix-devel@gnu.org; Tue, 17 Mar 2015 17:40:54 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Hello! I just merged the =E2=80=98wip-extensible-gexps=E2=80=99 in =E2=80=98master= =E2=80=99. This breaks the ABI, so make sure to run: make clean-go && make Before that, in a gexp like: #~(system* #$foo) =E2=80=98foo=E2=80=99 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=E2=80=99s possible to define =E2=80=9Ccompilers=E2=80=9D for new types high-level objects. A compiler i= s a procedure that compiles the high-level object to a derivation. There=E2=80=99s a compiler for packages and there=E2=80=99s one for origins= , but it=E2=80=99s possible to define compilers for, say, service configuration objects such as 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 =E2=80=9Cplumbing=E2=80=9D hidden in gexp compilers.) My main motivation for this, though, was to allow (guix packages) itself to use gexps (for instance in =E2=80=98patch-and-repack=E2=80=99), which wa= s not possible before because (guix gexps) depended on (guix packages). Comments & bug reports welcome! Ludo=E2=80=99.