guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: store: Change 'run-with-store' to return a single value.


From: Ludovic Courtès
Subject: 02/02: store: Change 'run-with-store' to return a single value.
Date: Wed, 21 Jan 2015 22:19:35 +0000

civodul pushed a commit to branch master
in repository guix.

commit 3698f524d5d1777aebec653c444783800a70417a
Author: Ludovic Courtès <address@hidden>
Date:   Wed Jan 21 19:31:10 2015 +0100

    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.
---
 guix/store.scm |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/store.scm b/guix/store.scm
index 63425b3..a12abc8 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -917,10 +917,14 @@ permission bits are kept."
                          (guile-for-build (%guile-for-build))
                          (system (%current-system)))
   "Run MVAL, a monadic value in the store monad, in STORE, an open store
-connection."
+connection, and return the result."
   (parameterize ((%guile-for-build guile-for-build)
                  (%current-system system))
-    (run-with-state mval store)))
+    (call-with-values (lambda ()
+                        (run-with-state mval store))
+      (lambda (result store)
+        ;; Discard the state.
+        result))))
 
 
 ;;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]