aboutsummaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-04-27 23:19:11 +0200
committerLudovic Courtès <ludo@gnu.org>2014-04-28 23:41:12 +0200
commitada3df03e33f686467ce4e887381e8753a3e603b (patch)
tree2843b5569e78938c3259c2bdb390518adf157012 /doc/guix.texi
parent0c21d92b1cb0f7fa2b2d43cae1d84d32ccfc1393 (diff)
downloadpatches-ada3df03e33f686467ce4e887381e8753a3e603b.tar
patches-ada3df03e33f686467ce4e887381e8753a3e603b.tar.gz
monads: Hide 'derivation-expression' and 'lower-inputs'.
* guix/monads.scm: Unexport 'lower-inputs' and 'derivation-expression'. (text-file*): Add comment about the switch to 'gexp->derivation'. (lower-inputs): Add comment about its doom. (derivation-expression): Likewise. * guix/gexp.scm (lower-inputs*): Rename to... (lower-inputs): ... this. Update callers. * tests/monads.scm (derivation-expression): New procedure. * doc/guix.texi (The Store Monad): Use 'gexp->derivation' instead of 'derivation-expression'. Remove documentation of 'derivation-expression'. * guix/ui.scm (read/eval): Use THE-ROOT-MODULE so that macros are properly expanded. * tests/guix-build.sh: Use 'gexp->derivation' instead of 'derivation-expression'.monads: Hide 'derivation-expression' and 'lower-inputs'.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi14
1 files changed, 3 insertions, 11 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index bbfdce51fa..3ae2b7e00b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1868,11 +1868,12 @@ Consider this ``normal'' procedure:
Using @code{(guix monads)}, it may be rewritten as a monadic function:
+@c FIXME: Find a better example, one that uses 'mlet'.
@example
(define (sh-symlink)
;; Same, but return a monadic value.
- (mlet %store-monad ((sh (package-file bash "bin")))
- (derivation-expression "sh" `(symlink ,sh %output))))
+ (gexp->derivation "sh"
+ #~(symlink (string-append #$bash "/bin/bash") #$output)))
@end example
There are two things to note in the second version: the @code{store}
@@ -1973,15 +1974,6 @@ directory of @var{package}. When @var{file} is omitted, return the name
of the @var{output} directory of @var{package}.
@end deffn
-@deffn {Monadic Procedure} derivation-expression @var{name} @var{exp} @
- [#:system (%current-system)] [#:inputs '()] @
- [#:outputs '("out")] [#:hash #f] @
- [#:hash-algo #f] [#:env-vars '()] [#:modules '()] @
- [#:references-graphs #f] [#:guile-for-build #f]
-Monadic version of @code{build-expression->derivation}
-(@pxref{Derivations}).
-@end deffn
-
@deffn {Monadic Procedure} package->derivation @var{package} [@var{system}]
Monadic version of @code{package-derivation} (@pxref{Defining
Packages}).