mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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.
This commit is contained in:
parent
a101c891e1
commit
3698f524d5
1 changed files with 6 additions and 2 deletions
|
@ -917,10 +917,14 @@ (define* (run-with-store store mval
|
|||
(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))))
|
||||
|
||||
|
||||
;;;
|
||||
|
|
Loading…
Reference in a new issue