aboutsummaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-02 22:47:36 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-02 23:41:13 +0200
commitdcb95c1fc936d74dfdf84b7e59eff66cb99c5a63 (patch)
tree51c30f9ab714c6fbd300e1a3c4dac25902b94af8 /guix/store.scm
parent7b9ac883ea62a816afbfa747c1377dc273c15c20 (diff)
downloadgnu-guix-dcb95c1fc936d74dfdf84b7e59eff66cb99c5a63.tar
gnu-guix-dcb95c1fc936d74dfdf84b7e59eff66cb99c5a63.tar.gz
monads: Add a template and specialization mechanism for monadic procedures.
* guix/monads.scm (%templates, %template-instances): New variables. (register-template!, register-template-instance!): New procedures. (template-directory, define-template): New macro. (foldm, sequence, anym): Define using 'define-template'. Avoid replace ellipses with dots. (mapm): Likewise, but do not use 'foldm'. * guix/store.scm: Add 'template-directory' invocation.
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 683f071a83..8e7f09678e 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1237,6 +1237,10 @@ be used internally by the daemon's build hook."
(define-alias store-return state-return)
(define-alias store-bind state-bind)
+;; Instantiate templates for %STORE-MONAD since it's syntactically different
+;; from %STATE-MONAD.
+(template-directory instantiations %store-monad)
+
(define (preserve-documentation original proc)
"Return PROC with documentation taken from ORIGINAL."
(set-object-property! proc 'documentation