From ad3729536ab4fe233b32017ac889f026a4bad43e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 11 Feb 2015 22:58:53 +0100 Subject: store: Add optional 'references' parameter to 'text-file'. * guix/store.scm (text-file): Add optional 'references' parameter. Pass it to 'add-text-to-store'. * doc/guix.texi (The Store Monad): Adjust accordingly. --- guix/store.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'guix/store.scm') diff --git a/guix/store.scm b/guix/store.scm index 02d84eb517..d88fb3ea54 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -890,11 +890,13 @@ (define (store-lower proc) ;; Store monad operators. ;; -(define* (text-file name text) +(define* (text-file name text + #:optional (references '())) "Return as a monadic value the absolute file name in the store of the file -containing TEXT, a string." +containing TEXT, a string. REFERENCES is a list of store items that the +resulting text file refers to; it defaults to the empty list." (lambda (store) - (values (add-text-to-store store name text '()) + (values (add-text-to-store store name text references) store))) (define* (interned-file file #:optional name -- cgit v1.2.3