diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-01-14 14:25:58 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-01-14 14:25:58 +0100 |
commit | 023d9892c0411adb523e6bc8337be3e7e94e606f (patch) | |
tree | d19588bf31c79f6d875c3f0df7b683fc38d05860 /guix/store.scm | |
parent | e87f0591f3117ed61285f33c7cc3548f72e551ad (diff) | |
download | gnu-guix-023d9892c0411adb523e6bc8337be3e7e94e606f.tar gnu-guix-023d9892c0411adb523e6bc8337be3e7e94e606f.tar.gz |
store: Add 'store-lower'.
* guix/store.scm (store-lower): New procedure.
* tests/store.scm ("store-lower"): New test.
Diffstat (limited to 'guix/store.scm')
-rw-r--r-- | guix/store.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/store.scm b/guix/store.scm index d3e94625a7..82ed94bbc1 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -99,6 +99,7 @@ store-bind store-return store-lift + store-lower run-with-store %guile-for-build text-file @@ -881,6 +882,12 @@ in the store monad." (procedure-property proc 'documentation)) result) +(define (store-lower proc) + "Lower PROC, a monadic procedure in %STORE-MONAD, to a \"normal\" procedure +taking the store as its first argument." + (lambda (store . args) + (run-with-store store (apply proc args)))) + ;; ;; Store monad operators. ;; |