diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-01-21 19:31:10 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-01-21 23:18:57 +0100 |
| commit | 3698f524d5d1777aebec653c444783800a70417a (patch) | |
| tree | db2aadd59a06174d486409a9680fc4df49200d08 | |
| parent | a101c891e1164ecb30145c798f441c285ec139ad (diff) | |
store: Change 'run-with-store' to return a single value.
* guix/store.scm (run-with-store): Wrap 'run-with-state' in
'call-with-values'. Return only the first value.
| -rw-r--r-- | guix/store.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/store.scm b/guix/store.scm index 63425b30231..a12abc86711 100644 --- a/guix/store.scm +++ b/guix/store.scm | |||
| @@ -917,10 +917,14 @@ permission bits are kept." | |||
| 917 | (guile-for-build (%guile-for-build)) | 917 | (guile-for-build (%guile-for-build)) |
| 918 | (system (%current-system))) | 918 | (system (%current-system))) |
| 919 | "Run MVAL, a monadic value in the store monad, in STORE, an open store | 919 | "Run MVAL, a monadic value in the store monad, in STORE, an open store |
| 920 | connection." | 920 | connection, and return the result." |
| 921 | (parameterize ((%guile-for-build guile-for-build) | 921 | (parameterize ((%guile-for-build guile-for-build) |
| 922 | (%current-system system)) | 922 | (%current-system system)) |
| 923 | (run-with-state mval store))) | 923 | (call-with-values (lambda () |
| 924 | (run-with-state mval store)) | ||
| 925 | (lambda (result store) | ||
| 926 | ;; Discard the state. | ||
| 927 | result)))) | ||
| 924 | 928 | ||
| 925 | 929 | ||
| 926 | ;;; | 930 | ;;; |
