gexp: Separate "compilers" for origins and packages from the core.
authorLudovic Courtès <ludo@gnu.org>
Sun, 15 Mar 2015 22:27:34 +0000 (23:27 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 17 Mar 2015 21:25:54 +0000 (22:25 +0100)
commitbcb132876370fc2e51ea9ba137b92932e9e956e4
tree26414ee4c7cd2ee34b6e830e3768f475e2c8e16c
parenta482cfdcaee493a0ce796b4cd2059c46fce6d14d
gexp: Separate "compilers" for origins and packages from the core.

* guix/gexp.scm (<gexp-compiler>): New record type.
  (%gexp-compilers): New variable.
  (register-compiler!, lookup-compiler): New procedures.
  (define-gexp-compiler): New macro.
  (origin-compiler, package-compiler): New compilers.
  (lower-inputs): Remove clauses for 'origin?' and 'package?'.  Add
  clause with 'lookup-compiler' instead.
  (lower-references): Likewise.
  (gexp-inputs)[add-reference-inputs]: Likewise.
  (gexp->sexp)[reference->sexp]: Likewise.
guix/gexp.scm