diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-01-17 23:19:13 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-01-17 23:45:48 +0100 |
commit | 4e190c2803be09ea7d500087cb1a2e3efeb27ab5 (patch) | |
tree | 80ceecb89e1585ce138946bb48086be5f7201574 /guix/packages.scm | |
parent | 81a97734e04fa40412b2d44ccfae1b4796257648 (diff) | |
download | gnu-guix-4e190c2803be09ea7d500087cb1a2e3efeb27ab5.tar gnu-guix-4e190c2803be09ea7d500087cb1a2e3efeb27ab5.tar.gz |
store: Make '%store-monad' an alias for '%state-monad'.
* guix/store.scm (define-alias): New macro.
(%store-monad, store-return, store-bind): Define as aliases of the
corresponding %STATE-MONAD part.
(store-lift, text-file, interned-file): Return STORE as a second
value.
(run-with-store): Use 'run-with-state'.
* guix/packages.scm (set-guile-for-build, package-file): Return STORE as
a second value.
* guix/monads.scm: Remove part of the module commentary.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r-- | guix/packages.scm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index db14f9e0b8..de87681fcd 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -898,7 +898,7 @@ symbolic output name, such as \"out\". Note that this procedure calls code of derivations to GUILE, a package object." (lambda (store) (let ((guile (package-derivation store guile))) - (%guile-for-build guile)))) + (values (%guile-for-build guile) store)))) (define* (package-file package #:optional file @@ -917,9 +917,10 @@ cross-compilation target triplet." (let* ((system (or system (%current-system))) (drv (compute-derivation store package system)) (out (derivation->output-path drv output))) - (if file - (string-append out "/" file) - out)))) + (values (if file + (string-append out "/" file) + out) + store)))) (define package->derivation (store-lift package-derivation)) |