gexp: Compilers can now provide an "expander".
authorLudovic Courtès <ludo@gnu.org>
Fri, 9 Sep 2016 20:43:41 +0000 (22:43 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 9 Sep 2016 21:54:43 +0000 (23:54 +0200)
commitebdfd776f4504c456d383ee8afa59fc6fdfc6756
tree49cdbe2d4e8c2f272984698679993cac7d1c950b
parentb5fed903c44b27c61935a51ee1b4b866500f53c2
gexp: Compilers can now provide an "expander".

* guix/gexp.scm (<gexp-compiler>)[expand]: New field.
(default-expander, lookup-expander): New procedures.
(define-gexp-compiler): Add second pattern to allow for the definition
of both a compiler and an expander.
(gexp->sexp)[reference->sexp]: Call 'lookup-expander' and use its
result.
guix/gexp.scm