From ada3df03e33f686467ce4e887381e8753a3e603b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 27 Apr 2014 23:19:11 +0200 Subject: 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'. --- doc/guix.texi | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'doc/guix.texi') 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}). -- cgit v1.2.3